From patchwork Wed Jan 27 13:42:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xuezhi Zhang X-Patchwork-Id: 371883 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 8116CC433E0 for ; Wed, 27 Jan 2021 13:44:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31B51207B0 for ; Wed, 27 Jan 2021 13:44:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229779AbhA0NoB (ORCPT ); Wed, 27 Jan 2021 08:44:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231162AbhA0Nn2 (ORCPT ); Wed, 27 Jan 2021 08:43:28 -0500 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8006C061573; Wed, 27 Jan 2021 05:42:48 -0800 (PST) Received: by mail-pl1-x630.google.com with SMTP id r4so1040331pls.11; Wed, 27 Jan 2021 05:42:48 -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=/5CRpVhAYIt5nq1FFXNh2jsrHhTk1E3I4CheLPQJc30=; b=LwebHWOlnFO1NFGDdPfvHWMqOGU/3xtwhbPNBpIrKkKM62kw/ZMUQd2hD4gTEYYfJo /ZsIHvJAyjNaTdWPTV8/bPXXaspkyxZ91/Yy8iijwLoQU/S055b+YI5KTOhWxR0EgTdT blzRYX8Mdmj1E+/EuSq8iK5lAJCb0JkDvJXpSaLqYj0Sd8Y7EE1XYIedBLjkOWtLYT3X W2x47WcVcXICTz+KeWGB04b2xNPhX9pztcXn0vz4NP0XGftOu3CnJVzJMsphNvYNMxJ4 2NetMOw42PhPmHb4TnHJEE4NYa/HuemLxxbiXeyvdlE18TmLUEx5o1GJjZAVOj+cStQd arxQ== 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=/5CRpVhAYIt5nq1FFXNh2jsrHhTk1E3I4CheLPQJc30=; b=qkAdl4bVsz5uKnCfp9Nmth2IJejWizly+1sysz62wgBbd+zwZ5CVDBORaInHMRMMUe hIkA8IO4flIEqLKOcxhvtkiSG4us7Rn5vkACGSytng1l72rlRbFHOrBiGeyQgaWrVA9N 5D2hIb8hu1Zu0b3E+k44db9iZZ6Y5QqXkjUzB9mHMrCpWdBbzFmi5Sn+xTg2ZI1UpWAw 9RidHnpw9wPyTzVnWV2oo3aZBfP32aFDIqtDAq8Jl/QApE7vo/fRR5CSLnVaRLKK7wyy KOxb5J9f0QQPOlFADAvrdaKw5aVBnj7bTZojxSqAA+/pHFWzPGnNpPmSpYI1QdbHSm8C wLZA== X-Gm-Message-State: AOAM533lURESTqgzTMjU8vyfRyydTan1LxC+ukCszvm/BZrJpNLjF0H6 vWGZZsEscID+X0Kuqk6s3yQ= X-Google-Smtp-Source: ABdhPJyQnI/dXjI04oyDhfxJ93RmAp/oWTY5SXoVJL+VMZW48hsLsbIIctnaF0Ds2lgIn5T1jYrQ0g== X-Received: by 2002:a17:902:6b02:b029:da:c6c0:d650 with SMTP id o2-20020a1709026b02b02900dac6c0d650mr11625296plk.74.1611754968360; Wed, 27 Jan 2021 05:42:48 -0800 (PST) Received: from bf-rmsz-10.ccdomain.com ([103.220.76.197]) by smtp.gmail.com with ESMTPSA id f71sm2547437pfa.138.2021.01.27.05.42.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jan 2021 05:42:47 -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 v10] staging: fbtft: add tearing signal detect Date: Wed, 27 Jan 2021 21:42:52 +0800 Message-Id: <1611754972-151016-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 --- 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 | 132 ++++++++++++++++++++++++++++++++++++- drivers/staging/fbtft/fbtft.h | 1 + 2 files changed, 132 insertions(+), 1 deletion(-) diff --git a/drivers/staging/fbtft/fb_st7789v.c b/drivers/staging/fbtft/fb_st7789v.c index 3a280cc..cba08a8 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