From: Chaitanya Kumar Borah <chaitanya.kumar.bo...@intel.com>

The decision should be made based on the
DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE.
Right now the value of this cap is not passed on to the driver.

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.bo...@intel.com>
---
 drivers/gpu/drm/i915/display/skl_universal_plane.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c 
b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index e941e2e4fd14..7096ea8a3454 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -2424,12 +2424,14 @@ skl_universal_plane_create(struct drm_i915_private 
*dev_priv,
        if (DISPLAY_VER(dev_priv) >= 10)
                supported_csc |= BIT(DRM_COLOR_YCBCR_BT2020);
 
-       drm_plane_create_color_properties(&plane->base,
-                                         supported_csc,
-                                         BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) |
-                                         BIT(DRM_COLOR_YCBCR_FULL_RANGE),
-                                         DRM_COLOR_YCBCR_BT709,
-                                         DRM_COLOR_YCBCR_LIMITED_RANGE);
+       /* TODO: Make it based on client cap */
+       if (DISPLAY_VER(dev_priv) <= 11)
+               drm_plane_create_color_properties(&plane->base,
+                                                 supported_csc,
+                                                 
BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) |
+                                                 
BIT(DRM_COLOR_YCBCR_FULL_RANGE),
+                                                 DRM_COLOR_YCBCR_BT709,
+                                                 
DRM_COLOR_YCBCR_LIMITED_RANGE);
 
        drm_plane_create_alpha_property(&plane->base);
        drm_plane_create_blend_mode_property(&plane->base,
-- 
2.42.0

Reply via email to