aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2017-12-30 23:35:28 -0500
committerBen Skeggs <bskeggs@redhat.com>2018-02-02 00:24:06 -0500
commite75182f68b7b3a073e33b89ee4c1688160755930 (patch)
treecbcc8a891d92f17ff5aa1ebf9a346996fb1e9a0a
parent11fc017dfb1efffa93d803f7182d026962ea2aae (diff)
drm/nouveau/kms/nv50: use "low res" lut for indexed mode
This is what was done prior to the big refactor in kernel 3.8, and what was done by xf86-video-nv. Experimentally, it seems like there's some sort of issue with the high-res lut to be used there. Tested on G92. This ends up mattering because fbcon/fbdev chooses the C8 fb format for low-vram systems, which can occur with some IGP-based configurations with little "stolen" vram. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80675 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 2293b8ff56c6..f4daf8c55de1 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -1805,12 +1805,14 @@ nv50_head_lut_set(struct nv50_head *head, struct nv50_head_atom *asyh)
1805 if ((push = evo_wait(core, 7))) { 1805 if ((push = evo_wait(core, 7))) {
1806 if (core->base.user.oclass < G82_DISP_CORE_CHANNEL_DMA) { 1806 if (core->base.user.oclass < G82_DISP_CORE_CHANNEL_DMA) {
1807 evo_mthd(push, 0x0840 + (head->base.index * 0x400), 2); 1807 evo_mthd(push, 0x0840 + (head->base.index * 0x400), 2);
1808 evo_data(push, 0xc0000000); 1808 evo_data(push, asyh->base.depth == 8 ?
1809 0x80000000 : 0xc0000000);
1809 evo_data(push, asyh->lut.offset >> 8); 1810 evo_data(push, asyh->lut.offset >> 8);
1810 } else 1811 } else
1811 if (core->base.user.oclass < GF110_DISP_CORE_CHANNEL_DMA) { 1812 if (core->base.user.oclass < GF110_DISP_CORE_CHANNEL_DMA) {
1812 evo_mthd(push, 0x0840 + (head->base.index * 0x400), 2); 1813 evo_mthd(push, 0x0840 + (head->base.index * 0x400), 2);
1813 evo_data(push, 0xc0000000); 1814 evo_data(push, asyh->base.depth == 8 ?
1815 0x80000000 : 0xc0000000);
1814 evo_data(push, asyh->lut.offset >> 8); 1816 evo_data(push, asyh->lut.offset >> 8);
1815 evo_mthd(push, 0x085c + (head->base.index * 0x400), 1); 1817 evo_mthd(push, 0x085c + (head->base.index * 0x400), 1);
1816 evo_data(push, asyh->lut.handle); 1818 evo_data(push, asyh->lut.handle);