Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: imre.deak@intel.com, jani.nikula@intel.com,
	Ankit Nautiyal <ankit.k.nautiyal@intel.com>,
	stable@vger.kernel.org
Subject: [PATCH 01/14] drm/i915/dp: Iterate DSC BPP from high to low on all platforms
Date: Fri, 31 Jan 2025 14:49:54 +0200	[thread overview]
Message-ID: <3bba67923cbcd13a59d26ef5fa4bb042b13c8a9b.1738327620.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1738327620.git.jani.nikula@intel.com>

Commit 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best
compressed bpp") tries to find the best compressed bpp for the
link. However, it iterates from max to min bpp on display 13+, and from
min to max on other platforms. This presumably leads to minimum
compressed bpp always being chosen on display 11-12.

Iterate from high to low on all platforms to actually use the best
possible compressed bpp.

Fixes: 1c56e9a39833 ("drm/i915/dp: Get optimal link config to have best compressed bpp")
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: <stable@vger.kernel.org> # v6.7+
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index d1b4fd542a1f..ecf192262eb9 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2073,11 +2073,10 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp,
 	/* Compressed BPP should be less than the Input DSC bpp */
 	dsc_max_bpp = min(dsc_max_bpp, output_bpp - 1);
 
-	for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {
-		if (valid_dsc_bpp[i] < dsc_min_bpp)
+	for (i = ARRAY_SIZE(valid_dsc_bpp) - 1; i >= 0; i--) {
+		if (valid_dsc_bpp[i] < dsc_min_bpp ||
+		    valid_dsc_bpp[i] > dsc_max_bpp)
 			continue;
-		if (valid_dsc_bpp[i] > dsc_max_bpp)
-			break;
 
 		ret = dsc_compute_link_config(intel_dp,
 					      pipe_config,
-- 
2.39.5


  reply	other threads:[~2025-01-31 12:50 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31 12:49 [PATCH 00/14] drm/i915/dp: dsc fix, refactoring and cleanups Jani Nikula
2025-01-31 12:49 ` Jani Nikula [this message]
2025-01-31 13:32   ` [PATCH 01/14] drm/i915/dp: Iterate DSC BPP from high to low on all platforms Imre Deak
2025-02-03 14:46     ` Jani Nikula
2025-01-31 16:13   ` Nautiyal, Ankit K
2025-01-31 12:49 ` [PATCH 02/14] drm/i915/dp: Add intel_dp_dsc_bpp_step_x16() helper to get DSC BPP precision Jani Nikula
2025-01-31 13:45   ` Imre Deak
2025-01-31 14:06     ` Jani Nikula
2025-01-31 23:28   ` [PATCH v2] " Jani Nikula
2025-01-31 12:49 ` [PATCH 03/14] drm/i915/dp: Rename some variables in xelpd_dsc_compute_link_config() Jani Nikula
2025-01-31 13:57   ` Imre Deak
2025-01-31 12:49 ` [PATCH 04/14] drm/i915/dp: Pass .4 BPP values to {icl, xelpd}_dsc_compute_link_config() Jani Nikula
2025-01-31 14:05   ` [PATCH 04/14] drm/i915/dp: Pass .4 BPP values to {icl,xelpd}_dsc_compute_link_config() Imre Deak
2025-01-31 12:49 ` [PATCH 05/14] drm/i915/dp: Move max DSC BPP reduction one level higher Jani Nikula
2025-01-31 14:26   ` Imre Deak
2025-01-31 12:49 ` [PATCH 06/14] drm/i915/dp: Change icl_dsc_compute_link_config() DSC BPP iteration Jani Nikula
2025-01-31 14:30   ` Imre Deak
2025-01-31 12:50 ` [PATCH 07/14] drm/i915/dp: Move force_dsc_fractional_bpp_en check to intel_dp_dsc_valid_bpp() Jani Nikula
2025-01-31 14:32   ` Imre Deak
2025-01-31 12:50 ` [PATCH 08/14] drm/i915/dp: Unify DSC link config functions Jani Nikula
2025-01-31 14:35   ` Imre Deak
2025-01-31 12:50 ` [PATCH 09/14] drm/i915/dp: Inline do_dsc_compute_compressed_bpp() Jani Nikula
2025-01-31 14:48   ` Imre Deak
2025-01-31 12:50 ` [PATCH 10/14] drm/i915/dp: Simplify input BPP checks in intel_dp_dsc_compute_pipe_bpp() Jani Nikula
2025-01-31 14:52   ` Imre Deak
2025-01-31 12:50 ` [PATCH 11/14] drm/i915/dp: Use int for compressed BPP in dsc_compute_link_config() Jani Nikula
2025-01-31 15:08   ` Imre Deak
2025-01-31 15:27     ` Imre Deak
2025-01-31 12:50 ` [PATCH 12/14] drm/i915/dp: Drop compute_pipe_bpp parameter from intel_dp_dsc_compute_config() Jani Nikula
2025-01-31 15:10   ` Imre Deak
2025-01-31 12:50 ` [PATCH 13/14] drm/i915/dp: Pass connector state all the way to dsc_compute_link_config() Jani Nikula
2025-01-31 15:38   ` Imre Deak
2025-01-31 12:50 ` [PATCH 14/14] drm/i915/mst: Convert intel_dp_mtp_tu_compute_config() to .4 format Jani Nikula
2025-01-31 15:46   ` Imre Deak
2025-01-31 12:57 ` ✓ CI.Patch_applied: success for drm/i915/dp: dsc fix, refactoring and cleanups Patchwork
2025-01-31 12:57 ` ✗ CI.checkpatch: warning " Patchwork
2025-01-31 12:58 ` ✓ CI.KUnit: success " Patchwork
2025-01-31 13:15 ` ✓ CI.Build: " Patchwork
2025-01-31 13:17 ` ✓ CI.Hooks: " Patchwork
2025-01-31 13:18 ` ✗ CI.checksparse: warning " Patchwork
2025-01-31 13:38 ` ✓ Xe.CI.BAT: success " Patchwork
2025-01-31 17:34 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-01  0:24 ` ✗ CI.Patch_applied: failure for drm/i915/dp: dsc fix, refactoring and cleanups (rev2) Patchwork

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=3bba67923cbcd13a59d26ef5fa4bb042b13c8a9b.1738327620.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /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