diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-07-05 21:40:45 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-09-20 02:06:44 -0400 |
commit | c0cc92a1151447588db6d96e94fc2210b8fc32df (patch) | |
tree | 4ad042a876360366e20ab5f17545e0092d96009a /drivers/gpu/drm/nouveau/nvd0_display.c | |
parent | 1d6e7a59f70b3107a75672f365be2fec2ee43a36 (diff) |
drm/nvd0/disp: remove lp reordering from vram dmaobj, create fb dmaobjs
Fixes CLUT being messed up. Mostly.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvd0_display.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvd0_display.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c index 0afc5e1ad845..a0cc287aa6fc 100644 --- a/drivers/gpu/drm/nouveau/nvd0_display.c +++ b/drivers/gpu/drm/nouveau/nvd0_display.c | |||
@@ -35,6 +35,7 @@ | |||
35 | 35 | ||
36 | #define MEM_SYNC 0xe0000001 | 36 | #define MEM_SYNC 0xe0000001 |
37 | #define MEM_VRAM 0xe0010000 | 37 | #define MEM_VRAM 0xe0010000 |
38 | #include "nouveau_dma.h" | ||
38 | 39 | ||
39 | struct nvd0_display { | 40 | struct nvd0_display { |
40 | struct nouveau_gpuobj *mem; | 41 | struct nouveau_gpuobj *mem; |
@@ -174,9 +175,6 @@ nvd0_crtc_set_image(struct nouveau_crtc *nv_crtc, struct drm_framebuffer *fb, | |||
174 | struct nouveau_framebuffer *nvfb = nouveau_framebuffer(fb); | 175 | struct nouveau_framebuffer *nvfb = nouveau_framebuffer(fb); |
175 | u32 *push; | 176 | u32 *push; |
176 | 177 | ||
177 | /*XXX*/ | ||
178 | nv_crtc->fb.tile_flags = MEM_VRAM; | ||
179 | |||
180 | push = evo_wait(fb->dev, 0, 16); | 178 | push = evo_wait(fb->dev, 0, 16); |
181 | if (push) { | 179 | if (push) { |
182 | evo_mthd(push, 0x0460 + (nv_crtc->index * 0x300), 1); | 180 | evo_mthd(push, 0x0460 + (nv_crtc->index * 0x300), 1); |
@@ -185,10 +183,11 @@ nvd0_crtc_set_image(struct nouveau_crtc *nv_crtc, struct drm_framebuffer *fb, | |||
185 | evo_data(push, (fb->height << 16) | fb->width); | 183 | evo_data(push, (fb->height << 16) | fb->width); |
186 | evo_data(push, nvfb->r_pitch); | 184 | evo_data(push, nvfb->r_pitch); |
187 | evo_data(push, nvfb->r_format); | 185 | evo_data(push, nvfb->r_format); |
188 | evo_data(push, nv_crtc->fb.tile_flags); | 186 | evo_data(push, nvfb->r_dma); |
189 | evo_kick(push, fb->dev, 0); | 187 | evo_kick(push, fb->dev, 0); |
190 | } | 188 | } |
191 | 189 | ||
190 | nv_crtc->fb.tile_flags = nvfb->r_dma; | ||
192 | return 0; | 191 | return 0; |
193 | } | 192 | } |
194 | 193 | ||
@@ -1011,7 +1010,7 @@ nvd0_display_create(struct drm_device *dev) | |||
1011 | nv_wo32(disp->mem, 0x0000, MEM_SYNC); | 1010 | nv_wo32(disp->mem, 0x0000, MEM_SYNC); |
1012 | nv_wo32(disp->mem, 0x0004, (0x1000 << 9) | 0x00000001); | 1011 | nv_wo32(disp->mem, 0x0004, (0x1000 << 9) | 0x00000001); |
1013 | 1012 | ||
1014 | nv_wo32(disp->mem, 0x1020, 0x00000009); | 1013 | nv_wo32(disp->mem, 0x1020, 0x00000049); |
1015 | nv_wo32(disp->mem, 0x1024, 0x00000000); | 1014 | nv_wo32(disp->mem, 0x1024, 0x00000000); |
1016 | nv_wo32(disp->mem, 0x1028, (dev_priv->vram_size - 1) >> 8); | 1015 | nv_wo32(disp->mem, 0x1028, (dev_priv->vram_size - 1) >> 8); |
1017 | nv_wo32(disp->mem, 0x102c, 0x00000000); | 1016 | nv_wo32(disp->mem, 0x102c, 0x00000000); |
@@ -1020,6 +1019,24 @@ nvd0_display_create(struct drm_device *dev) | |||
1020 | nv_wo32(disp->mem, 0x0008, MEM_VRAM); | 1019 | nv_wo32(disp->mem, 0x0008, MEM_VRAM); |
1021 | nv_wo32(disp->mem, 0x000c, (0x1020 << 9) | 0x00000001); | 1020 | nv_wo32(disp->mem, 0x000c, (0x1020 << 9) | 0x00000001); |
1022 | 1021 | ||
1022 | nv_wo32(disp->mem, 0x1040, 0x00000009); | ||
1023 | nv_wo32(disp->mem, 0x1044, 0x00000000); | ||
1024 | nv_wo32(disp->mem, 0x1048, (dev_priv->vram_size - 1) >> 8); | ||
1025 | nv_wo32(disp->mem, 0x104c, 0x00000000); | ||
1026 | nv_wo32(disp->mem, 0x1050, 0x00000000); | ||
1027 | nv_wo32(disp->mem, 0x1054, 0x00000000); | ||
1028 | nv_wo32(disp->mem, 0x0010, NvEvoVRAM_LP); | ||
1029 | nv_wo32(disp->mem, 0x0014, (0x1040 << 9) | 0x00000001); | ||
1030 | |||
1031 | nv_wo32(disp->mem, 0x1060, 0x0fe00009); | ||
1032 | nv_wo32(disp->mem, 0x1064, 0x00000000); | ||
1033 | nv_wo32(disp->mem, 0x1068, (dev_priv->vram_size - 1) >> 8); | ||
1034 | nv_wo32(disp->mem, 0x106c, 0x00000000); | ||
1035 | nv_wo32(disp->mem, 0x1070, 0x00000000); | ||
1036 | nv_wo32(disp->mem, 0x1074, 0x00000000); | ||
1037 | nv_wo32(disp->mem, 0x0018, NvEvoFB32); | ||
1038 | nv_wo32(disp->mem, 0x001c, (0x1060 << 9) | 0x00000001); | ||
1039 | |||
1023 | pinstmem->flush(dev); | 1040 | pinstmem->flush(dev); |
1024 | 1041 | ||
1025 | /* push buffers for evo channels */ | 1042 | /* push buffers for evo channels */ |