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>
This commit is contained in:

committed by
Dave Airlie

parent
e6ecefaadf
commit
ebe0f2442c
@@ -136,6 +136,9 @@ static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
|
||||
{
|
||||
uint16_t *r_base, *g_base, *b_base;
|
||||
|
||||
if (crtc->funcs->gamma_set == NULL)
|
||||
return;
|
||||
|
||||
r_base = crtc->gamma_store;
|
||||
g_base = r_base + crtc->gamma_size;
|
||||
b_base = g_base + crtc->gamma_size;
|
||||
|
Reference in New Issue
Block a user