From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [5.144.164.169]) (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 22F93372684 for ; Sun, 29 Mar 2026 18:42:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=5.144.164.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774809738; cv=none; b=HXfUyxpR9mhLltI23QqV+d5EglRD6l+RG7LAI7lRSTICKSTYmTD69saVFzPzViPBkvrrwa/tCyhKIWcKf6BF/d5H9ePor+knAs3fn3hf1k0XJV0P3qDir8ix0IJviEpBae8xUkqwSh6fP08mdZOVbCevdt/NePy89BhdwhBfA34= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774809738; c=relaxed/simple; bh=D4pbv9Nl3bhKqdID2nmTehSOb5LNRurbrkbgm4lLBJk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hz9qb+lie+lzAsI1McGD9JJtFo/15J7r5bUKTnuGKJ+bzG1nmgAeaqlo79u/uOymT9OisLS+OLzvX9citjNuteN25gltW8Esp2b360hTwc0IGC71BUftyB16HD37OpiK8EjayODtHraYU8kFO1GO6RGb0HzPKUfsXEhkoFmulVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org; spf=pass smtp.mailfrom=somainline.org; arc=none smtp.client-ip=5.144.164.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=somainline.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=somainline.org 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 C5E213F727; Sun, 29 Mar 2026 20:04:30 +0200 (CEST) Date: Sun, 29 Mar 2026 20:04:29 +0200 From: Marijn Suijten To: Pengyu Luo Cc: Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , David Airlie , Simona Vetter , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] drm/msm/dsi: fix hdisplay calculation for CMD mode panel Message-ID: References: <20260307111250.105772-1-mitltlatltl@gmail.com> <20260307111250.105772-2-mitltlatltl@gmail.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260307111250.105772-2-mitltlatltl@gmail.com> On 2026-03-07 19:12:49, Pengyu Luo wrote: > ac47870fd795 incorrecly broke hdisplay calculation for CMD mode, fix > it. Where's the what/how/why? This commit message explains exactly nothing while a description is a requirement for submitting patches upstream: https://docs.kernel.org/process/submitting-patches.html#describe-your-changes Take my version of this patch as an example. > > Fixes: ac47870fd795 ("drm/msm/dsi: fix hdisplay calculation when programming dsi registers") > Signed-off-by: Pengyu Luo > --- > drivers/gpu/drm/msm/dsi/dsi_host.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c > index 7c16216e8b..f63165c7ce 100644 > --- a/drivers/gpu/drm/msm/dsi/dsi_host.c > +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c > @@ -1016,8 +1016,9 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi) > /* > * DPU sends 3 bytes per pclk cycle to DSI. If widebus is > * 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. > + * pclk and on average, for video mode, DSI consumes only an > + * amount of compressed data equivalent to the uncompressed > + * pixel depth per pclk. This needs a source and justification (in the commit message). For most panels where bpc is simply 8, the resulting rate is the same as when widebus is disabled, meaning that widebus has no effect on the pclk rate in video-mode? - Marijn > * > * Calculate the number of pclks needed to transmit one line of > * the compressed data. > @@ -1029,10 +1030,14 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi) > * unused anyway. > */ > h_total -= hdisplay; > - if (wide_bus_enabled) > - bits_per_pclk = dsc->bits_per_component * 3; > - else > + if (wide_bus_enabled) { > + if (msm_host->mode_flags & MIPI_DSI_MODE_VIDEO) > + bits_per_pclk = dsc->bits_per_component * 3; > + else > + bits_per_pclk = 48; > + } else { > bits_per_pclk = 24; > + } > > hdisplay = DIV_ROUND_UP(msm_dsc_get_bytes_per_line(msm_host->dsc) * 8, bits_per_pclk); > > -- > 2.53.0 >