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 BAB68FED2CC for ; Thu, 12 Mar 2026 05:10:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CCD1810E41D; Thu, 12 Mar 2026 05:10:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="HgAUOKXW"; dkim-atps=neutral Received: from mail-vk1-f169.google.com (mail-vk1-f169.google.com [209.85.221.169]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8FCFC10E41D for ; Thu, 12 Mar 2026 05:10:31 +0000 (UTC) Received: by mail-vk1-f169.google.com with SMTP id 71dfb90a1353d-56b255b1dd0so614213e0c.2 for ; Wed, 11 Mar 2026 22:10:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773292230; cv=none; d=google.com; s=arc-20240605; b=GZTj+goMZ88nzgGCYaJ7nW8PiYD1olO1XcwOmAozG6bw61t0PbZaSW6N2TUnxZzQ9O UGGi6FXfxsiqE7SJX95bMOskV7B+Ul87pWiMDXL7vyvhEXtOni/Gg1kK0GjmmchI4FHZ ezCtwyMIqLOkkWY0fkqCPjdhgPDPmBst7qn/tS35fFC5ka2wTolKJ4bbi5DXx5Cr9s0P mHYyIfmY+G50eF+lwJLY5Cs22emCYcgq6l7N6Nwn/b0Zp+P9uKZtYPNs3Ze2b+rEBBNr pUGOFKMys8m5S0xA7TEiHopBkJXZzVNVY+s7Z7N2JdIhFc0Q51cY28DgA1AlrFRKEgws 6fqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=PWcvi8r5zhb1XtI8LQ0y1u0RL/IpsZ2+XzabNVzn4i0=; fh=Bxala1TRtALIOsm+8jkxIROUOUQD+PL/MnMnwYwdiYA=; b=CnbkYzqHoHnGoWPXTQ9ym9b+cj6RSRXMNk6pDaSfQBK2/yib/8tCFS0ffwOdMW+VJD PtTwE8UjUgh88x8vg3Cm29rAeqr9WWtbQSZQiuOiyVFSbwuY+DHniOuMVuIUzIZhJMP7 f3U0rzkqdSh52Hsb5qFOgxaN0JWnelaRxlCFbykHjCSOdY5eJ98APnv6MkRjw29CRYJ+ MVeXUbGKOl8rPCqwEcBeeAsfZozHe18Q7myz4mI0FA416WxGPXJ+dklJRmQVPl0YrYmR 0ZSujxKvpGJKARBnfLF5HFf0zGv80zq1hEmsTX6JIWBqXJv8lkBeuJn6LzUVGb4a0HuX lNWQ==; darn=lists.freedesktop.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773292230; x=1773897030; darn=lists.freedesktop.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=PWcvi8r5zhb1XtI8LQ0y1u0RL/IpsZ2+XzabNVzn4i0=; b=HgAUOKXW7l1Gg5JglodqCDDWrcRI3TYCEBRTza0u17C6pGaRpBfPoLS+qKfA80cUmi k+Hs2PKHa/BfLpvhKh3oeGwwahUzUr2GKPZSKvNsHNKlTQlsW7jV/RkE0lEA5hc07P1G PN/yfcy/67gD/XXkNFMaGzf9eO8aVZ50KjNgeMeRV79Z8ym/gERmnUM4QMLRVh4Wxp7t UgKqErXO96ivOLZh6EwTXBtpH/C0RnDi76BvHNaXZkhrc6pjlpg5Czxt8h1DDUR2ryhb hKPfsDkHj4Z9vlB5CztvbZmcKiIk7kQ1tB/iCvITi8iQzkYRrt/BYB14eS13xXfJCQb1 Fpdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773292230; x=1773897030; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=PWcvi8r5zhb1XtI8LQ0y1u0RL/IpsZ2+XzabNVzn4i0=; b=e8I+gjKMQxLKp4ysPupcdMhns7+N2ZvDqKO7gaFBW67WfM3GwswFW+OdtmVFF/sHuk X26vm4rNuvBH+cfJE4BZ9pjYl0FzLyWt4F16P5o89Z7m4I2S2dhjr0qqIgL0ET5amN38 RnKfn0KCMhgxeZIccUvDeXvoYw7bejzU5yJd9RNK/0cG4D/42WPHY0SMGHDbmornFJth FgLOJEI//dXcVUQuLED4p6f+qAoRxvciF1pXLC+qtMNUCsDd6UvEjardIZ8zAHEysujw 61iaowV1B51qR8/Xx2eCNtknUgejojC4Md0wBXC0CBbAe5k4/+FRHHs3xcMyRuMz7Opq M+6g== X-Forwarded-Encrypted: i=1; AJvYcCXknSAPCYV3+WtBlG5Me2Lq3EL4+3pmPYxc3KKz4bqwo007GgII09GkX8Yt0Uv3CKt3Xkz257YIa2U=@lists.freedesktop.org X-Gm-Message-State: AOJu0Yw8cFEkfevxZMjmOnRJpOfnIcNUq1e3Ml6fNUnsPuMWibq2oAYl PEAy8P0jngM1X8T3yaxi+DoY0ReHzohVwmSDXJCvZF6mlazA1ggBPb6KAY6lYNw1Elk9qK3zRwx md19P0vaJ+jX5icp/aoH+uwENLdyBaQk= X-Gm-Gg: ATEYQzxrhm6+fZgXAC8Iq2dauhADp1CfJvlxw6VcpfDSMaCLbaLG2r364+SW0gY5God ZBag3b9Z86gAs/Lvg12MVxDHudQLMjJAA489+m3DtJrJs2GJlTFBjyI0CyAjyN+5Gy8V+GXglQX /X95yURJx70YNpLNEmgBmBVlSZL1H9Z3zi9cZuFTEgxklsE4q07UTRotGrzNY1LHSWYw4VOtrp1 002RHdROCA7vh6ba6SeA+rvnqOAJ684RUhsjpuSAX9pWudIzOb+YmXF2iXoBy83UAlbTfoRkRAB Onq1C86/ X-Received: by 2002:a05:6122:905:b0:559:ed61:4693 with SMTP id 71dfb90a1353d-56b47502a82mr1980826e0c.10.1773292230367; Wed, 11 Mar 2026 22:10:30 -0700 (PDT) MIME-Version: 1.0 References: <20260311-dsi-dsc-regresses-again-v1-1-6a422141eeea@somainline.org> In-Reply-To: <20260311-dsi-dsc-regresses-again-v1-1-6a422141eeea@somainline.org> From: Pengyu Luo Date: Thu, 12 Mar 2026 13:10:07 +0800 X-Gm-Features: AaiRm5032nIOTt8byfCch6Yp4UmYC08WVVLg9N-eS-xixBXOUFqlyg4aKIp8AV0 Message-ID: Subject: Re: [PATCH] drm/msm/dsi: Restore widebus calculation for CMDMode panels To: Marijn Suijten Cc: Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , David Airlie , Simona Vetter , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Thu, Mar 12, 2026 at 6:31=E2=80=AFAM Marijn Suijten wrote: > > Commit ac47870fd795 ("drm/msm/dsi: fix hdisplay calculation when > programming dsi registers") makes a false and ungrounded statement that > "Since CMD mode does not use this, we can remove !(msm_host->mode_flags > & MIPI_DSI_MODE_VIDEO) safely." which isn't the case at all. > dsi_timing_setup() affects both command mode and video mode panels, and > by no longer having any path that sets bits_per_pclk =3D 48 (contrary to > the updated code-comment) all DSI DSC panels on SM8350 and above (i.e. > with widebus support) regress thanks to this patch. > > The entire reason that video mode was originally omitted from this code > path is because it was never tested before; any change that enables > widebus for video mode panels should not regress the command mode path. > > Thus add back the path allows 6 bytes or 48 bits to be sent per pclk > on command mode DSI panels with widebus, restoring the panel on devices > like the Sony Xperia 1 III and upwards. > > Fixes: ac47870fd795 ("drm/msm/dsi: fix hdisplay calculation when programm= ing dsi registers") > Signed-off-by: Marijn Suijten > --- Apologies, I messed up, I had sent the same fixes days ago. https://lore.kernel.org/linux-arm-msm/20260307111250.105772-2-mitltlatltl@g= mail.com/ > In addition I can't say I understand the original commit message > at all; it mentions a BPC=3D10 mode however the highest format that > mipi_dsi_pixel_format_to_bpp supports is RGB888 thus it won't > ever return anything above 24, which is the original amount the > non-command-mode path defaulted to (regardless of widebus)... Was that > patch doing anything for video mode at all? > RGB888 is the dst bpc, which is tied to qcom,mdss-dsi-bpp in the downstream= . Actually, we should use src bpc here, another fixe https://lore.kernel.org/linux-arm-msm/20260307111250.105772-1-mitltlatltl@g= mail.com/ > It feels like the conditional introduced here is only making things more > confusing, but I don't have enough input to confirm what the video-mode > path should be doing in widebus mode (multiply BPC by the number of > components and by 2 in case of widebus?). I left a comment. For CMD mode, it consumes 6 bytes, for Video mode, * DPU sends 3 bytes per pclk cycle to DSI. If widebus is - * enabled, bus width is extended to 6 bytes. + * enabled, MDP always sends out 48-bit compressed data per + * pclk and on average, DSI consumes an amount of compressed + * data equivalent to the uncompressed pixel depth per pclk. Best wishes, Pengyu Luo