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 58701136658; Tue, 23 Jan 2024 00:28:00 +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=1705969680; cv=none; b=DLuklD50vP7WYDno8vyCdEt8D1a+Xqv1XerezXGrf/UB2lkpMOD/pVuDNLl5WaYzaOx2k9V8zfpataMHe6C3U672j0gWbZe9PEw2GaKeUldzAD8ewiMf0YZxZkcWQ3LLWt0ibwMMb+BhX3duqd0JPyBr/2Ctm+GRpE3CNNsFT6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705969680; c=relaxed/simple; bh=drGOW+oMSk2mR7pqnS12QA1eykkcGlwPcJZNCQjT7ZQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AyUPHLutOjWONcpvrPpY+X2/LzR37APexU81ZieMr4fCrFBtVW5CUpV6X7X/emBWGV2VDdJlQdV+9q3sewTt5vxC0z5FGz+94nBrXlRakG32lPclzjkaKC04uRt41ZKh/gYCDNM8rraZJg/UPP3lOwOY+clEOHHonFGxqT8mnX0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=aBprtVdq; 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="aBprtVdq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17F96C433F1; Tue, 23 Jan 2024 00:28:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705969680; bh=drGOW+oMSk2mR7pqnS12QA1eykkcGlwPcJZNCQjT7ZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aBprtVdq95eNorINysfX8DH6mmjo+r+l7yUskxIKhpEQI9NTeNxT8kPg997m9T0Ez Xw5vtAvLZSycsl7RzUuz397OQm/PS5HTrjtCDvsDdJfzeAbKjQXL/aUZM4ljEftNAU SDI3jwIH11fhPmLGdbFmpfJ3YbTE3iPvsaexwVks= 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.7 375/641] fbdev: imxfb: fix left margin setting Date: Mon, 22 Jan 2024 15:54:39 -0800 Message-ID: <20240122235829.693775572@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122235818.091081209@linuxfoundation.org> References: <20240122235818.091081209@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.7-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 84201c9608d3..7042a43b81d8 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -42,6 +42,7 @@ #include