From: Boyuan Zhang <boyuan.zhang@xxxxxxx> Add and set internal and external offsets of jpeg_enc_scratch0 for ring test Signed-off-by: Boyuan Zhang <boyuan.zhang@xxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 1 + drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h index a44550af1b8a..8b344d6a1aca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h @@ -74,6 +74,7 @@ struct amdgpu_vcn_reg{ unsigned nop; unsigned scratch9; unsigned jpeg_pitch; + unsigned jpeg_enc_scratch0; }; struct amdgpu_vcn { diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c index 3caa1b98b15a..5dab17e422c3 100644 --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c @@ -227,6 +227,9 @@ static int vcn_v2_0_sw_init(void *handle) if (r) return r; + adev->vcn.internal.jpeg_enc_scratch0 = mmUVD_JPEG_ENC_SCRATCH0_INTERNAL_OFFSET; + adev->vcn.external.jpeg_enc_scratch0 = SOC15_REG_OFFSET(UVD, 0, mmUVD_JPEG_ENC_SCRATCH0); + return 0; } -- 2.17.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx