[Intel-gfx] [v2 7/7] drm/i915: Attach gamma mode property

Uma Shankar uma.shankar at intel.com
Mon Apr 1 17:30:11 UTC 2019


Attach the gamma mode property to allow userspace
set the gamma mode and provide the luts for the
same.

Signed-off-by: Uma Shankar <uma.shankar at intel.com>
---
 drivers/gpu/drm/i915/intel_color.c   | 1 +
 drivers/gpu/drm/i915/intel_display.c | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index d7f835e..95c49d4 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -1529,6 +1529,7 @@ void intel_color_init(struct intel_crtc *crtc)
 			dev_priv->display.color_check = icl_color_check;
 
 			drm_crtc_attach_gamma_mode_caps_property(&crtc->base);
+			drm_crtc_attach_gamma_mode_property(&crtc->base);
 
 			/* don't advertize the >= 1.0 entries */
 			degamma_lut_size = 0;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3b62b2b..4cab112 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15606,8 +15606,10 @@ int intel_modeset_init(struct drm_device *dev)
 		      INTEL_INFO(dev_priv)->num_pipes,
 		      INTEL_INFO(dev_priv)->num_pipes > 1 ? "s" : "");
 
-	if (INTEL_GEN(dev_priv) >= 11)
+	if (INTEL_GEN(dev_priv) >= 11) {
 		drm_color_create_gamma_mode_caps_property(&dev_priv->drm, 4);
+		drm_color_create_gamma_mode_property(&dev_priv->drm, 0);
+	}
 
 	for_each_pipe(dev_priv, pipe) {
 		ret = intel_crtc_init(dev_priv, pipe);
-- 
1.9.1



More information about the Intel-gfx mailing list