Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
	<intel-xe@lists.freedesktop.org>,
	 <intel-gfx@lists.freedesktop.org>
Cc: <uma.shankar@intel.com>, <william.tseng@intel.com>,
	<jani.nikula@intel.com>
Subject: Re: [PATCH] drm/i915/vdsc: Use the DSC config tables for DSI panels
Date: Tue, 11 Mar 2025 11:03:20 +0530	[thread overview]
Message-ID: <df831f85-72b6-4530-9ea1-eceef67de304@intel.com> (raw)
In-Reply-To: <20250228152531.403026-1-suraj.kandpal@intel.com>


On 2/28/2025 8:55 PM, Suraj Kandpal wrote:
> Some DSI panel vendors end up hardcoding PPS params because of which
> it does not listen to the params sent from the source. We use the
> default config tables for DSI panels when using DSC 1.1 rather than
> calculate our own rc parameters.
>
> --v2
> -Use intel_crtc_has_type [Jani]
>
> --v4
> -Use a function to check Mipi dsi dsc 1.1 condition [Ankit]
> -Add documentation for using this condition [Ankit]
> -Rebase
>
> --v5
> -Pass only the crtc_state [Jani]
> -Fixup the comment [Jani]
> -Check for dsc major version [Jani]
> -Use co-developed-by tag [Jani]
>
> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13719
> Co-developed-by: William Tseng <william.tseng@intel.com>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_vdsc.c | 17 ++++++++++++++++-
>   1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
> index 3ed64c17bdff..04ba9f6b7ea2 100644
> --- a/drivers/gpu/drm/i915/display/intel_vdsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
> @@ -259,6 +259,15 @@ static int intel_dsc_slice_dimensions_valid(struct intel_crtc_state *pipe_config
>   	return 0;
>   }
>   
> +static bool is_dsi_dsc_1_1(struct intel_crtc_state *crtc_state)
> +{
> +	struct drm_dsc_config *vdsc_cfg = &crtc_state->dsc.config;
> +
> +	return vdsc_cfg->dsc_version_major == 1 &&
> +		vdsc_cfg->dsc_version_minor == 1 &&
> +		intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI);
> +}
> +
>   int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)
>   {
>   	struct intel_display *display = to_intel_display(pipe_config);
> @@ -317,8 +326,14 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)
>   	 * From XE_LPD onwards we supports compression bpps in steps of 1
>   	 * upto uncompressed bpp-1, hence add calculations for all the rc
>   	 * parameters
> +	 *
> +	 * We also don't want to calculate all rc parameters when the panel
> +	 * is MIPI DSI and it's using DSC 1.1. The reason being that some
> +	 * DSI panels vendors have hardcoded PPS params in the VBT causing
> +	 * the parameters sent from the source to be ignore. This causes a
> +	 * noise in the display.

If I understand correctly, the issue is seen because in 
calculate_rc_params() we are interpolating some of the params for 
varying DSC variables like bits_per_pixel.

The derived params though based on the DSC1.2a C-Model, may have a bit 
difference from the original parameters set which generally is fine and 
is known to be working.

However for some DSI panels that support DSC1.1, few of the PPS params 
are hard coded. Due to this, there is some mismatch with derived rc 
parameters with the parameters the panel expects.

Furthermore for DSI panels we are currently using  bits_per_pixel 
(compressed bpp) hardcoded from VBT, (unlike other encoders where we 
find the optimum compressed bpp) so dont need to rely on interpolation, 
as we can get the required rc parameters from the tables.

So for such a case it makes sense to avoid using calculate_rc_params and 
fallback to the specific rc parameters from the table.

Perhaps we can document some of this as this is not vert explicit from 
comment.


In any case the change looks good to me.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>


>   	 */
> -	if (DISPLAY_VER(display) >= 13) {
> +	if (DISPLAY_VER(display) >= 13 && !is_dsi_dsc_1_1(pipe_config)) {
>   		calculate_rc_params(vdsc_cfg);
>   	} else {
>   		if ((compressed_bpp == 8 ||

  parent reply	other threads:[~2025-03-11  5:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 15:25 [PATCH] drm/i915/vdsc: Use the DSC config tables for DSI panels Suraj Kandpal
2025-02-28 17:59 ` ✓ CI.Patch_applied: success for drm/i915/vdsc: Use the DSC config tables for DSI panels (rev5) Patchwork
2025-02-28 18:00 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-28 18:02 ` ✓ CI.KUnit: success " Patchwork
2025-02-28 18:22 ` ✓ CI.Build: " Patchwork
2025-02-28 18:25 ` ✓ CI.Hooks: " Patchwork
2025-02-28 18:26 ` ✓ CI.checksparse: " Patchwork
2025-02-28 18:44 ` ✓ Xe.CI.BAT: " Patchwork
2025-03-01  0:49 ` ✗ Xe.CI.Full: failure " Patchwork
2025-03-11  5:33 ` Nautiyal, Ankit K [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-28  5:10 [PATCH] drm/i915/vdsc: Use the DSC config tables for DSI panels Suraj Kandpal
2025-02-28  9:15 ` Jani Nikula
2025-02-28  1:15 Yu, Gareth
2025-02-27 11:26 Suraj Kandpal
2025-02-28  4:37 ` Nautiyal, Ankit K
2025-02-28  4:47   ` Kandpal, Suraj
2025-02-27 10:49 Suraj Kandpal
2025-02-27  9:53 Suraj Kandpal
2025-02-27 10:42 ` Jani Nikula
2025-02-27 10:45   ` Kandpal, Suraj

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=df831f85-72b6-4530-9ea1-eceef67de304@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=suraj.kandpal@intel.com \
    --cc=uma.shankar@intel.com \
    --cc=william.tseng@intel.com \
    /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