diff options
author | Boyuan Zhang <boyuan.zhang@amd.com> | 2018-05-30 22:19:52 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-06-15 20:20:37 +0300 |
commit | b7fe681e35aaf8c844755297777bdceae030f6c3 (patch) | |
tree | 34148b80d7bdc75c7d38dd69c7da10bcc913fea1 /drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | |
parent | c8c1a1d2ef040d2661fc9c7f0b32aec5b1058ae3 (diff) | |
download | linux-b7fe681e35aaf8c844755297777bdceae030f6c3.tar.xz |
drm/amdgpu: add patch to jpeg ring
Add patch commands to jepg ring by calling set patch ring function.
v2: remove modifications on max_dw, buf_mask and ptr_mask, since we are
now using extra_dw for jpeg ring.
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c index 8fecdc5cef43..32b70049fd91 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c @@ -760,6 +760,13 @@ static int vcn_v1_0_start(struct amdgpu_device *adev) WREG32_SOC15(UVD, 0, mmUVD_JRBC_RB_WPTR, 0); WREG32_SOC15(UVD, 0, mmUVD_JRBC_RB_CNTL, 0x00000002L); + /* initialize wptr */ + ring->wptr = RREG32_SOC15(UVD, 0, mmUVD_JRBC_RB_WPTR); + + /* copy patch commands to the jpeg ring */ + vcn_v1_0_jpeg_ring_set_patch_ring(ring, + (ring->wptr + ring->max_dw * amdgpu_sched_hw_submission)); + return 0; } |