[PATCH] drm/i915/dp: Limit max_requested_bpc based on src DSC bpc limits
Ankit Nautiyal
ankit.k.nautiyal at intel.com
Wed Oct 18 05:05:13 UTC 2023
At the moment the max requested bpc is limited to 6 to 10/12.
For platforms that support DSC, min and max src bpc with DSC are
different.
Account for DSC bpc limitations, when setting min and max value for
max_requested_bpc property.
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 4f6835a7578e..076cb9e443de 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5869,8 +5869,16 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
intel_attach_broadcast_rgb_property(connector);
if (HAS_GMCH(dev_priv))
drm_connector_attach_max_bpc_property(connector, 6, 10);
- else if (DISPLAY_VER(dev_priv) >= 5)
- drm_connector_attach_max_bpc_property(connector, 6, 12);
+ else if (DISPLAY_VER(dev_priv) >= 5) {
+ int min_bpc = 6, max_bpc = 12;
+
+ if (HAS_DSC(dev_priv) && drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd)) {
+ min_bpc = intel_dp_dsc_min_src_input_bpc(dev_priv);
+ max_bpc = intel_dp_dsc_max_src_input_bpc(dev_priv);
+ }
+
+ drm_connector_attach_max_bpc_property(connector, min_bpc, max_bpc);
+ }
/* Register HDMI colorspace for case of lspcon */
if (intel_bios_encoder_is_lspcon(dp_to_dig_port(intel_dp)->base.devdata)) {
--
2.40.1
More information about the Intel-gfx-trybot
mailing list