summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-03-30 12:51:16 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-05-31 17:56:44 +0300
commitcf48e2921ee95011a164dc31e8725022bd008666 (patch)
tree0a63daf92e6caa63994659d5480b599c70aa849b /drivers/gpu/drm/gma500
parent1bd816f120718d578af7e4b623b9a0dec59c028c (diff)
downloadlinux-cf48e2921ee95011a164dc31e8725022bd008666.tar.xz
drm: Initialize a linear gamma table by default
Code stolen from gma500. This is just a minor bit of safety code that I spotted and figured it might be useful if we put it into the core. This is to make the get_gamma ioctl reflect likely reality even before the first set_gamma ioctl call. v2 on irc: Extend commit message per Maarten's suggestions. Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1459331485-28376-2-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_display.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c
index 398015be87e4..7b6c84925098 100644
--- a/drivers/gpu/drm/gma500/psb_intel_display.c
+++ b/drivers/gpu/drm/gma500/psb_intel_display.c
@@ -491,7 +491,6 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
struct drm_psb_private *dev_priv = dev->dev_private;
struct gma_crtc *gma_crtc;
int i;
- uint16_t *r_base, *g_base, *b_base;
/* We allocate a extra array of drm_connector pointers
* for fbdev after the crtc */
@@ -519,16 +518,10 @@ void psb_intel_crtc_init(struct drm_device *dev, int pipe,
gma_crtc->pipe = pipe;
gma_crtc->plane = pipe;
- r_base = gma_crtc->base.gamma_store;
- g_base = r_base + 256;
- b_base = g_base + 256;
for (i = 0; i < 256; i++) {
gma_crtc->lut_r[i] = i;
gma_crtc->lut_g[i] = i;
gma_crtc->lut_b[i] = i;
- r_base[i] = i << 8;
- g_base[i] = i << 8;
- b_base[i] = i << 8;
gma_crtc->lut_adj[i] = 0;
}