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 CD3F36D1B4; Tue, 23 Jan 2024 02:02:56 +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=1705975376; cv=none; b=XzfvSwPZIprTuvrCGVR2IVphNxFxWm/x16KW85iUPohM+1dvd2C3x358a9n51ssqp9jrA8+TtU1z9YfuDq7qdd+VhYudTFHh3wTb6L6YoeJJGF2gjeGyd4T8Iqfr1+CZ5uU/Po69M1XkWt11WncbQD8k5uTC/WxJKZ3+gLxgKRc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705975376; c=relaxed/simple; bh=AdoZwTU+4UEavwGIWTd7TCHOVEanabU7p3oeyGuZ+DE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cdLFlzRDovSTsB3K11+jOwrB8XG5z90YNe635OT5aSH02xDJzg0K9sjGzoQX3awELM/fLoGb6nGZT575x0oWfjOvHWlaH/ds2dMtbUCbZGiDS6Q5dtw2czkox5baGoY77NUENJuK8pTzHBTMYleZ9cFx6yeaG+K+ocpU4QJogmA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=0U0gPJlS; 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="0U0gPJlS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D91FC433C7; Tue, 23 Jan 2024 02:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1705975376; bh=AdoZwTU+4UEavwGIWTd7TCHOVEanabU7p3oeyGuZ+DE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0U0gPJlSOfFqTyL3hSQxKMcj91ImgQ4J1AS2A/1W6XUih0YY5lx1hMV/7QS7JXadX NYTIQ5frLjtFT/7k5+fFzpPjP88z5Z88k07IbGJf+W5CmeVhQ12BTG5EyjSw11lJ55 2BiEjraCmOlA0NCfMbp86AU2PtLG3QLZcucEHzxI= 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.6 339/583] fbdev: imxfb: fix left margin setting Date: Mon, 22 Jan 2024 15:56:30 -0800 Message-ID: <20240122235822.398850919@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240122235812.238724226@linuxfoundation.org> References: <20240122235812.238724226@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.6-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