diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-02-14 02:57:35 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-02-24 23:46:07 +0300 |
commit | 8f7286f8e4e80f7b868ba3d117ae900f0d207cbe (patch) | |
tree | 018804469b7bce4033b4156442c904512282fab2 /drivers/gpu/drm/nouveau/nv50_vm.c | |
parent | 26c0c9e33a2eb44b345d22d5928d5c8b7b261226 (diff) | |
download | linux-8f7286f8e4e80f7b868ba3d117ae900f0d207cbe.tar.xz |
drm/nv50: support for compression
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_vm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_vm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_vm.c b/drivers/gpu/drm/nouveau/nv50_vm.c index 37f941bf4a0b..b23794c8859b 100644 --- a/drivers/gpu/drm/nouveau/nv50_vm.c +++ b/drivers/gpu/drm/nouveau/nv50_vm.c @@ -83,8 +83,9 @@ nv50_vm_addr(struct nouveau_vma *vma, u64 phys, u32 memtype, u32 target) void nv50_vm_map(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt, - struct nouveau_mem *mem, u32 pte, u32 cnt, u64 phys) + struct nouveau_mem *mem, u32 pte, u32 cnt, u64 phys, u64 delta) { + u32 comp = (mem->memtype & 0x180) >> 7; u32 block; int i; @@ -105,6 +106,11 @@ nv50_vm_map(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt, phys += block << (vma->node->type - 3); cnt -= block; + if (comp) { + u32 tag = mem->tag->start + ((delta >> 16) * comp); + offset_h |= (tag << 17); + delta += block << (vma->node->type - 3); + } while (block) { nv_wo32(pgt, pte + 0, offset_l); |