aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-05-17 07:27:24 -0400
committerDave Airlie <airlied@redhat.com>2012-05-22 05:35:15 -0400
commitebe0f2442cc4c5493a85c875d2d8a44ffecc1175 (patch)
treef9ce0f9183ee558c766916f9b0709e8220242b37 /drivers/gpu/drm/drm_crtc.c
parente6ecefaadfcdb03db8ac9e739b4ba7a93a8811b3 (diff)
drm: Make the CRTC gamma_set operation optional
Drivers for hardware without gamma support should not be forced to implement a no-op gamma set operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Rob Clark <rob.clark@linaro.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 404597e8150a..6cb47d9f0ca2 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -3332,6 +3332,11 @@ int drm_mode_gamma_set_ioctl(struct drm_device *dev,
3332 } 3332 }
3333 crtc = obj_to_crtc(obj); 3333 crtc = obj_to_crtc(obj);
3334 3334
3335 if (crtc->funcs->gamma_set == NULL) {
3336 ret = -ENOSYS;
3337 goto out;
3338 }
3339
3335 /* memcpy into gamma store */ 3340 /* memcpy into gamma store */
3336 if (crtc_lut->gamma_size != crtc->gamma_size) { 3341 if (crtc_lut->gamma_size != crtc->gamma_size) {
3337 ret = -EINVAL; 3342 ret = -EINVAL;