From patchwork Thu Jan 28 12:53:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xuezhi Zhang X-Patchwork-Id: 373515 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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_GIT 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 59C4BC433E6 for ; Thu, 28 Jan 2021 12:54:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 222C464DE3 for ; Thu, 28 Jan 2021 12:54:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231139AbhA1Myr (ORCPT ); Thu, 28 Jan 2021 07:54:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231830AbhA1Myd (ORCPT ); Thu, 28 Jan 2021 07:54:33 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18AF0C061573; Thu, 28 Jan 2021 04:53:53 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id l18so4240208pji.3; Thu, 28 Jan 2021 04:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xKZV/Um0FhIRJnZma6AnCUuyhST6hlEZWfXA5uHsQWE=; b=RsVUrWnGd5k9TLDian2DQ05N268wiPWUgerEcXZhzdAKH+9zPCu7/ScFRrGiZCWlsK mM83O/xDIDeNYUagTprjteO+ERDCmrAhAbcQfoJRKt+Q+pF+i80s7aEgIo7Q7viniVXn MDmGR+jFMWiH+N4dGoh1g/VIRrp9owYBxr318oNo/aK3RyjDD2Cf064hY9Fon3iWj5xn HHGesDUBujYRMpB7bg0Q2YJGOTmHDPx2oOcuGysKGirA+Kx2PekmSRXRbwqMh+KrNhUZ 0OrP4R/Qk6xvCXyKEJVhoEhLzGBfhlDOz2G6pq3xuA9UTM5RXVtcsF9ghvfLDhJX7pXV +u3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xKZV/Um0FhIRJnZma6AnCUuyhST6hlEZWfXA5uHsQWE=; b=qAo24dIkbS5gKngS3fQidWDf14Cv4FNRLqcZ4sKGv0pJ0G08uEiV2DgK43b/Ga8ziv WnzDn14pRgetTY4CG4LIz2RcEBmBrXaVPv81kN6ZIBgv11mxOBjCfgGkP6eY39oRukqX BbFfZcR5LHc0vT9DOYmvU4SCCAL6YP4vrZR4A/U7NtRwmWgQU8bwNbbcC7uBEVrFIk9f gdR6chOPblaS09XPJ1XbfntWtsg9fZ6tIRctivySJXwBTzC9yYP5Lv3vM1AzvEqpjT1z 4qrhZF2YlU1gY2T/xpOQ4txQ53C1GQjlU3+ETIzkDLtKgsWmrCl/WPeJcMix5E6QHbyt soQQ== X-Gm-Message-State: AOAM532usguGv4wVv6rD/48xG70smg0h+O1Nub8WiqPHINm5C4iwSrEP u6xHrqg0xzgQYm6OvDX39X0= X-Google-Smtp-Source: ABdhPJz5GI/BBV+WOge6Ok/da+CApxkX/YnH/s4kvZM1atA4tL07ZH/qrSyjF6NlpzDY2iIv01Zsxg== X-Received: by 2002:a17:902:ab90:b029:e0:17b:ae98 with SMTP id f16-20020a170902ab90b02900e0017bae98mr16119255plr.6.1611838432507; Thu, 28 Jan 2021 04:53:52 -0800 (PST) Received: from bf-rmsz-10.ccdomain.com ([103.220.76.197]) by smtp.gmail.com with ESMTPSA id y1sm5821520pfn.125.2021.01.28.04.53.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jan 2021 04:53:51 -0800 (PST) From: Carlis To: gregkh@linuxfoundation.org Cc: colin.king@canonical.com, oliver.graute@kococonnector.com, zhangxuezhi1@yulong.com, mh12gx2825@gmail.com, sbrivio@redhat.com, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v12] staging: fbtft: add tearing signal detect Date: Thu, 28 Jan 2021 20:53:55 +0800 Message-Id: <1611838435-151774-1-git-send-email-zhangxuezhi3@gmail.com> X-Mailer: git-send-email 1.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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 Signed-off-by: Carlis --- 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 | 116 +++++++++++++++++++++++++++++++++++++ drivers/staging/fbtft/fbtft.h | 1 + 2 files changed, 117 insertions(+) diff --git a/drivers/staging/fbtft/fb_st7789v.c b/drivers/staging/fbtft/fb_st7789v.c index 3a280cc..f08e9da 100644 --- a/drivers/staging/fbtft/fb_st7789v.c +++ b/drivers/staging/fbtft/fb_st7789v.c @@ -9,7 +9,11 @@ #include #include #include +#include +#include #include +#include + #include