drm/radeon/kms: allow for texture tiling
authorMaciej Cencora <m.cencora@gmail.com>
Tue, 15 Dec 2009 22:13:08 +0000 (23:13 +0100)
committerDave Airlie <airlied@redhat.com>
Wed, 16 Dec 2009 06:09:19 +0000 (16:09 +1000)
This adds the relocations for texture tiling for KMS.

Signed-off-by: Maciej Cencora <m.cencora@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r300.c

index e47af526fc04fb705f26997d0e0e19b20daf67ee..dbb149060b1df24778bd29ab2dd4be6ae55e22c3 100644 (file)
@@ -686,7 +686,15 @@ static int r300_packet0_check(struct radeon_cs_parser *p,
                        r100_cs_dump_packet(p, pkt);
                        return r;
                }
-               ib[idx] = idx_value + ((u32)reloc->lobj.gpu_offset);
+
+               if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO)
+                       tile_flags |= R300_TXO_MACRO_TILE;
+               if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO)
+                       tile_flags |= R300_TXO_MICRO_TILE;
+
+               tmp = idx_value + ((u32)reloc->lobj.gpu_offset);
+               tmp |= tile_flags;
+               ib[idx] = tmp;
                track->textures[i].robj = reloc->robj;
                break;
        /* Tracked registers */