drm/radeon: implement common cs packet parse function
CS packet parse functions have a lot of in common across all ASICs. Implement a common function and take care of small differences between families inside the function. This patch is a prep for major refactoring and consolidation of CS parsing code. 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>
This commit is contained in:

committed by
Alex Deucher

parent
66b3543ef3
commit
4db013110c
@@ -3706,4 +3706,15 @@
|
||||
|
||||
#define RV530_GB_PIPE_SELECT2 0x4124
|
||||
|
||||
#define RADEON_CP_PACKET_GET_TYPE(h) (((h) >> 30) & 3)
|
||||
#define RADEON_CP_PACKET_GET_COUNT(h) (((h) >> 16) & 0x3FFF)
|
||||
#define RADEON_CP_PACKET0_GET_ONE_REG_WR(h) (((h) >> 15) & 1)
|
||||
#define RADEON_CP_PACKET3_GET_OPCODE(h) (((h) >> 8) & 0xFF)
|
||||
#define R100_CP_PACKET0_GET_REG(h) (((h) & 0x1FFF) << 2)
|
||||
#define R600_CP_PACKET0_GET_REG(h) (((h) & 0xFFFF) << 2)
|
||||
#define RADEON_PACKET_TYPE0 0
|
||||
#define RADEON_PACKET_TYPE1 1
|
||||
#define RADEON_PACKET_TYPE2 2
|
||||
#define RADEON_PACKET_TYPE3 3
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user