All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/vdsc: Add bpc check in intel_dsc_compute_params
@ 2024-09-26  4:33 Suraj Kandpal
  2024-09-26  5:00 ` Borah, Chaitanya Kumar
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Suraj Kandpal @ 2024-09-26  4:33 UTC (permalink / raw)
  To: intel-gfx; +Cc: ankit.k.nautiyal, Suraj Kandpal

DSC does not support bpc under 8. Return an error if that
happens to be the case.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/intel_vdsc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
index 8158e3702ed5..39bf8bee106c 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
@@ -297,6 +297,11 @@ int intel_dsc_compute_params(struct intel_crtc_state *pipe_config)
 
 	vdsc_cfg->bits_per_pixel = pipe_config->dsc.compressed_bpp_x16;
 
+	if (vdsc_cfg->bites_per_pixel < 8) {
+		drm_dbg_kms(&dev_priv->drm, "DSC bpc requirements not met\n");
+		return -EINVAL;
+	}
+
 	/*
 	 * According to DSC 1.2 specs in Section 4.1 if native_420 is set
 	 * we need to double the current bpp.
-- 
2.43.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-09-30 13:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26  4:33 [PATCH] drm/i915/vdsc: Add bpc check in intel_dsc_compute_params Suraj Kandpal
2024-09-26  5:00 ` Borah, Chaitanya Kumar
2024-09-26  5:13   ` Kandpal, Suraj
2024-09-26  5:14 ` Suraj Kandpal
2024-09-26  5:26 ` Srikanth V, NagaVenkata
2024-09-26  5:33 ` Suraj Kandpal
2024-09-26  5:52   ` Borah, Chaitanya Kumar
2024-09-26  7:59   ` Jani Nikula
2024-09-26  8:13   ` Suraj Kandpal
2024-09-27 19:12 ` ✓ Fi.CI.BAT: success for drm/i915/vdsc: Add bpc check in intel_dsc_compute_params (rev4) Patchwork
2024-09-28 20:04 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-09-30 13:42 ` ✓ Fi.CI.IGT: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.