aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-09-24 12:52:56 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-01 01:45:18 -0400
commit6743768082aa5fed2009d67329c22e6a3bdf0f8d (patch)
treef0e9803accac0d2b5ad5043e6f7b7c3ea416981f
parentd77e4531bd8135c513bed83dc3a3e3f5540e65e6 (diff)
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>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c21
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h4
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c21
3 files changed, 21 insertions, 25 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2a08446377eb..3d72b996da16 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7102,27 +7102,6 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
7102 return 0; 7102 return 0;
7103} 7103}
7104 7104
7105/** Sets the color ramps on behalf of RandR */
7106void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
7107 u16 blue, int regno)
7108{
7109 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
7110
7111 intel_crtc->lut_r[regno] = red >> 8;
7112 intel_crtc->lut_g[regno] = green >> 8;
7113 intel_crtc->lut_b[regno] = blue >> 8;
7114}
7115
7116void intel_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
7117 u16 *blue, int regno)
7118{
7119 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
7120
7121 *red = intel_crtc->lut_r[regno] << 8;
7122 *green = intel_crtc->lut_g[regno] << 8;
7123 *blue = intel_crtc->lut_b[regno] << 8;
7124}
7125
7126static void intel_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green, 7105static void intel_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
7127 u16 *blue, uint32_t start, uint32_t size) 7106 u16 *blue, uint32_t start, uint32_t size)
7128{ 7107{
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 0074d75fcee9..5b63cc699a20 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -638,10 +638,6 @@ extern bool intel_get_load_detect_pipe(struct drm_connector *connector,
638 struct intel_load_detect_pipe *old); 638 struct intel_load_detect_pipe *old);
639extern void intel_release_load_detect_pipe(struct drm_connector *connector, 639extern void intel_release_load_detect_pipe(struct drm_connector *connector,
640 struct intel_load_detect_pipe *old); 640 struct intel_load_detect_pipe *old);
641extern void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
642 u16 blue, int regno);
643extern void intel_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
644 u16 *blue, int regno);
645extern int intel_pin_and_fence_fb_obj(struct drm_device *dev, 641extern int intel_pin_and_fence_fb_obj(struct drm_device *dev,
646 struct drm_i915_gem_object *obj, 642 struct drm_i915_gem_object *obj,
647 struct intel_ring_buffer *pipelined); 643 struct intel_ring_buffer *pipelined);
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:
184 return ret; 184 return ret;
185} 185}
186 186
187/** Sets the color ramps on behalf of RandR */
188static void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
189 u16 blue, int regno)
190{
191 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
192
193 intel_crtc->lut_r[regno] = red >> 8;
194 intel_crtc->lut_g[regno] = green >> 8;
195 intel_crtc->lut_b[regno] = blue >> 8;
196}
197
198static void intel_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
199 u16 *blue, int regno)
200{
201 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
202
203 *red = intel_crtc->lut_r[regno] << 8;
204 *green = intel_crtc->lut_g[regno] << 8;
205 *blue = intel_crtc->lut_b[regno] << 8;
206}
207
187static struct drm_fb_helper_funcs intel_fb_helper_funcs = { 208static struct drm_fb_helper_funcs intel_fb_helper_funcs = {
188 .gamma_set = intel_crtc_fb_gamma_set, 209 .gamma_set = intel_crtc_fb_gamma_set,
189 .gamma_get = intel_crtc_fb_gamma_get, 210 .gamma_get = intel_crtc_fb_gamma_get,