Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp589177pxb; Wed, 27 Jan 2021 16:01:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxIWSEv6ewTl9hmCbY1pW6yKUUd5MQiitS+j4l4Ky01CqgVGj/RXulPPCTidbyP1m5hXe+O X-Received: by 2002:a17:906:478a:: with SMTP id cw10mr8492531ejc.533.1611792103132; Wed, 27 Jan 2021 16:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611792103; cv=none; d=google.com; s=arc-20160816; b=Dj+vwknKM+IC79OZH0+hUJsr02uNx3L8s2GnL8EBtZ4qNBWULXz1a50N0eAd0ihlaU 3Bpk4DQVckTRfN4KvxhhnV6dfDKFGuDRGaMkQI5+ajNxbkAvytF7VkrosheQf+v03pET bg2OphHoJO1ZeM90pvldK6MvhbTQ8O8B2oi8jkJtzzhSxbgiJ81810q7YAzf+Tc+DC// JmlwjefOtCpsYJU0hd0+coojOkgfsBflmGdzDODQYz2E/nne2WrUSNLEYUdyUoLumixi PesDaY2wyTIQoI57XXPDIVYoLj933iQnzqPzWGJpj5zxtwBoITc96r7/w1JYlhvVrSRP FuqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=587D5sQwzOQpISnpuw/zLfl/khiQsRKiyrXe7742FuI=; b=vyGur0KHiBGltZuSfPuxm0YdrR5wk/AwOsM+tMtMMBqDmygZAhCR+KiTHvMmqxI6DF LikSopFK4B9lpEIoE2aHp4oeNgRSW6J9MHgirQnzf/o2ElWuC3Glqf5INFe5BB24PrnY F9EN33I/gfNUN0KaDoYQtPfuUwUxiJoMytPb3xxjqkjXwRCQiI/Tt1RzX+s4+5rI4pjs LvoJaXbIEpV/VhIZOZ/b1WuXZ7tENliC8A8nlqIxzGBHvd1RPT8DwacGwGsEm+JP/KvV HQffJEsMx8SkNX088EuUyg4L6Gjc+AyrtoqPXxUVeWBq1QPTJMlz/DOs5Y7Gb8OVy6hb cM4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z8si1771104edq.163.2021.01.27.16.01.18; Wed, 27 Jan 2021 16:01:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233534AbhA0OXD (ORCPT + 99 others); Wed, 27 Jan 2021 09:23:03 -0500 Received: from mail-ot1-f47.google.com ([209.85.210.47]:39893 "EHLO mail-ot1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232267AbhA0OWl (ORCPT ); Wed, 27 Jan 2021 09:22:41 -0500 Received: by mail-ot1-f47.google.com with SMTP id i30so1792576ota.6; Wed, 27 Jan 2021 06:22:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=587D5sQwzOQpISnpuw/zLfl/khiQsRKiyrXe7742FuI=; b=VXLB/yVSp5Lw5FXpgK3vsCrnsKuEgXVSbPAkDlJkLlq+CD/mjl9fq12PsEEQsfoJFi MCtkUIJz+3uE2UZx749l80sMaLUlQymJmwNfvgT3mEWBgh0xs0zKD86OOND6Q33M2cnv zgZTwtVIkYZxx4UWMcAfvivaxNXssgI+XMZ+0Yd8hYU0HgEXgAXJN8PCdrbrdRinzW/u NOcgXo/weY+5D+UZAeErgSuncuq6+zNmhCn0yJT2rb1mf3RYuAuCsvEk4eEIh4InWM3h SGDU2DyM/lZg1AF1ksPX7Y84n18W0IiaZk3sN2Tu1D+qBaXzF1W4AhO+nP6R+56LdfkA XK9g== X-Gm-Message-State: AOAM533sRXeR5Kfbvkv8lbg4uUkUw+2PWhGGvto9YN8E2yYLf14wRD8L e1j2z/9rCwSPIx3+K7HgIkKj2UxB47Zf2anxnjODNiy0 X-Received: by 2002:a05:6830:15cc:: with SMTP id j12mr7855321otr.145.1611757320011; Wed, 27 Jan 2021 06:22:00 -0800 (PST) MIME-Version: 1.0 References: <1611756149-165287-1-git-send-email-zhangxuezhi3@gmail.com> In-Reply-To: <1611756149-165287-1-git-send-email-zhangxuezhi3@gmail.com> From: Geert Uytterhoeven Date: Wed, 27 Jan 2021 15:21:48 +0100 Message-ID: Subject: Re: [PATCH v11] staging: fbtft: add tearing signal detect To: Carlis Cc: Greg KH , Colin King , oliver.graute@kococonnector.com, zhangxuezhi1@yulong.com, mh12gx2825@gmail.com, Stefano Brivio , DRI Development , Linux Fbdev development list , driverdevel , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Carlis, On Wed, Jan 27, 2021 at 3:07 PM Carlis wrote: > From: zhangxuezhi > > For st7789v ic,when we need continuous full screen refresh, it is best to > wait for the TE signal arrive to avoid screen tearing > > Signed-off-by: zhangxuezhi > --- > v11: remove devm_gpio_put and change a dev_err to dev_info > --- a/drivers/staging/fbtft/fb_st7789v.c > +++ b/drivers/staging/fbtft/fb_st7789v.c > @@ -82,6 +111,32 @@ 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); > + dev_info(par->info->device, "Failed to request te gpio: %d\n", rc); Please slow down and read the feedback. I said "dev_err_probe()", not "dev_info()". > + return rc; > + } > + 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) { > + dev_err(par->info->device, "TE request_irq failed.\n"); Same here. > + return rc; > + } > + > + disable_irq_nosync(gpiod_to_irq(par->gpio.te)); > + } else { > + dev_info(par->info->device, "%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 -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds