Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp588300pxb; Wed, 27 Jan 2021 16:00:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxGsUI4lxiVG9o5zR2LW3DRdoCNsGVoNxNsga9QvKnhfuEdSLPKbXl4hTm5H9GHv1//7GSd X-Received: by 2002:a17:906:b74f:: with SMTP id fx15mr8454370ejb.257.1611792031202; Wed, 27 Jan 2021 16:00:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611792031; cv=none; d=google.com; s=arc-20160816; b=rDKF1FM2W11rExt4WAAUG1dqzEjc8xisLBYj8uox//JeiKE9u2odEtGNE2+azRn4pv pPuIbWBTd5Ibf8KPJ2K367KmvXwjFz16ohm0MeTNuDZiA9U5iDC3uuBYyyP+0qZ6e6cm 4+DI95OgOkfufhv4/ICQzCdlgVHkooVW2VTUWxJVwSah1oZgDfuGhvrt9nmiUg0ViBHa HAszfmSAyzcriAoy85lRWeXbfDvXzasALWvmVUMpxOzvdKcFPPzAizp9lodl1pIU2bOe 1nBCrRUv8GEzFa6Ay5SysLQx4H9DYe+hw8SLGdq4slBxOGAN9nFa6tRn1yivhJoYowqm dp5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=1EaXDtgsmKbyTNEoIeEW/CVFWfYBzuZKRGJAXmQat5c=; b=SpP6s88HXrPc95k8QFleCxvJFQXfDmmRsVFuPDYx75pIqmwlXA66cUQeZwjhbTBXAr ekIS4Wr0MFm80RAiKbtvw+WoF251CSpW8J8JOXTvL4izNBX9BQpGxNa3iRDIGaMnG95W twpmAhde7sDruXHmAoe7wE1O3oJ9lK9QwlemKjb7uc7KzN/S7nKbgUjl+B7jzFMpabHb femrysGkzUka7EihXLPn+unT7nBygRbyzW//l5naTVh+q6KnMnyQg/g/2RrPlphupfFh bTbqSyKXUX5mnMkv2wSDR2K9msnEib8X1sOq2qIYeHQT9ja8cWm9kAnHlBRiJtbRFcaL BqVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PgHETGEl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh14si1525174ejb.45.2021.01.27.16.00.06; Wed, 27 Jan 2021 16:00:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PgHETGEl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232298AbhA0OFE (ORCPT + 99 others); Wed, 27 Jan 2021 09:05:04 -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-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-kernel@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