diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-07-07 00:49:24 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-09-20 02:07:05 -0400 |
commit | 8ea0d4aa606eabd021926b4c328e4d799253afe6 (patch) | |
tree | 788071dd7b27efce7172e74a1471746e14402042 /drivers/gpu | |
parent | 3a89cd029267739bc9f16e86e2d4156b68dc9ca2 (diff) |
drm/nvd0/disp: fixup clut so it actually works
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvd0_display.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c index b869ba0fb6cf..376acc1619a0 100644 --- a/drivers/gpu/drm/nouveau/nvd0_display.c +++ b/drivers/gpu/drm/nouveau/nvd0_display.c | |||
@@ -269,6 +269,8 @@ nvd0_crtc_commit(struct drm_crtc *crtc) | |||
269 | evo_data(push, 0x00000000); | 269 | evo_data(push, 0x00000000); |
270 | evo_mthd(push, 0x045c + (nv_crtc->index * 0x300), 1); | 270 | evo_mthd(push, 0x045c + (nv_crtc->index * 0x300), 1); |
271 | evo_data(push, MEM_VRAM); | 271 | evo_data(push, MEM_VRAM); |
272 | evo_mthd(push, 0x0430 + (nv_crtc->index * 0x300), 1); | ||
273 | evo_data(push, 0xffffff00); | ||
272 | evo_kick(push, crtc->dev, 0); | 274 | evo_kick(push, crtc->dev, 0); |
273 | } | 275 | } |
274 | 276 | ||
@@ -387,9 +389,9 @@ nvd0_crtc_lut_load(struct drm_crtc *crtc) | |||
387 | int i; | 389 | int i; |
388 | 390 | ||
389 | for (i = 0; i < 256; i++) { | 391 | for (i = 0; i < 256; i++) { |
390 | writew(nv_crtc->lut.r[i] >> 2, lut + 8*i + 0); | 392 | writew(0x6000 + (nv_crtc->lut.r[i] >> 2), lut + (i * 0x20) + 0); |
391 | writew(nv_crtc->lut.g[i] >> 2, lut + 8*i + 2); | 393 | writew(0x6000 + (nv_crtc->lut.g[i] >> 2), lut + (i * 0x20) + 2); |
392 | writew(nv_crtc->lut.b[i] >> 2, lut + 8*i + 4); | 394 | writew(0x6000 + (nv_crtc->lut.b[i] >> 2), lut + (i * 0x20) + 4); |
393 | } | 395 | } |
394 | } | 396 | } |
395 | 397 | ||
@@ -530,7 +532,7 @@ nvd0_crtc_create(struct drm_device *dev, int index) | |||
530 | if (ret) | 532 | if (ret) |
531 | goto out; | 533 | goto out; |
532 | 534 | ||
533 | ret = nouveau_bo_new(dev, 4096, 0x100, TTM_PL_FLAG_VRAM, | 535 | ret = nouveau_bo_new(dev, 8192, 0x100, TTM_PL_FLAG_VRAM, |
534 | 0, 0x0000, &nv_crtc->lut.nvbo); | 536 | 0, 0x0000, &nv_crtc->lut.nvbo); |
535 | if (!ret) { | 537 | if (!ret) { |
536 | ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM); | 538 | ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM); |