Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Jessica Zhang <quic_jesszhan@quicinc.com>,
	freedreno@lists.freedesktop.org
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Daniel Vetter <daniel@ffwll.ch>, Rob Clark <robdclark@gmail.com>,
	Abhinav Kumar <quic_abhinavk@quicinc.com>,
	Sean Paul <sean@poorly.run>,
	dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH RFC v2 5/6] drm/msm/dsi: Use MSM and DRM DSC helper methods
Date: Sun, 2 Apr 2023 14:29:50 +0300	[thread overview]
Message-ID: <deb5c8d2-2766-82ec-e116-f353fcb331f3@linaro.org> (raw)
In-Reply-To: <20230329-rfc-msm-dsc-helper-v2-5-3c13ced536b2@quicinc.com>

On 31/03/2023 21:49, Jessica Zhang wrote:
> Use MSM and DRM DSC helper methods to configure DSC for DSI.
> 
> Changes in V2:
> - *_calculate_initial_scale_value --> *_set_initial_scale_value
> - Split pkt_per_line and eol_byte_num changes to a separate patch
> - Moved pclk_per_line calculation to hdisplay adjustment in `if (dsc)`
>    block of dsi_update_dsc_timing()
> 
> Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com>
> ---
>   drivers/gpu/drm/msm/dsi/dsi_host.c | 11 ++++++++---
>   1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
> index 74d38f90398a..b7ab81737473 100644
> --- a/drivers/gpu/drm/msm/dsi/dsi_host.c
> +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
> @@ -28,6 +28,7 @@
>   #include "dsi.xml.h"
>   #include "sfpb.xml.h"
>   #include "dsi_cfg.h"
> +#include "msm_dsc_helper.h"
>   #include "msm_kms.h"
>   #include "msm_gem.h"
>   #include "phy/dsi_phy.h"
> @@ -848,7 +849,7 @@ static void dsi_update_dsc_timing(struct msm_dsi_host *msm_host, bool is_cmd_mod
>   	/* first calculate dsc parameters and then program
>   	 * compress mode registers
>   	 */
> -	slice_per_intf = DIV_ROUND_UP(hdisplay, dsc->slice_width);
> +	slice_per_intf = msm_dsc_get_slice_per_intf(dsc, hdisplay);
>   
>   	/*
>   	 * If slice_count is greater than slice_per_intf
> @@ -951,7 +952,11 @@ static void dsi_timing_setup(struct msm_dsi_host *msm_host, bool is_bonded_dsi)
>   		 * pulse width same
>   		 */
>   		h_total -= hdisplay;
> -		hdisplay /= 3;
> +		if (msm_host->mode_flags & MIPI_DSI_MODE_VIDEO)
> +			hdisplay = msm_dsc_get_uncompressed_pclk_per_line(dsc, hdisplay,
> +					dsi_get_bpp(msm_host->format)) / 3;
> +		else
> +			hdisplay /= 3;
>   		h_total += hdisplay;
>   		ha_end = ha_start + hdisplay;

This chunk changes the calculated value (two other are mere updates to 
use new functions). Please move it to a separate patch, add proper 
description/justification and possibly a Fixes tag, if the original code 
was incorrect.

>   	}
> @@ -1759,7 +1764,7 @@ static int dsi_populate_dsc_params(struct msm_dsi_host *msm_host, struct drm_dsc
>   		return ret;
>   	}
>   
> -	dsc->initial_scale_value = 32;
> +	drm_dsc_set_initial_scale_value(dsc);
>   	dsc->line_buf_depth = dsc->bits_per_component + 1;
>   
>   	return drm_dsc_compute_rc_parameters(dsc);
> 

-- 
With best wishes
Dmitry


  reply	other threads:[~2023-04-02 11:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-31 18:49 [PATCH RFC v2 0/6] Introduce MSM-specific DSC helpers Jessica Zhang
2023-03-31 18:49 ` [PATCH RFC v2 1/6] drm/display/dsc: Add flatness and initial scale value calculations Jessica Zhang
2023-04-01 10:01   ` Dmitry Baryshkov
2023-03-31 18:49 ` [PATCH RFC v2 2/6] drm/msm: Add MSM-specific DSC helper methods Jessica Zhang
2023-04-02 11:21   ` Dmitry Baryshkov
2023-04-03 21:38     ` Jessica Zhang
2023-04-04  0:33       ` Dmitry Baryshkov
2023-04-04 16:29         ` Jessica Zhang
2023-04-04 16:34           ` Dmitry Baryshkov
2023-04-04 17:05         ` Jessica Zhang
2023-03-31 18:49 ` [PATCH RFC v2 3/6] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness Jessica Zhang
2023-04-02 11:21   ` Dmitry Baryshkov
2023-03-31 18:49 ` [PATCH RFC v2 4/6] drm/msm/dpu: Fix slice_last_group_size calculation Jessica Zhang
2023-04-02 11:27   ` Dmitry Baryshkov
2023-04-03 21:45     ` Jessica Zhang
2023-04-03 21:51       ` Dmitry Baryshkov
2023-04-03 22:13         ` [Freedreno] " Jessica Zhang
2023-03-31 18:49 ` [PATCH RFC v2 5/6] drm/msm/dsi: Use MSM and DRM DSC helper methods Jessica Zhang
2023-04-02 11:29   ` Dmitry Baryshkov [this message]
2023-04-03 21:46     ` Jessica Zhang
2023-03-31 18:49 ` [PATCH RFC v2 6/6] drm/msm/dsi: Fix calculations for eol_byte_num and pkt_per_line Jessica Zhang
2023-04-02 11:34   ` Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=deb5c8d2-2766-82ec-e116-f353fcb331f3@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_jesszhan@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox