From: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH v2] drm/i915/dp: Correct max compressed bpp bounds by using link bpp
Date: Fri, 17 Jan 2025 10:37:13 +0530 [thread overview]
Message-ID: <20250117050713.152012-1-ankit.k.nautiyal@intel.com> (raw)
While setting the bounds for compressed bpp, we ensure that the
compressed bpp is less than the pipe bpp.
This causes an issue with the 420 output format, where the effective
link bpp (or output bpp) is half that of the pipe bpp. Therefore instead
of using pipe bpp, use the output bpp to set the bounds for the
compressed bpp.
v2: Use identifier output_bpp instead of link_bpp (Imre)
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 1ad25c37f3c2..f390216824cd 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2068,9 +2068,10 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp,
int timeslots)
{
int i, ret;
+ int output_bpp = intel_dp_output_bpp(pipe_config->output_format, pipe_bpp);
/* Compressed BPP should be less than the Input DSC bpp */
- dsc_max_bpp = min(dsc_max_bpp, pipe_bpp - 1);
+ 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)
@@ -2111,6 +2112,7 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp,
{
struct intel_display *display = to_intel_display(intel_dp);
u8 bppx16_incr = drm_dp_dsc_sink_bpp_incr(connector->dp.dsc_dpcd);
+ int output_bpp = intel_dp_output_bpp(pipe_config->output_format, pipe_bpp);
u16 compressed_bppx16;
u8 bppx16_step;
int ret;
@@ -2121,7 +2123,7 @@ xelpd_dsc_compute_link_config(struct intel_dp *intel_dp,
bppx16_step = 16 / bppx16_incr;
/* Compressed BPP should be less than the Input DSC bpp */
- dsc_max_bpp = min(dsc_max_bpp << 4, (pipe_bpp << 4) - bppx16_step);
+ dsc_max_bpp = min(dsc_max_bpp << 4, (output_bpp << 4) - bppx16_step);
dsc_min_bpp = dsc_min_bpp << 4;
for (compressed_bppx16 = dsc_max_bpp;
--
2.45.2
next reply other threads:[~2025-01-17 5:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 5:07 Ankit Nautiyal [this message]
2025-01-17 6:04 ` ✓ CI.Patch_applied: success for drm/i915/dp: Correct max compressed bpp bounds by using link bpp (rev2) Patchwork
2025-01-17 6:04 ` ✓ CI.checkpatch: " Patchwork
2025-01-17 6:05 ` ✓ CI.KUnit: " Patchwork
2025-01-17 6:24 ` ✓ CI.Build: " Patchwork
2025-01-17 6:26 ` ✓ CI.Hooks: " Patchwork
2025-01-17 6:27 ` ✓ CI.checksparse: " Patchwork
2025-01-17 6:53 ` ✓ Xe.CI.BAT: " Patchwork
2025-01-17 14:00 ` ✗ Xe.CI.Full: failure " 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=20250117050713.152012-1-ankit.k.nautiyal@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.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