From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E3E10C54EE9 for ; Wed, 7 Sep 2022 11:06:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CA1758494A; Wed, 7 Sep 2022 13:06:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=metanate.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=metanate.com header.i=@metanate.com header.b="jKsDjCoS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EDAB9848DC; Wed, 7 Sep 2022 13:06:44 +0200 (CEST) Received: from metanate.com (unknown [IPv6:2001:8b0:1628:5005::111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA8D084A4B for ; Wed, 7 Sep 2022 13:06:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=metanate.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=john@metanate.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=metanate.com; s=stronger; h=Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Content-Type:Reply-To:Content-ID:Content-Description: In-Reply-To:References; bh=i8qRZac4YtfyHbb36zotWBsO0l3AkklQBkNvaBU49YM=; b=jK sDjCoSrOgOZoK8A4BoXs6Ixj9/7mO4W9TthwllxDTvDnEpjPkDUJY7CjjF326+zOst90WRzFWhuXM 3PGazbLltTjiUuBcbY5NgfR36S8nI/p0izV5NI6+FQyanRgcyhYddeell1JOplBQU9SJX4apsXGCB UqB12tHl0IXKGxPQr8J5UmpxfC6JVNWeH/9KicMFVcGzM30O2BpVxxRAdJkDluE2kGw9zukba8dHF dgJinwNakXNDaeoWRzovFxkX2816eIYpfsZ8xMO2gEHKmUBepztj8WkcEqsPITYHKmgA9OEZ5T3hl qQavUX80xYrQDE9jAEOX5pX3nVsxwd3Q==; Received: from dougal.metanate.com ([192.168.88.1] helo=donbot.metanate.com) by email.metanate.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oVstA-0005SN-UV; Wed, 07 Sep 2022 12:06:38 +0100 From: John Keeping To: Anatolij Gustschin Cc: John Keeping , =?UTF-8?q?Yannick=20Fertr=C3=A9?= , u-boot@lists.denx.de Subject: [PATCH v2] video: dw_mipi_dsi: fix [hv]sync active vs back porch Date: Wed, 7 Sep 2022 12:06:32 +0100 Message-Id: <20220907110632.1979716-1-john@metanate.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated: YES X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean The wrong fields are pulled out of the timings here so the values programmed into the DSI_VID_HSA_LINES/DSI_VID_HBP_LINES and DSI_VID_VSA_LINES/DSI_VID_VBP_LINES registers are swapped. Use the right fields so that the correct values are programmed. Fixes: d4f7ea83fc ("video: add MIPI DSI host controller bridge") Signed-off-by: John Keeping --- v2: - Fix hsync/hbp as well as vsync/vbp drivers/video/dw_mipi_dsi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c index a5b38acabd..6d9c5a9476 100644 --- a/drivers/video/dw_mipi_dsi.c +++ b/drivers/video/dw_mipi_dsi.c @@ -621,8 +621,8 @@ static void dw_mipi_dsi_line_timer_config(struct dw_mipi_dsi *dsi, htotal = timings->hactive.typ + timings->hfront_porch.typ + timings->hback_porch.typ + timings->hsync_len.typ; - hsa = timings->hback_porch.typ; - hbp = timings->hsync_len.typ; + hsa = timings->hsync_len.typ; + hbp = timings->hback_porch.typ; /* * TODO dw drv improvements @@ -644,9 +644,9 @@ static void dw_mipi_dsi_vertical_timing_config(struct dw_mipi_dsi *dsi, u32 vactive, vsa, vfp, vbp; vactive = timings->vactive.typ; - vsa = timings->vback_porch.typ; + vsa = timings->vsync_len.typ; vfp = timings->vfront_porch.typ; - vbp = timings->vsync_len.typ; + vbp = timings->vback_porch.typ; dsi_write(dsi, DSI_VID_VACTIVE_LINES, vactive); dsi_write(dsi, DSI_VID_VSA_LINES, vsa); -- 2.37.3