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/evergreen_cs.c | |
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/evergreen_cs.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_cs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen_cs.c b/drivers/gpu/drm/radeon/evergreen_cs.c index 211b50956153..4a9760ab8774 100644 --- a/drivers/gpu/drm/radeon/evergreen_cs.c +++ b/drivers/gpu/drm/radeon/evergreen_cs.c | |||
@@ -2639,12 +2639,12 @@ int evergreen_cs_parse(struct radeon_cs_parser *p) | |||
2639 | } | 2639 | } |
2640 | p->idx += pkt.count + 2; | 2640 | p->idx += pkt.count + 2; |
2641 | switch (pkt.type) { | 2641 | switch (pkt.type) { |
2642 | case PACKET_TYPE0: | 2642 | case RADEON_PACKET_TYPE0: |
2643 | r = evergreen_cs_parse_packet0(p, &pkt); | 2643 | r = evergreen_cs_parse_packet0(p, &pkt); |
2644 | break; | 2644 | break; |
2645 | case PACKET_TYPE2: | 2645 | case RADEON_PACKET_TYPE2: |
2646 | break; | 2646 | break; |
2647 | case PACKET_TYPE3: | 2647 | case RADEON_PACKET_TYPE3: |
2648 | r = evergreen_packet3_check(p, &pkt); | 2648 | r = evergreen_packet3_check(p, &pkt); |
2649 | break; | 2649 | break; |
2650 | default: | 2650 | default: |
@@ -3395,19 +3395,19 @@ int evergreen_ib_parse(struct radeon_device *rdev, struct radeon_ib *ib) | |||
3395 | 3395 | ||
3396 | do { | 3396 | do { |
3397 | pkt.idx = idx; | 3397 | pkt.idx = idx; |
3398 | pkt.type = CP_PACKET_GET_TYPE(ib->ptr[idx]); | 3398 | pkt.type = RADEON_CP_PACKET_GET_TYPE(ib->ptr[idx]); |
3399 | pkt.count = CP_PACKET_GET_COUNT(ib->ptr[idx]); | 3399 | pkt.count = RADEON_CP_PACKET_GET_COUNT(ib->ptr[idx]); |
3400 | pkt.one_reg_wr = 0; | 3400 | pkt.one_reg_wr = 0; |
3401 | switch (pkt.type) { | 3401 | switch (pkt.type) { |
3402 | case PACKET_TYPE0: | 3402 | case RADEON_PACKET_TYPE0: |
3403 | dev_err(rdev->dev, "Packet0 not allowed!\n"); | 3403 | dev_err(rdev->dev, "Packet0 not allowed!\n"); |
3404 | ret = -EINVAL; | 3404 | ret = -EINVAL; |
3405 | break; | 3405 | break; |
3406 | case PACKET_TYPE2: | 3406 | case RADEON_PACKET_TYPE2: |
3407 | idx += 1; | 3407 | idx += 1; |
3408 | break; | 3408 | break; |
3409 | case PACKET_TYPE3: | 3409 | case RADEON_PACKET_TYPE3: |
3410 | pkt.opcode = CP_PACKET3_GET_OPCODE(ib->ptr[idx]); | 3410 | pkt.opcode = RADEON_CP_PACKET3_GET_OPCODE(ib->ptr[idx]); |
3411 | ret = evergreen_vm_packet3_check(rdev, ib->ptr, &pkt); | 3411 | ret = evergreen_vm_packet3_check(rdev, ib->ptr, &pkt); |
3412 | idx += pkt.count + 2; | 3412 | idx += pkt.count + 2; |
3413 | break; | 3413 | break; |