Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Suraj Kandpal <suraj.kandpal@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, uma.shankar@intel.com,
	william.tseng@intel.com, jani.nikula@intel.com,
	Suraj Kandpal <suraj.kandpal@intel.com>
Subject: [PATCH] drm/i915/vdsc: Use the DSC config tables for DSI panels
Date: Fri, 28 Feb 2025 10:40:41 +0530	[thread overview]
Message-ID: <20250228051041.397020-1-suraj.kandpal@intel.com> (raw)

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]

--v3
-Add Signed-off-by from William too [Ankit]

--v4
-Use a function to check Mipi dsi dsc 1.1 condition [Ankit]
-Add documentation for using this condition [Ankit]
-Rebase

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13719
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: William Tseng <william.tseng@intel.com>
---
 drivers/gpu/drm/i915/display/intel_vdsc.c | 15 ++++++++++++++-
 1 file changed, 14 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..2a6706517cfa 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
@@ -259,6 +259,13 @@ static int intel_dsc_slice_dimensions_valid(struct intel_crtc_state *pipe_config
 	return 0;
 }
 
+static bool is_mipi_dsi_dsc_1_1(struct drm_dsc_config *vdsc_cfg,
+				struct intel_crtc_state *crtc_state)
+{
+	return 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 +324,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 (DISPLAY_VER(display) >= 13) {
+	if (DISPLAY_VER(display) >= 13 &&
+	    !is_mipi_dsi_dsc_1_1(vdsc_cfg, pipe_config)) {
 		calculate_rc_params(vdsc_cfg);
 	} else {
 		if ((compressed_bpp == 8 ||
-- 
2.34.1


             reply	other threads:[~2025-02-28  5:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28  5:10 Suraj Kandpal [this message]
2025-02-28  5:41 ` ✓ CI.Patch_applied: success for drm/i915/vdsc: Use the DSC config tables for DSI panels (rev4) Patchwork
2025-02-28  5:41 ` ✓ CI.checkpatch: " Patchwork
2025-02-28  5:42 ` ✓ CI.KUnit: " Patchwork
2025-02-28  5:59 ` ✓ CI.Build: " Patchwork
2025-02-28  6:01 ` ✓ CI.Hooks: " Patchwork
2025-02-28  6:03 ` ✓ CI.checksparse: " Patchwork
2025-02-28  6:22 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-28  9:15 ` [PATCH] drm/i915/vdsc: Use the DSC config tables for DSI panels Jani Nikula
2025-02-28 11:37 ` ✗ Xe.CI.Full: failure for drm/i915/vdsc: Use the DSC config tables for DSI panels (rev4) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-02-28 15:25 [PATCH] drm/i915/vdsc: Use the DSC config tables for DSI panels Suraj Kandpal
2025-03-11  5:33 ` Nautiyal, Ankit K
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=20250228051041.397020-1-suraj.kandpal@intel.com \
    --to=suraj.kandpal@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@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