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: 12052915 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=-13.5 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_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 78A46C433E6 for ; Thu, 28 Jan 2021 08:16:04 +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 1F86864DDF for ; Thu, 28 Jan 2021 08:16:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F86864DDF 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 3E6E26E906; Thu, 28 Jan 2021 08:15:39 +0000 (UTC) Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by gabe.freedesktop.org (Postfix) with ESMTPS id C5F6089CCB for ; Wed, 27 Jan 2021 14:02:26 +0000 (UTC) Received: by mail-pl1-x633.google.com with SMTP id b17so1083610plz.6 for ; 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=pUvKt0Dgq+sln8ikLNTPmCg0WVZi8AtmN5k2yFG6TY6bH7u8ETcwywOnXzMx2fdhie xueEMlBHwL617KsgTPlLgbRHXbfripgT9ScvxGCifY69MBtvWWtT0ddjE8t6WnEeAH4r FygVZ2XS8PzeCu8MnTU4LYrliOCJW1YlYrVLuweuZYKdi+BQDvu8tNhmE5vP7r8AecoI PKeLK1GrUS112cv+Dd8ti5QQqgBxDeWTPZ7cBFZV0xCaAx/Jg8z2A4u4eNRy7Z+AZ5GU GFr5mTtvkrzamHpMs7nG0vAiTLI2MB1sQTnd/tWJU4TgnBB/tv7gQKvw1wqYemDy+rxd tTEQ== X-Gm-Message-State: AOAM5308t2adnClFmyr2vWAh1kgI0o6g6wvFpLEsFouZGjxBHZVtMRnI 3aecAGFeJRSbVWhs1CQlszc= 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 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 X-Mailman-Approved-At: Thu, 28 Jan 2021 08:15:36 +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: devel@driverdev.osuosl.org, linux-fbdev@vger.kernel.org, mh12gx2825@gmail.com, oliver.graute@kococonnector.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, sbrivio@redhat.com, colin.king@canonical.com, zhangxuezhi1@yulong.com MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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