diff options
| author | David (Ming Qiang) Wu <[email protected]> | 2024-08-08 16:19:50 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-08-13 16:13:03 +0000 |
| commit | a7f670d5d8e77b092404ca8a35bb0f8f89ed3117 (patch) | |
| tree | ef878058b9c1e8772d0ac1edecc331c732396c1e /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | drm/amdgpu/mes12: fix suspend issue (diff) | |
| download | kernel-a7f670d5d8e77b092404ca8a35bb0f8f89ed3117.tar.gz kernel-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 <[email protected]>
Signed-off-by: David (Ming Qiang) Wu <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 1e167d925b64..78b3c067fea7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -1061,6 +1061,9 @@ static int amdgpu_cs_patch_ibs(struct amdgpu_cs_parser *p, r = amdgpu_ring_parse_cs(ring, p, job, ib); if (r) return r; + + if (ib->sa_bo) + ib->gpu_addr = amdgpu_sa_bo_gpu_addr(ib->sa_bo); } else { ib->ptr = (uint32_t *)kptr; r = amdgpu_ring_patch_cs_in_place(ring, p, job, ib); |
