]> git.baikalelectronics.ru Git - kernel.git/commit
drm/fb-helper: Make load_lut and gamma_set/gamma_get hooks optional
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 27 May 2013 17:19:57 +0000 (20:19 +0300)
committerDave Airlie <airlied@gmail.com>
Mon, 17 Jun 2013 09:42:47 +0000 (19:42 +1000)
commitb81f6cb02f1316816a10d9135ccf817c146dbd4b
tree812f493c7a60c6eca19e529c2804ce584419287b
parentdc2e7028aab17652582a82f7e60e28eb936433d2
drm/fb-helper: Make load_lut and gamma_set/gamma_get hooks optional

Check whether the crtc provides the load_lut callback before calling it.
This allows the driver to provide the hook only for those CRTCs that
actually have the hardware support for it.

Also check whether the driver provided the fb_helper gamma_set/gamma_get
hooks. It's a driver bug if it allows non-truecolor fbdev visuals w/o
these hooks, but auditing all the drivers is too tedious. So just slap
a big WARN_ON() there and bail out before things start to explode.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@gmail.com>
drivers/gpu/drm/drm_fb_helper.c