From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D428864CC0; Tue, 23 Jan 2024 00:57:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705971459; cv=none; b=OSGqkj7m9A99OHO9rEkduX47JYtBijfbtfrUkDWvWmKrLmI0n8J3f/SmBlTdPNPXrfl25RAlM/0uaAnvQMlVzDBGMQjjb1GANY20og4Ko+vzC7rMAUHnJor3wDinHZUVefzIUEUaCZaKX6GCB3npXhYxa55Ez1ZutISzD+TAZuo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705971459; c=relaxed/simple; bh=J1PEtQOW1uzuiIM+A3iyadmsoVJb2+wK+/rg0dbMiWQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JcG0W9AZhzSFfFVnlcSavhlccPh5xNjL7TrkKaJ63BBN3M3nLd0UiLhe1R2jagUnKrZ1NeK56+Gr06if2KGshyGwGQ2FMLxTZWcbG/A19fuC3dSRDr5yTLksllpAQ/8AMyFphLs1767wcvUh6g+gqczLnOzvCql81ViklaF5o3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PacnNK1P; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="PacnNK1P" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC0EFC433F1; Tue, 23 Jan 2024 00:57:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705971459; bh=J1PEtQOW1uzuiIM+A3iyadmsoVJb2+wK+/rg0dbMiWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PacnNK1PNvVR7/TM4zsdz9QiJoTDOlnbvL53BR5tAs/MwDUWAGz2lgEH+9s9KauHt 3iNpJ2G8kTBbj1qmAG2msZsQpQVJiUsnWDeLpNFM1taYc7NriDu7g5xkSrx+5um06c YZ8bG32N/hX7nfHaamsWgxulvM0KQej4ETdPO6Z0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Dario Binacchi , Helge Deller , Sasha Levin Subject: [PATCH 6.1 246/417] fbdev: imxfb: fix left margin setting Date: Mon, 22 Jan 2024 15:56:54 -0800 Message-ID: <20240122235800.402135915@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122235751.480367507@linuxfoundation.org> References: <20240122235751.480367507@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dario Binacchi [ Upstream commit 5758844105f7dd9a0a04990cd92499a1a593dd36 ] 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 Signed-off-by: Helge Deller Signed-off-by: Sasha Levin --- 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 36ada87b49a4..32b8374abeca 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -42,6 +42,7 @@ #include