From patchwork Fri Jul 14 01:37:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 13312824 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B2C46C0015E for ; Fri, 14 Jul 2023 01:38:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA69D10E7AB; Fri, 14 Jul 2023 01:38:10 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7EE5A10E7AF for ; Fri, 14 Jul 2023 01:38:08 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D484C61BE6; Fri, 14 Jul 2023 01:38:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10100C433BB; Fri, 14 Jul 2023 01:38:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689298687; bh=JwVyMf+LI5609rJcs4u5/6p3F2Fz4dr3IzHJqqJME3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NplkxFIiKaYucIJGPbFI00OchcTXnSS7ITA+imWxJl72VlrHqufd12GBOOKjFvoG7 oQgonSo7UCsFFiF6KwB2ydLTBxVlRzLfOs/g2oKkWds4L+rM/JKJKv+5pfXBdzY6Pc bKPpqkhktjUAvsKI6Sm3UVZkI5QaQRmkXUl/WGSzqDhfUpJD2l5FToFbYdmctrSPbL xE50P+kvcp/RhJSIEZlJmQYVcJyPI6z6P+XJd2jZIOPLwfTVtGSHbfQxcOL765prej a193TKMDTTtQKMb2o30dkmbicH4WecnNNhK1LCs2+THFoRT6UuV5lFiTXVdew1e6bK hMSAWifK9B9KA== Received: by mercury (Postfix, from userid 1000) id 01D3910676F9; Fri, 14 Jul 2023 03:37:59 +0200 (CEST) From: Sebastian Reichel To: Sebastian Reichel Subject: [PATCH v3 17/19] drm/panel: sitronix-st7789v: Clarify a definition Date: Fri, 14 Jul 2023 03:37:54 +0200 Message-Id: <20230714013756.1546769-18-sre@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230714013756.1546769-1-sre@kernel.org> References: <20230714013756.1546769-1-sre@kernel.org> MIME-Version: 1.0 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: Maxime Ripard , devicetree@vger.kernel.org, Krzysztof Kozlowski , Gerald Loacker , Sam Ravnborg , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Rob Herring , Thierry Reding , Michael Riesch , Miquel Raynal Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Miquel Raynal The Sitronix datasheet explains BIT(1) of the RGBCTRL register as the DOTCLK/PCLK edge used to sample the data lines: “0” The data is input on the positive edge of DOTCLK “1” The data is input on the negative edge of DOTCLK IOW, this bit implies a falling edge and not a high state. Correct the definition to ease the comparison with the datasheet. Signed-off-by: Miquel Raynal Acked-by: Maxime Ripard Reviewed-by: Sebastian Reichel Tested-by: Sebastian Reichel Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c index 33bdf9ee4085..3d24690e891b 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -27,7 +27,7 @@ #define ST7789V_RGBCTRL_RCM(n) (((n) & 3) << 5) #define ST7789V_RGBCTRL_VSYNC_HIGH BIT(3) #define ST7789V_RGBCTRL_HSYNC_HIGH BIT(2) -#define ST7789V_RGBCTRL_PCLK_HIGH BIT(1) +#define ST7789V_RGBCTRL_PCLK_FALLING BIT(1) #define ST7789V_RGBCTRL_DE_LOW BIT(0) #define ST7789V_RGBCTRL_VBP(n) ((n) & 0x7f) #define ST7789V_RGBCTRL_HBP(n) ((n) & 0x1f) @@ -259,7 +259,7 @@ static int st7789v_prepare(struct drm_panel *panel) if (ctx->info->mode->flags & DRM_MODE_FLAG_PHSYNC) polarity |= ST7789V_RGBCTRL_HSYNC_HIGH; if (ctx->info->bus_flags & DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE) - polarity |= ST7789V_RGBCTRL_PCLK_HIGH; + polarity |= ST7789V_RGBCTRL_PCLK_FALLING; if (ctx->info->bus_flags & DRM_BUS_FLAG_DE_LOW) polarity |= ST7789V_RGBCTRL_DE_LOW;