linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: carlis <zhangxuezhi3@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Colin King <colin.king@canonical.com>,
	oliver.graute@kococonnector.com, zhangxuezhi1@yulong.com,
	mh12gx2825@gmail.com, Stefano Brivio <sbrivio@redhat.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	driverdevel <devel@driverdev.osuosl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6] fbtft: add tearing signal detect
Date: Wed, 27 Jan 2021 17:26:31 +0800	[thread overview]
Message-ID: <20210127172631.00001846@gmail.com> (raw)
In-Reply-To: <CAMuHMdV5VxNBNV-UMswKKZmQRFUvG+pnBbOOW8XJT8pbbvmp5Q@mail.gmail.com>

On Wed, 27 Jan 2021 10:00:13 +0100
Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> Hi Carlis,
> 
> On Wed, Jan 27, 2021 at 9:52 AM Carlis <zhangxuezhi3@gmail.com> wrote:
> > From: zhangxuezhi <zhangxuezhi1@yulong.com>
> >
> > For st7789v ic,add tearing signal detect to avoid screen tearing
> >
> > Signed-off-by: zhangxuezhi <zhangxuezhi1@yulong.com>  
> 
> Thanks for your patch!
> 
> > --- a/drivers/staging/fbtft/fb_st7789v.c
> > +++ b/drivers/staging/fbtft/fb_st7789v.c  
> 
> > @@ -82,6 +111,34 @@ enum st7789v_command {
> >   */
> >  static int init_display(struct fbtft_par *par)
> >  {
> > +       int rc;
> > +       struct device *dev = par->info->device;
> > +
> > +       par->gpio.te = devm_gpiod_get_index_optional(dev, "te", 0,
> > GPIOD_IN);
> > +       if (IS_ERR(par->gpio.te)) {
> > +               rc = PTR_ERR(par->gpio.te);
> > +               pr_err("Failed to request te gpio: %d\n", rc);
> > +               par->gpio.te = NULL;  
> 
> Errors (e.g. -EPROBE_DEFER) should be propagated upstream,
> not ignored.
> 
> > +       }
> > +       if (par->gpio.te) {
> > +               init_completion(&spi_panel_te);
> > +               mutex_init(&te_mutex);
> > +               rc = devm_request_irq(dev,
> > +                                     gpiod_to_irq(par->gpio.te),
> > +                                    spi_panel_te_handler,
> > IRQF_TRIGGER_RISING,
> > +                                    "TE_GPIO", par);
> > +               if (rc) {
> > +                       pr_err("TE request_irq failed.\n");
> > +                       devm_gpiod_put(dev, par->gpio.te);
> > +                       par->gpio.te = NULL;  
> 
> Errors (e.g. -EPROBE_DEFER) should be propagated upstream,
> not ignored.
> 
> > +               } else {
> > +
> > disable_irq_nosync(gpiod_to_irq(par->gpio.te));
> > +                       pr_info("TE request_irq completion.\n");
> > +               }
> > +       } else {
> > +               pr_info("%s:%d, TE gpio not specified\n",
> > +                       __func__, __LINE__);
> > +       }
> >         /* turn off sleep mode */
> >         write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE);
> >         mdelay(120);  
> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 

hi,i will fix in the patch v7

      reply	other threads:[~2021-01-27  9:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27  7:28 [PATCH v6] fbtft: add tearing signal detect Carlis
2021-01-27  8:59 ` Dan Carpenter
2021-01-27 10:23   ` carlis
2021-01-27  9:00 ` Geert Uytterhoeven
2021-01-27  9:26   ` carlis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210127172631.00001846@gmail.com \
    --to=zhangxuezhi3@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mh12gx2825@gmail.com \
    --cc=oliver.graute@kococonnector.com \
    --cc=sbrivio@redhat.com \
    --cc=zhangxuezhi1@yulong.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).