[PATCH v4 5/7] drm/omapdrm: Use drm_crtc_enable_color_mgmt() to enable gamma properties
Jyri Sarha
jsarha at ti.com
Wed May 25 20:43:28 UTC 2016
Use new drm_crtc_enable_color_mgmt() to enable gamma lut properties.
Signed-off-by: Jyri Sarha <jsarha at ti.com>
---
drivers/gpu/drm/omapdrm/omap_crtc.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 5b7f6f5..e03b349 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -556,16 +556,10 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
* gamma table is not supprted.
*/
if (dispc_mgr_gamma_size(channel)) {
- struct drm_mode_config *config = &dev->mode_config;
- uint gamma_size = 256;
+ uint gamma_lut_size = 256;
- drm_mode_crtc_set_gamma_size(crtc, gamma_size);
-
- drm_object_attach_property(&crtc->base,
- config->gamma_lut_property, 0);
- drm_object_attach_property(&crtc->base,
- config->gamma_lut_size_property,
- gamma_size);
+ drm_crtc_enable_color_mgmt(crtc, 0, false, gamma_lut_size);
+ drm_mode_crtc_set_gamma_size(crtc, gamma_lut_size);
}
omap_plane_install_properties(crtc->primary, &crtc->base);
--
1.9.1
More information about the dri-devel
mailing list