aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
diff options
context:
space:
mode:
authorHuang Rui <ray.huang@amd.com>2020-07-01 15:39:02 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-07-08 09:03:25 -0400
commit2fcaca94bedae2ea9516168b32723106428db52e (patch)
tree7bc5fae66b3ae7ced5882db2296105f3d3d36d3b /drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
parentdrm/amdgpu: use register distance member instead of hardcode in VCN1/JEPG1 (diff)
downloadwireguard-linux-2fcaca94bedae2ea9516168b32723106428db52e.tar.xz
wireguard-linux-2fcaca94bedae2ea9516168b32723106428db52e.zip
drm/amdgpu: use register distance member instead of hardcode in UVD7/VCE4
This patch updates to use register distance member instead of hardcode in UVD7/VCE4. They are for the same ASIC. Signed-off-by: Huang Rui <ray.huang@amd.com> Tested-by: AnZhong Huang <anzhong.huang@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/vce_v4_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vce_v4_0.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
index a0fb119240f4..37fa163393fd 100644
--- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
@@ -991,7 +991,8 @@ static void vce_v4_0_emit_vm_flush(struct amdgpu_ring *ring,
pd_addr = amdgpu_gmc_emit_flush_gpu_tlb(ring, vmid, pd_addr);
/* wait for reg writes */
- vce_v4_0_emit_reg_wait(ring, hub->ctx0_ptb_addr_lo32 + vmid * 2,
+ vce_v4_0_emit_reg_wait(ring, hub->ctx0_ptb_addr_lo32 +
+ vmid * hub->ctx_addr_distance,
lower_32_bits(pd_addr), 0xffffffff);
}