summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_fb.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-09-24 18:52:56 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-01 07:45:18 +0200
commit6743768082aa5fed2009d67329c22e6a3bdf0f8d (patch)
treef0e9803accac0d2b5ad5043e6f7b7c3ea416981f /drivers/gpu/drm/i915/intel_fb.c
parentdrm/i915: make intel_crtc_load_lut static (diff)
downloadlinux-6743768082aa5fed2009d67329c22e6a3bdf0f8d.tar.xz
linux-6743768082aa5fed2009d67329c22e6a3bdf0f8d.zip
drm/i915: make intel_crtc_fb_gamma_{set, get} static
By moving them to intel_fb.c. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fb.c')
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 7ceb69b9dd61..d883b77b1b78 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -184,6 +184,27 @@ out:
return ret;
}
+/** Sets the color ramps on behalf of RandR */
+static void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
+ u16 blue, int regno)
+{
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+
+ intel_crtc->lut_r[regno] = red >> 8;
+ intel_crtc->lut_g[regno] = green >> 8;
+ intel_crtc->lut_b[regno] = blue >> 8;
+}
+
+static void intel_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
+ u16 *blue, int regno)
+{
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+
+ *red = intel_crtc->lut_r[regno] << 8;
+ *green = intel_crtc->lut_g[regno] << 8;
+ *blue = intel_crtc->lut_b[regno] << 8;
+}
+
static struct drm_fb_helper_funcs intel_fb_helper_funcs = {
.gamma_set = intel_crtc_fb_gamma_set,
.gamma_get = intel_crtc_fb_gamma_get,