aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
diff options
context:
space:
mode:
authorSatyajit Sahu <[email protected]>2021-08-27 06:11:08 +0000
committerAlex Deucher <[email protected]>2021-09-01 20:55:11 +0000
commit080e613c74bb50e6fc52cf466ff2a43cbd5a382b (patch)
tree729b05941bab24a069902ba066318028c624a70f /drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
parentdrm/amd/amdgpu: add mpio to ras block (diff)
downloadkernel-080e613c74bb50e6fc52cf466ff2a43cbd5a382b.tar.gz
kernel-080e613c74bb50e6fc52cf466ff2a43cbd5a382b.zip
drm/amdgpu/vce: set the priority for each ring
VCE has multiple rings. Set the proper priority level for each ring while initializing. Signed-off-by: Satyajit Sahu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index 8e8dee9fac9f..e9fdf49d69e8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
@@ -1167,3 +1167,17 @@ error:
amdgpu_bo_free_kernel(&bo, NULL, NULL);
return r;
}
+
+enum amdgpu_ring_priority_level amdgpu_vce_get_ring_prio(int ring)
+{
+ switch(ring) {
+ case 0:
+ return AMDGPU_RING_PRIO_0;
+ case 1:
+ return AMDGPU_RING_PRIO_1;
+ case 2:
+ return AMDGPU_RING_PRIO_2;
+ default:
+ return AMDGPU_RING_PRIO_0;
+ }
+}