From patchwork Sat Nov 11 10:41:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2998 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 44E3C3FA58 for ; Sat, 11 Nov 2023 11:42:39 +0100 (CET) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-54061ad6600sf2045562a12.3 for ; Sat, 11 Nov 2023 02:42:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699699359; cv=pass; d=google.com; s=arc-20160816; b=xHu1jzldvojissU0NpQYRoVkrPfWETRYzL4u/Kgzxh0EzaesFSlvpVcAvziMN+tevI ZQ8bsoVWOwdgUKhalD4LDk9WzlhmFTxKsoJUde7PXv4aM73vLlg35iyyc9CKFbflycY3 dmABxAxq+mWvFcu9NvyNgTBWdER0GNwxiW1Y/sOV6BpYZ50qbeglYiFzNVMkB/XIyrvZ Jhwy4YHUg92zE7TIOx0q0whtqbWyN2x5/onArCngoRk1hpV8esqoPR/CzFTRwMaxJPJB 7PDOcBOmY5KvZLmiHJ1zm9DmzpbjnU17T76AOxybPdLVmtJC1cN1jIQdKcQSY/3ZMrV5 V/3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XEUFmSmt4+kDUFZOvwPvI3ZXApfyh/WxojWjQBSgcKU=; fh=GXyCuaO7mljfRZuDSHr1xseCHKUjkPQV0dF3zOsFIac=; b=n/kyj1dcrcFBa/Q7VftRis8OTWRWW1Iq/gBh4doRwAS010GS6VEFQWDvstOA/7Bg9o PRxy/FLw/wstE4r9orua8nDNrEkzWaVDmUXbLB0V4b16kVRCWSpGw4lKOjBgrQt59fei DOarlZXuc0Yw/GjQedErz5pXXS1ngqEm4sKnM4HoBJxKExCsnGEsWq09xvZXcM6Cdn96 +lsZB8d6kyaLKrYfZjh048VCM3IrFkTOQXTjOWlqvGfyUTxqO6sj4D9xsakMVtlEE/y3 /puKAy1a89As0iJutzLna/nBvrcPVMViNJIdEQ3F6pp9Cpz4IPwayzd0RCq01xwSaAwZ vffA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UrjsZXky; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1699699359; x=1700304159; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=XEUFmSmt4+kDUFZOvwPvI3ZXApfyh/WxojWjQBSgcKU=; b=mzqeP8FkZJHtEJ/8ib1IvYS2k/dOhkrQvxQPR6ROqBnkmknK7qMqWstcMclq12aSL+ s/63UEPfGK89O1ryBgVTPPSRn2NH8LctGL06xqQH1EFiwRQUN1lbR0FDfSeVE/uTSkLN 3ua7usAK0yTblRS1rk2uwNZ2pLVgfhOMwTelU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699699359; x=1700304159; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XEUFmSmt4+kDUFZOvwPvI3ZXApfyh/WxojWjQBSgcKU=; b=DaqQUaN4iOhUSp8S/fBvE1vMZGzE/G9RchStJHF+gOmhaBYBwChdnElOxpgX+lUTMa 3p12Nr6j4b3aiXKeZOK2MI//RzDEgahIPasJ2bFObhrbyCcIn4Dsf+PVvjD+Lsr28rYK b+lKHmr4ldyJ+bYv/nzMKTKNsTARQAyo7xOD6SOITJesNNZ4edUCn1y9pBN4D+gwqrNa DwCUPWkQkCkHTqvrqTJJRxjKT+qhEpNWSTmRJiNlE1cQaCmqchSu6VV+CuOZXI0gcXzO PoJVm1qzGt54AZbmixqme0mhxagOImiF4Al7TuPEz+bRV5nxt72Gr4WXav1+ZVB8p/jx Etog== X-Gm-Message-State: AOJu0Yxg1ZVhidQ1Py0kLCgbSI8HfEDHiaHQnjCB/c/DLgvMgMRWFrOz jhi8VPsBB6ZLiLMQGU5GWijG9/GY X-Google-Smtp-Source: AGHT+IFIv+bEwOoA8RfuB4Nqdn4nyiTAUeZJYZo6OcNxeIipM+asVqApS1dhx87x8oQq+smOvECPOA== X-Received: by 2002:a50:ff14:0:b0:543:75cb:214e with SMTP id a20-20020a50ff14000000b0054375cb214emr1299973edu.11.1699699358972; Sat, 11 Nov 2023 02:42:38 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5156:b0:534:7b4a:8d91 with SMTP id n22-20020a056402515600b005347b4a8d91ls50563edd.2.-pod-prod-06-eu; Sat, 11 Nov 2023 02:42:37 -0800 (PST) X-Received: by 2002:a17:906:c30a:b0:9e6:568:7374 with SMTP id s10-20020a170906c30a00b009e605687374mr1024209ejz.1.1699699357453; Sat, 11 Nov 2023 02:42:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699699357; cv=none; d=google.com; s=arc-20160816; b=RYYHQC2p7l/yKZQ6C5nDyk9umVKyNBgI+aJU4ngOmjK/2aUDNtGJbrzDmmgyDr8kEP tHMDVBCrPTq3yjOwDS6E+L/Lddkbw6qRowtrm59ezFkV7RkgaMtG77pR3ckc+yxKpyV4 nPyI0T2GY+rSC0nuCfdwQ6kYQ7RBFpP2AvBhlb85yLaRtxh33blKaYoQIfyuTi4imPXs Ur5ofkUkZJwa8v44lwMrNtxnq1ZRyfwP1woiuc/Bat4OlWZm2D6NZ5XtyEgTsR2ghQYI JvklrPcGdRkN1NMO94dWDXv+78U+Sqh6YCOTvHkeB9SI3lorp12ILg+bPbvUK4raaZjx w4WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=eutcu8nha5gIvSO1Nw/orY10THf/Z0yjX5SxOR1EIyg=; fh=GXyCuaO7mljfRZuDSHr1xseCHKUjkPQV0dF3zOsFIac=; b=0hu6dE+SYfd//BXE1nbyVsoT2ONoJEn6uWZRZtsynuCE5gPPX2WrU/anP94XxDPKVG nwrKHEEv5PwwNu9gFK2XrQHU3XHyMetWvfDctXdv0iEkTxMwhLn4h4wp3szqZbFcx5DJ Rg548xVLziCoVFlJAYy1nstXNaMx5G1w8DBC2DoqeB6DXBDqRzrQkCsnajNEp063LnVV z8/aVjbUTBe/UAwV56fEmF2TvN2i2cJMcNrX8IUabFaqg4PfknwOlqURIaRdlAVPeEYf MWVAcbKV2H84j3Yj3wz+uLqjU+yP0ZVlcSMuu0JvuGfGeB0t8yRC50/+F0LEvMuQ8D0v +KSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UrjsZXky; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 21-20020a170906101500b009cd938511dfsor265306ejm.19.2023.11.11.02.42.37 for (Google Transport Security); Sat, 11 Nov 2023 02:42:37 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a17:906:4742:b0:9bf:4915:22ca with SMTP id j2-20020a170906474200b009bf491522camr1072967ejs.45.1699699357215; Sat, 11 Nov 2023 02:42:37 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-20-97-182.retail.telecomitalia.it. [79.20.97.182]) by smtp.gmail.com with ESMTPSA id ga33-20020a1709070c2100b0099e12a49c8fsm872183ejc.173.2023.11.11.02.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Nov 2023 02:42:36 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Fabio Estevam , Helge Deller , Martin Kaiser , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org Subject: [PATCH 01/10] fbdev: imxfb: fix left margin setting Date: Sat, 11 Nov 2023 11:41:50 +0100 Message-ID: <20231111104225.136512-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231111104225.136512-1-dario.binacchi@amarulasolutions.com> References: <20231111104225.136512-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UrjsZXky; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The previous setting did not take into account the CSTN mode. For the H_WAIT_2 bitfield (bits 0-7) of the LCDC Horizontal Configuration Register (LCDCR), the IMX25RM manual states that: In TFT mode, it specifies the number of SCLK periods between the end of HSYNC and the beginning of OE signal, and the total delay time equals (H_WAIT_2 + 3) of SCLK periods. In CSTN mode, it specifies the number of SCLK periods between the end of HSYNC and the first display data in each line, and the total delay time equals (H_WAIT_2 + 2) of SCLK periods. The patch handles both cases. Fixes: 4e47382fbca9 ("fbdev: imxfb: warn about invalid left/right margin") Fixes: 7e8549bcee00 ("imxfb: Fix margin settings") Signed-off-by: Dario Binacchi --- drivers/video/fbdev/imxfb.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 84201c9608d3..7042a43b81d8 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -42,6 +42,7 @@ #include