From: Ville Syrjälä Date: Mon, 27 May 2013 17:19:57 +0000 (+0300) Subject: drm/fb-helper: Make load_lut and gamma_set/gamma_get hooks optional X-Git-Tag: v3.11-rc1~65^2~95 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04c0c569d4358d0e2f9c78ca9fc0ddeb68ae4872;p=pandora-kernel.git 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ä Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie --- Reading git-diff-tree failed