[PATCH 2/7] drm: make gamma_set optional

Sascha Hauer s.hauer at pengutronix.de
Wed Apr 11 08:33:43 PDT 2012


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/gpu/drm/drm_crtc.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index b14496e..75f66a5 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -3108,6 +3108,11 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev,
 		goto out;
 	}
 
+	if (!crtc->funcs->gamma_set) {
+		ret = -ENOSYS;
+		goto out;
+	}
+
 	crtc->funcs->gamma_set(crtc, r_base, g_base, b_base, 0, crtc->gamma_size);
 
 out:
-- 
1.7.9.5



More information about the dri-devel mailing list