diff options
-rw-r--r-- | drivers/gpu/drm/radeon/r300.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r300_reg.h | 2 | ||||
-rw-r--r-- | include/drm/radeon_drm.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r300.c b/drivers/gpu/drm/radeon/r300.c index dc32cd13a837..4cef90cd74e5 100644 --- a/drivers/gpu/drm/radeon/r300.c +++ b/drivers/gpu/drm/radeon/r300.c | |||
@@ -705,6 +705,8 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
705 | tile_flags |= R300_TXO_MACRO_TILE; | 705 | tile_flags |= R300_TXO_MACRO_TILE; |
706 | if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) | 706 | if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) |
707 | tile_flags |= R300_TXO_MICRO_TILE; | 707 | tile_flags |= R300_TXO_MICRO_TILE; |
708 | else if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO_SQUARE) | ||
709 | tile_flags |= R300_TXO_MICRO_TILE_SQUARE; | ||
708 | 710 | ||
709 | tmp = idx_value + ((u32)reloc->lobj.gpu_offset); | 711 | tmp = idx_value + ((u32)reloc->lobj.gpu_offset); |
710 | tmp |= tile_flags; | 712 | tmp |= tile_flags; |
@@ -755,6 +757,8 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
755 | tile_flags |= R300_COLOR_TILE_ENABLE; | 757 | tile_flags |= R300_COLOR_TILE_ENABLE; |
756 | if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) | 758 | if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) |
757 | tile_flags |= R300_COLOR_MICROTILE_ENABLE; | 759 | tile_flags |= R300_COLOR_MICROTILE_ENABLE; |
760 | else if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO_SQUARE) | ||
761 | tile_flags |= R300_COLOR_MICROTILE_SQUARE_ENABLE; | ||
758 | 762 | ||
759 | tmp = idx_value & ~(0x7 << 16); | 763 | tmp = idx_value & ~(0x7 << 16); |
760 | tmp |= tile_flags; | 764 | tmp |= tile_flags; |
@@ -826,7 +830,9 @@ static int r300_packet0_check(struct radeon_cs_parser *p, | |||
826 | if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO) | 830 | if (reloc->lobj.tiling_flags & RADEON_TILING_MACRO) |
827 | tile_flags |= R300_DEPTHMACROTILE_ENABLE; | 831 | tile_flags |= R300_DEPTHMACROTILE_ENABLE; |
828 | if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) | 832 | if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO) |
829 | tile_flags |= R300_DEPTHMICROTILE_TILED;; | 833 | tile_flags |= R300_DEPTHMICROTILE_TILED; |
834 | else if (reloc->lobj.tiling_flags & RADEON_TILING_MICRO_SQUARE) | ||
835 | tile_flags |= R300_DEPTHMICROTILE_TILED_SQUARE; | ||
830 | 836 | ||
831 | tmp = idx_value & ~(0x7 << 16); | 837 | tmp = idx_value & ~(0x7 << 16); |
832 | tmp |= tile_flags; | 838 | tmp |= tile_flags; |
diff --git a/drivers/gpu/drm/radeon/r300_reg.h b/drivers/gpu/drm/radeon/r300_reg.h index 1735a2b69580..1a0d5362cd79 100644 --- a/drivers/gpu/drm/radeon/r300_reg.h +++ b/drivers/gpu/drm/radeon/r300_reg.h | |||
@@ -952,6 +952,7 @@ | |||
952 | # define R300_TXO_ENDIAN_HALFDW_SWAP (3 << 0) | 952 | # define R300_TXO_ENDIAN_HALFDW_SWAP (3 << 0) |
953 | # define R300_TXO_MACRO_TILE (1 << 2) | 953 | # define R300_TXO_MACRO_TILE (1 << 2) |
954 | # define R300_TXO_MICRO_TILE (1 << 3) | 954 | # define R300_TXO_MICRO_TILE (1 << 3) |
955 | # define R300_TXO_MICRO_TILE_SQUARE (2 << 3) | ||
955 | # define R300_TXO_OFFSET_MASK 0xffffffe0 | 956 | # define R300_TXO_OFFSET_MASK 0xffffffe0 |
956 | # define R300_TXO_OFFSET_SHIFT 5 | 957 | # define R300_TXO_OFFSET_SHIFT 5 |
957 | /* END: Guess from R200 */ | 958 | /* END: Guess from R200 */ |
@@ -1360,6 +1361,7 @@ | |||
1360 | # define R300_COLORPITCH_MASK 0x00001FF8 /* GUESS */ | 1361 | # define R300_COLORPITCH_MASK 0x00001FF8 /* GUESS */ |
1361 | # define R300_COLOR_TILE_ENABLE (1 << 16) /* GUESS */ | 1362 | # define R300_COLOR_TILE_ENABLE (1 << 16) /* GUESS */ |
1362 | # define R300_COLOR_MICROTILE_ENABLE (1 << 17) /* GUESS */ | 1363 | # define R300_COLOR_MICROTILE_ENABLE (1 << 17) /* GUESS */ |
1364 | # define R300_COLOR_MICROTILE_SQUARE_ENABLE (2 << 17) | ||
1363 | # define R300_COLOR_ENDIAN_NO_SWAP (0 << 18) /* GUESS */ | 1365 | # define R300_COLOR_ENDIAN_NO_SWAP (0 << 18) /* GUESS */ |
1364 | # define R300_COLOR_ENDIAN_WORD_SWAP (1 << 18) /* GUESS */ | 1366 | # define R300_COLOR_ENDIAN_WORD_SWAP (1 << 18) /* GUESS */ |
1365 | # define R300_COLOR_ENDIAN_DWORD_SWAP (2 << 18) /* GUESS */ | 1367 | # define R300_COLOR_ENDIAN_DWORD_SWAP (2 << 18) /* GUESS */ |
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h index 39537f3cf98a..81e614bf2dc3 100644 --- a/include/drm/radeon_drm.h +++ b/include/drm/radeon_drm.h | |||
@@ -808,6 +808,7 @@ struct drm_radeon_gem_create { | |||
808 | #define RADEON_TILING_SWAP_32BIT 0x8 | 808 | #define RADEON_TILING_SWAP_32BIT 0x8 |
809 | #define RADEON_TILING_SURFACE 0x10 /* this object requires a surface | 809 | #define RADEON_TILING_SURFACE 0x10 /* this object requires a surface |
810 | * when mapped - i.e. front buffer */ | 810 | * when mapped - i.e. front buffer */ |
811 | #define RADEON_TILING_MICRO_SQUARE 0x20 | ||
811 | 812 | ||
812 | struct drm_radeon_gem_set_tiling { | 813 | struct drm_radeon_gem_set_tiling { |
813 | uint32_t handle; | 814 | uint32_t handle; |