diff options
author | David (Ming Qiang) Wu <David.Wu3@amd.com> | 2024-08-08 12:19:50 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-08-13 12:13:03 -0400 |
commit | a7f670d5d8e77b092404ca8a35bb0f8f89ed3117 (patch) | |
tree | ef878058b9c1e8772d0ac1edecc331c732396c1e /drivers/gpu/drm/amd/amdgpu/soc15d.h | |
parent | f7fb9d677faf0460131bc2af15afd766d48a1f47 (diff) | |
download | linux-a7f670d5d8e77b092404ca8a35bb0f8f89ed3117.tar.gz linux-a7f670d5d8e77b092404ca8a35bb0f8f89ed3117.tar.bz2 linux-a7f670d5d8e77b092404ca8a35bb0f8f89ed3117.zip |
drm/amd/amdgpu: command submission parser for JPEG
Add JPEG IB command parser to ensure registers
in the command are within the JPEG IP block.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/soc15d.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/soc15d.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15d.h b/drivers/gpu/drm/amd/amdgpu/soc15d.h index 2357ff39323f..e74e1983da53 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc15d.h +++ b/drivers/gpu/drm/amd/amdgpu/soc15d.h @@ -76,6 +76,12 @@ ((cond & 0xF) << 24) | \ ((type & 0xF) << 28)) +#define CP_PACKETJ_NOP 0x60000000 +#define CP_PACKETJ_GET_REG(x) ((x) & 0x3FFFF) +#define CP_PACKETJ_GET_RES(x) (((x) >> 18) & 0x3F) +#define CP_PACKETJ_GET_COND(x) (((x) >> 24) & 0xF) +#define CP_PACKETJ_GET_TYPE(x) (((x) >> 28) & 0xF) + /* Packet 3 types */ #define PACKET3_NOP 0x10 #define PACKET3_SET_BASE 0x11 |