diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-06-16 14:40:27 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-06-18 14:38:45 +1000 |
commit | f66b3d5540994cb92182312be24944864cec5a16 (patch) | |
tree | 376c6aa91305e7cd9a475b53c50dc2920b8047ff /drivers/gpu | |
parent | 2905544073f6ec235b44f624c66f52b61221a16c (diff) | |
download | linux-3.10-f66b3d5540994cb92182312be24944864cec5a16.tar.gz linux-3.10-f66b3d5540994cb92182312be24944864cec5a16.tar.bz2 linux-3.10-f66b3d5540994cb92182312be24944864cec5a16.zip |
drm/nv50/disp: fix gamma with page flipping overlay turned on
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_display.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 74a3f687270..08da478ba54 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c @@ -409,7 +409,7 @@ nv50_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct nouveau_channel *evo = dispc->sync; int ret; - ret = RING_SPACE(evo, 24); + ret = RING_SPACE(evo, chan ? 25 : 27); if (unlikely(ret)) return ret; @@ -458,8 +458,19 @@ nv50_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb, /* queue the flip on the crtc's "display sync" channel */ BEGIN_RING(evo, 0, 0x0100, 1); OUT_RING (evo, 0xfffe0000); - BEGIN_RING(evo, 0, 0x0084, 5); - OUT_RING (evo, chan ? 0x00000100 : 0x00000010); + if (chan) { + BEGIN_RING(evo, 0, 0x0084, 1); + OUT_RING (evo, 0x00000100); + } else { + BEGIN_RING(evo, 0, 0x0084, 1); + OUT_RING (evo, 0x00000010); + /* allows gamma somehow, PDISP will bitch at you if + * you don't wait for vblank before changing this.. + */ + BEGIN_RING(evo, 0, 0x00e0, 1); + OUT_RING (evo, 0x40000000); + } + BEGIN_RING(evo, 0, 0x0088, 4); OUT_RING (evo, dispc->sem.offset); OUT_RING (evo, 0xf00d0000 | dispc->sem.value); OUT_RING (evo, 0x74b1e000); |