From patchwork Wed Sep 7 11:06:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 1675232 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=metanate.com header.i=@metanate.com header.a=rsa-sha256 header.s=stronger header.b=jKsDjCoS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MMzwV1079z1yhR for ; Wed, 7 Sep 2022 21:06:50 +1000 (AEST) 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_NONE,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 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_Fertr=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 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);