diff options
author | Ilija Hadzic <ihadzic@research.bell-labs.com> | 2013-01-02 18:27:48 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-01-31 16:24:46 -0500 |
commit | 4e872ae2bbb9de838212680c52dcbb85be1e4419 (patch) | |
tree | a72bf741a17fcb23bb620c4279e3aed8f8e40e2c /drivers/gpu/drm/radeon/sid.h | |
parent | 012e976d42d2819c79bdd4ef2843515bdd44e408 (diff) |
drm/radeon: consolidate redundant macros and constants
After refactoring the _cs logic, we ended up with many
macros and constants that #define the same thing.
Clean'em up.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/sid.h')
-rw-r--r-- | drivers/gpu/drm/radeon/sid.h | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/sid.h b/drivers/gpu/drm/radeon/sid.h index c056aae814f0..76b5911585f1 100644 --- a/drivers/gpu/drm/radeon/sid.h +++ b/drivers/gpu/drm/radeon/sid.h | |||
@@ -783,16 +783,7 @@ | |||
783 | /* | 783 | /* |
784 | * PM4 | 784 | * PM4 |
785 | */ | 785 | */ |
786 | #define PACKET_TYPE0 0 | 786 | #define PACKET0(reg, n) ((RADEON_PACKET_TYPE0 << 30) | \ |
787 | #define PACKET_TYPE1 1 | ||
788 | #define PACKET_TYPE2 2 | ||
789 | #define PACKET_TYPE3 3 | ||
790 | |||
791 | #define CP_PACKET_GET_TYPE(h) (((h) >> 30) & 3) | ||
792 | #define CP_PACKET_GET_COUNT(h) (((h) >> 16) & 0x3FFF) | ||
793 | #define CP_PACKET0_GET_REG(h) (((h) & 0xFFFF) << 2) | ||
794 | #define CP_PACKET3_GET_OPCODE(h) (((h) >> 8) & 0xFF) | ||
795 | #define PACKET0(reg, n) ((PACKET_TYPE0 << 30) | \ | ||
796 | (((reg) >> 2) & 0xFFFF) | \ | 787 | (((reg) >> 2) & 0xFFFF) | \ |
797 | ((n) & 0x3FFF) << 16) | 788 | ((n) & 0x3FFF) << 16) |
798 | #define CP_PACKET2 0x80000000 | 789 | #define CP_PACKET2 0x80000000 |
@@ -801,7 +792,7 @@ | |||
801 | 792 | ||
802 | #define PACKET2(v) (CP_PACKET2 | REG_SET(PACKET2_PAD, (v))) | 793 | #define PACKET2(v) (CP_PACKET2 | REG_SET(PACKET2_PAD, (v))) |
803 | 794 | ||
804 | #define PACKET3(op, n) ((PACKET_TYPE3 << 30) | \ | 795 | #define PACKET3(op, n) ((RADEON_PACKET_TYPE3 << 30) | \ |
805 | (((op) & 0xFF) << 8) | \ | 796 | (((op) & 0xFF) << 8) | \ |
806 | ((n) & 0x3FFF) << 16) | 797 | ((n) & 0x3FFF) << 16) |
807 | 798 | ||