diff options
author | Sonny Jiang <sonny.jiang@amd.com> | 2021-01-31 09:44:51 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-02-24 09:28:55 -0500 |
commit | b2576c3bf4ce9b992e1c1fbb1cffe0d606702621 (patch) | |
tree | ad8130a04413ff727893286244dd0a3979bb8f11 /drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | |
parent | 4588f7b7dd5f09e70b6e223490a0d054c3d64071 (diff) |
drm/amdgpu/vcn3.0: add wptr/rptr reset/update for share memory
Because of dpg, the rptr/wptr need to be saved on fw shared memory,
and restore them back in RBC_RB_RPTR/WPTR in kernel at power up.
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h index 13aa417f6be7..1843bf8de0cf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h @@ -155,6 +155,7 @@ } \ } while (0) +#define AMDGPU_VCN_FW_SHARED_FLAG_0_RB (1 << 6) #define AMDGPU_VCN_MULTI_QUEUE_FLAG (1 << 8) #define AMDGPU_VCN_SW_RING_FLAG (1 << 9) @@ -243,6 +244,12 @@ struct amdgpu_vcn { int inst_idx, struct dpg_pause_state *new_state); }; +struct amdgpu_fw_shared_rb_ptrs_struct { + /* to WA DPG R/W ptr issues.*/ + uint32_t rptr; + uint32_t wptr; +}; + struct amdgpu_fw_shared_multi_queue { uint8_t decode_queue_mode; uint8_t encode_generalpurpose_queue_mode; @@ -258,10 +265,12 @@ struct amdgpu_fw_shared_sw_ring { struct amdgpu_fw_shared { uint32_t present_flag_0; - uint8_t pad[53]; + uint8_t pad[44]; + struct amdgpu_fw_shared_rb_ptrs_struct rb; + uint8_t pad1[1]; struct amdgpu_fw_shared_multi_queue multi_queue; struct amdgpu_fw_shared_sw_ring sw_ring; -} __attribute__((__packed__)); +}; struct amdgpu_vcn_decode_buffer { uint32_t valid_buf_flag; |