From patchwork Wed Jan 27 14:02:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xuezhi Zhang X-Patchwork-Id: 371882 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 E67C5C433DB for ; Wed, 27 Jan 2021 14:05:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B342C20829 for ; Wed, 27 Jan 2021 14:05:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232126AbhA0OFC (ORCPT ); Wed, 27 Jan 2021 09:05:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232507AbhA0ODH (ORCPT ); Wed, 27 Jan 2021 09:03:07 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7BA7C061573; Wed, 27 Jan 2021 06:02:26 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id u4so1417760pjn.4; Wed, 27 Jan 2021 06:02:26 -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=1EaXDtgsmKbyTNEoIeEW/CVFWfYBzuZKRGJAXmQat5c=; b=PgHETGElYAFLqTIjMGzJ7IdY+70ly07hXSe5oTpLScCyaT/cvIQJ0sDN9yMFI/zg3+ USLm+Kj40SQB9pihIxJDkAdmPgdh+RMdkkIRp6adpEJHOLkkbQpXtRmoR9omC5HwX7z4 0/+MdORcKBnjNEBb1nUL8r/JDe2lHnuHg3N8I0kbgy16iS2XqikCmOH2q+FI1jKPt/cH L9NrUnZbog3a5MDsMwZYZw1tKFtbCGQ9unm8Jv/kXb9CbF7ydtmNvp2XYpD26v2RlaXm PZxznNHJO96tzn+PCcGw3l+S0iS1kJhbr9jMPiCPK2IV4xuKUfiDeaTzYTa93h1YKjmr sS3g== 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=1EaXDtgsmKbyTNEoIeEW/CVFWfYBzuZKRGJAXmQat5c=; b=uG2yU3cc6FpCLg8q0MG/rvaCojX62pTSD2gMZGIun/AFjyBL76YYUkW+vc90jwJEln LGtnAY8cUcRBQroLeL8K56eU/Z54sQklHaoGaKfipr0aJguNKd8ceD+kllzPldvpNdyz 9+vYMmnhhYOPjhfkKZoW2R5Sx8V/myBmVbPJDWx3EMGt5YCWFpSSC9su3n5Cjax92RF8 1lClyq1QiPphEaPlSC+VB9YMawLlvhiD2bV9yYH71InqdcjVidwg8JLE4VF+8rdjigLy Y1xJ60vEEESknt8Xn0RCGeaZOydRDYIVZBzIXajek/tLJC+VIbnSmbVGuCArz9lhio4D 6iHA== X-Gm-Message-State: AOAM533D0ye4016LB7ZPzQxX019Crd7qQ+fxab3RTPf4+BK6RIFhiF4m 2J7A1nLyyE8Q0t6fdy+EziU= X-Google-Smtp-Source: ABdhPJxf38qBxjZF+atoi4+4krETBKIDh/w++EhB/V3+NRsmP2rJb4NK9TMzwhUia1ywIQ3yDi93og== X-Received: by 2002:a17:90b:8b:: with SMTP id bb11mr5945344pjb.128.1611756146457; Wed, 27 Jan 2021 06:02:26 -0800 (PST) Received: from bf-rmsz-10.ccdomain.com ([103.220.76.197]) by smtp.gmail.com with ESMTPSA id w12sm2328673pjq.26.2021.01.27.06.02.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jan 2021 06:02:25 -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 v11] staging: fbtft: add tearing signal detect Date: Wed, 27 Jan 2021 22:02:29 +0800 Message-Id: <1611756149-165287-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 --- 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 | 131 ++++++++++++++++++++++++++++++++++++- drivers/staging/fbtft/fbtft.h | 1 + 2 files changed, 131 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fb_st7789v.c b/drivers/staging/fbtft/fb_st7789v.c index 3a280cc..cfb54a4 100644 --- a/drivers/staging/fbtft/fb_st7789v.c +++ b/drivers/staging/fbtft/fb_st7789v.c @@ -9,9 +9,12 @@ #include #include #include +#include +#include +#include #include #include