diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-06-16 12:28:36 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2010-06-16 12:28:36 -0400 |
commit | 4651d77211b508cb6b76931807780e317f232220 (patch) | |
tree | 2dc0019b545c2d3ac11da0be09402ff70c8702c5 | |
parent | 1e1d6a515428b6884fea586d180346fc74ef75a1 (diff) |
radeon: fix depth 16 with ums
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28494
https://bugzilla.redhat.com/show_bug.cgi?id=554967
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r-- | src/radeon_crtc.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c index a4a3302b..bc23ee5c 100644 --- a/src/radeon_crtc.c +++ b/src/radeon_crtc.c @@ -564,28 +564,12 @@ radeon_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t *red, uint16_t *green, uint16_t *blue, int size) { RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private; - ScrnInfoPtr pScrn = crtc->scrn; - int i, j; - - if (pScrn->depth == 16) { - for (i = 0; i < 64; i++) { - if (i <= 31) { - for (j = 0; j < 8; j++) { - radeon_crtc->lut_r[i * 8 + j] = red[i] >> 6; - radeon_crtc->lut_b[i * 8 + j] = blue[i] >> 6; - } - } + int i; - for (j = 0; j < 4; j++) { - radeon_crtc->lut_g[i * 4 + j] = green[i] >> 6; - } - } - } else { - for (i = 0; i < 256; i++) { - radeon_crtc->lut_r[i] = red[i] >> 6; - radeon_crtc->lut_g[i] = green[i] >> 6; - radeon_crtc->lut_b[i] = blue[i] >> 6; - } + for (i = 0; i < 256; i++) { + radeon_crtc->lut_r[i] = red[i] >> 6; + radeon_crtc->lut_g[i] = green[i] >> 6; + radeon_crtc->lut_b[i] = blue[i] >> 6; } radeon_crtc_load_lut(crtc); |