intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] Add support for Color encoding YCBCR_BT2020
@ 2020-02-14 10:53 Kishore Kadiyala
  2020-02-14 11:25 ` Jani Nikula
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Kishore Kadiyala @ 2020-02-14 10:53 UTC (permalink / raw)
  To: intel-gfx; +Cc: Kishore Kadiyala

Currently the plane property doesn't have support for YCBCR_BT2020,
which enables the corresponding color conversion mode on plane CSC.

Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Cc: Uma Shankar <uma.shankar@intel.com>
---
 drivers/gpu/drm/i915/display/intel_sprite.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
index 7abeefe8dce5..5169a7260d7c 100644
--- a/drivers/gpu/drm/i915/display/intel_sprite.c
+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
@@ -3011,6 +3011,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
 	struct intel_plane *plane;
 	enum drm_plane_type plane_type;
 	unsigned int supported_rotations;
+	unsigned int supported_csc;
 	unsigned int possible_crtcs;
 	const u64 *modifiers;
 	const u32 *formats;
@@ -3088,9 +3089,13 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
 					   DRM_MODE_ROTATE_0,
 					   supported_rotations);
 
+	supported_csc = BIT(DRM_COLOR_YCBCR_BT601) | BIT(DRM_COLOR_YCBCR_BT709);
+
+	if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
+		supported_csc |= BIT(DRM_COLOR_YCBCR_BT2020);
+
 	drm_plane_create_color_properties(&plane->base,
-					  BIT(DRM_COLOR_YCBCR_BT601) |
-					  BIT(DRM_COLOR_YCBCR_BT709),
+					  supported_csc,
 					  BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) |
 					  BIT(DRM_COLOR_YCBCR_FULL_RANGE),
 					  DRM_COLOR_YCBCR_BT709,
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2020-02-17 18:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 10:53 [Intel-gfx] [PATCH] Add support for Color encoding YCBCR_BT2020 Kishore Kadiyala
2020-02-14 11:25 ` Jani Nikula
2020-02-17  3:09   ` Kadiyala, Kishore
2020-02-14 12:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2020-02-14 13:10 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2020-02-14 14:27   ` Shankar, Uma
2020-02-14 14:32     ` Ville Syrjälä
2020-02-14 14:57       ` Shankar, Uma
2020-02-17 18:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).