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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BC16BD3B7E5 for ; Mon, 29 Dec 2025 11:21:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C92C10E1BD; Mon, 29 Dec 2025 11:21:44 +0000 (UTC) Received: from relay05.th.seeweb.it (relay05.th.seeweb.it [5.144.164.166]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9248510E1BD for ; Mon, 29 Dec 2025 11:21:42 +0000 (UTC) Received: from SoMainline.org (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 5D1A53F76C; Mon, 29 Dec 2025 12:21:39 +0100 (CET) Date: Mon, 29 Dec 2025 12:21:37 +0100 From: Marijn Suijten To: Linus Walleij Cc: Neil Armstrong , Sam Ravnborg , David Airlie , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Simona Vetter , Casey Connolly , Rob Herring , Krzysztof Kozlowski , Simona Vetter , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Martin Botka , Jami Kettunen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Abhinav Kumar , Kuogee Hsieh , Jessica Zhang , AngeloGioacchino Del Regno , Konrad Dybcio , Konrad Dybcio , Dmitry Baryshkov Subject: Re: [PATCH v2 03/11] drm/panel: Add LGD LH599QH3-EDB1 panel driver for Sony Xperia XZ3 Message-ID: References: <20251222-drm-panels-sony-v2-0-82a87465d163@somainline.org> <20251222-drm-panels-sony-v2-3-82a87465d163@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 2025-12-26 14:12:25, Linus Walleij wrote: ... > > +static int lgd_lh599qh3_edb1_program(struct lgd_lh599qh3_edb1 *ctx) > > +{ > > + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi }; > > + > > + dsi_ctx.dsi->mode_flags |= MIPI_DSI_MODE_LPM; > > + > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x7f, 0x5a, 0x5a); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0x5a, 0x5a); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf1, 0x5a, 0x5a); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf2, 0x5a, 0x5a); > > Clearly an "unlock" sequence. > > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x02, 0x01); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x59, 0x01); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY, > > + WRITE_CONTROL_DISPLAY_BACKLIGHT); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x57, 0x20, 0x80, 0xde, 0x60, 0x00); > > + mipi_dsi_dcs_set_column_address_multi(&dsi_ctx, 0, 1440 - 1); > > + mipi_dsi_dcs_set_page_address_multi(&dsi_ctx, 0, 2880 - 1); > > + > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00); > > + > > + mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK); > > + > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x7f, 0x5a, 0x5a); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0x5a, 0x5a); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf1, 0x5a, 0x5a); > > + mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf2, 0x5a, 0x5a); > > Cleary another copy of the "unlock" sequence. > > Can you break it out to a subroutine? > lgd_lh599qh3_edb1_unlock()? Sure, though unsure where the "lock" sequence resides (and why it needs to be unlocked twice, unless this was autogenerated and is unnecessary, or implies a "flush" of sorts) or why it looks so familiar to the Samsung panels. Will rename it to lgd_lh599qh3_edb1_unlock_multi() and pass it a mipi_dsi_multi_context so that no extra return-code handling needs to be implemented. > +/- this nitpick: > Reviewed-by: Linus Walleij Just making sure, you reviewed the SOFEF01 driver with your Linaro address, which one do you prefer or should I keep this distinction? - Marijn