From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A6F4C433E6 for ; Sat, 30 Jan 2021 11:29:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C90364E0C for ; Sat, 30 Jan 2021 11:29:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C90364E0C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 488546ECA9; Sat, 30 Jan 2021 11:29:10 +0000 (UTC) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id 91DE76EB48 for ; Fri, 29 Jan 2021 13:56:44 +0000 (UTC) Received: by mail-pf1-x435.google.com with SMTP id w14so6287981pfi.2 for ; Fri, 29 Jan 2021 05:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=CeHvwYUb7eHwgxHis6xbKk3bNUrOi7lZ6qQSZZLcAX4=; b=CPYLJ9qmKPDuOsRlcAA2kdC+8QReYZargwIArHQVS/lFduGrC63Ud5njOjnib05M1R EfAOEt1fuxn57d+d2wHE6iLNVwzjSTE+/IES3zVhPDYrYUtxPD4VbYYV40w7AHNnyaGL F/CFJBGkFqSZa3xTGjDcmyBB2/hvrxLmGCfK9ozQyY93WZd1oOf8Xk/sq0x+XAKHP2Fm sr9nXm5CK7eRI7b9Lr8wAR6B8ZLJYYbVIyFGpLIh7wIWo8hIrDUb8GpicxkxYy5ZgdKl ck4uja6BENibT5a31YMeZz3Qq21eOdRCORMhSiJ+/oPDIYYeWsnPxJyYW5qWDL6NycM4 7lxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=CeHvwYUb7eHwgxHis6xbKk3bNUrOi7lZ6qQSZZLcAX4=; b=tPA4zKZuP7Gf7WYnjGX/nFfqezdhdxy0l7NKyZgyS1aOOznakNH93FlGdUHoondftH mfXWmono8hWoL9+N3PaaLTYsyR2Bwt4eeScX41DcDwZmzRYtQA++I651Hur7dV11PtIZ 2t0JIYuDjv9wNdloL2WXNJeZptxPT5P/RMYHPRzXryX1IfOzTdIyP21FQzOuXFJA7K9u KEXWa4km5ydH44wCU/Qe+LH9RHAgwgoKoK2Z0xf8lMVWBHzTUVRFkkSs9URPU/4qumRx cKirribIm2JFsa0bWabiGvkMNwowa5ZFt3Mj4gpvVqCJRLrTmXn2A5NKZUqSGuAV8hyi ZWpQ== X-Gm-Message-State: AOAM530OdvN/EKaKtoi47TZgdPVQsvEqyJsEaGwcfkrB0QILpP/vYp4o W8L9PHPyYMffKWi77/++UK0kFA8HFZXU6tRZ X-Google-Smtp-Source: ABdhPJwDr69b44kEpqtnhdn2iJg3542IyKPOimazNhwWU8PssD8aa3mzwDHVOTq4LD5Ye7+PTG1UfQ== X-Received: by 2002:a63:1f54:: with SMTP id q20mr5046479pgm.135.1611928604050; Fri, 29 Jan 2021 05:56:44 -0800 (PST) Received: from localhost ([103.220.76.197]) by smtp.gmail.com with ESMTPSA id d4sm9240800pgq.32.2021.01.29.05.56.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jan 2021 05:56:43 -0800 (PST) Date: Fri, 29 Jan 2021 21:56:38 +0800 From: carlis To: Andy Shevchenko Subject: Re: [PATCH v12] staging: fbtft: add tearing signal detect Message-ID: <20210129215638.000047b0@gmail.com> In-Reply-To: References: <1611838435-151774-1-git-send-email-zhangxuezhi3@gmail.com> <20210129130110.00003bb1@gmail.com> Organization: Tyzmig-ryrjum-8kedto X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 30 Jan 2021 11:28:30 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "open list:STAGING SUBSYSTEM" , "open list:FRAMEBUFFER LAYER" , Deepak R Varma , Greg Kroah-Hartman , oliver.graute@kococonnector.com, Linux Kernel Mailing List , dri-devel , Stefano Brivio , Colin King , zhangxuezhi1@yulong.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, 29 Jan 2021 12:23:08 +0200 Andy Shevchenko wrote: > On Fri, Jan 29, 2021 at 7:01 AM carlis wrote: > > On Thu, 28 Jan 2021 16:33:02 +0200 > > Andy Shevchenko wrote: > > > On Thu, Jan 28, 2021 at 2:58 PM Carlis > > > wrote: > > > > > > Thanks for your contribution, my comments below. > > > > > > > From: zhangxuezhi > > > > > > You probably have to configure your Git to use the same account > > > for author and committer. > > > > hi,you mean like below: > > Carlis > > ? > > I meant that you shouldn't probably have a From: line in the commit > message. > > ... > > > hi, i have modified it according to your suggestion like below: > > Please, go again thru my comments and comments from others and > carefully address all of them everywhere in your contribution. If you > have questions, ask them in reply in the corresponding context. > > ... > > > /** > > * init_tearing_effect_line() - init tearing effect line > > > * > > For example, above was commented on and hasn't been addressed here. > > > * @par: FBTFT parameter object > > * > > * Return: 0 on success, < 0 if error occurred. > > */ > > static int init_tearing_effect_line(struct fbtft_par *par) > > { > > struct device *dev = par->info->device; > > struct gpio_desc *te; > > int rc; > > > > te = gpiod_get_optional(dev, "te", GPIOD_IN); > > if (IS_ERR(te)) > > return dev_err_probe(dev, PTR_ERR(te), "Failed to > > request te GPIO\n"); > > > > > if (te) { > > This one is not like I suggested. > > > par->irq_te = gpiod_to_irq(te); > > gpiod_put(te); > > > > > if (par->irq_te) { > > This is wrong. > > > rc = devm_request_irq(dev, > > par->irq_te, > > panel_te_handler, > > IRQF_TRIGGER_RISING, > > "TE_GPIO", par); > > Try to use less LOCs. > > > if (rc) > > return dev_err_probe(dev, rc, "TE > > IRQ request failed.\n"); > > > > disable_irq_nosync(par->irq_te); > > init_completion(&par->panel_te); > > > } else { > > return dev_err_probe(dev, par->irq_te, > > "gpiod to TE IRQ failed.\n"); > > } > > Again, it is not what had been suggested. > > > } > > > > return 0; > > } > > The rest is better, but we will see later on when you submit a new > version (And I feel it won't be last). > Hi, I apologize for what I said in the previous two emails. I missed one email you sent before, and now I probably understand what you meant. Here is a version I modified according to your suggestion: >From 399e7fb91d1dcba4924cd38cc8283393c80b97e4 Mon Sep 17 00:00:00 2001 From: Carlis Date: Sun, 24 Jan 2021 22:43:21 +0800 Subject: [PATCH v13] staging: fbtft: add tearing signal detect For st7789v IC,when we need continuous full screen refresh, it is best to wait for the tearing effect line signal arrive to avoid screen tearing. Signed-off-by: Carlis --- v13: change te completion to par data struct member and add a new function to deal te gpio request. v12: change dev_err to dev_err_probe and add space in comments start, and delete te_mutex, change te wait logic. v11: remove devm_gpio_put and change a dev_err to dev_info. v10: additional notes. v9: change pr_* to dev_*. v8: delete a log line. v7: return error value when request fail. v6: add te gpio request fail deal logic. v5: fix log print. v4: modify some code style and change te irq set function name. v3: modify author and signed-off-by name. v2: add release te gpio after irq request fail. --- drivers/staging/fbtft/fb_st7789v.c | 138 +++++++++++++++++++++++++++++++++++++ drivers/staging/fbtft/fbtft.h | 5 ++ 2 files changed, 143 insertions(+) diff --git a/drivers/staging/fbtft/fb_st7789v.c b/drivers/staging/fbtft/fb_st7789v.c index 3a280cc..8faae7a 100644 --- a/drivers/staging/fbtft/fb_st7789v.c +++ b/drivers/staging/fbtft/fb_st7789v.c @@ -7,9 +7,13 @@ #include #include +#include #include #include +#include +#include #include + #include