drm/amdgpu/gfx11: return early in preempt_ib()
Subsystems (2)
Alex Deucher
maintainerPATCH 1/2 drm/amdgpu/gfx11: return early in preempt_ib()
When MES is enabled KIQ is not available. Return an error when someone uses the debugfs preempt test interface in that case.
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +3 -0
@@ -5924,6 +5924,9 @@ static int gfx_v11_0_ring_preempt_ib(struct amdgpu_ring *ring)struct amdgpu_ring *kiq_ring = &kiq->ring;unsigned long flags; +if (adev->enable_mes) +return -EINVAL ; +if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)return -EINVAL ;
Signature · 1 line
2.46.0
Alex Deucher
maintainerPATCH 2/2 drm/amdgpu/gfx12: return early in preempt_ib()
When MES is enabled KIQ is not available. Return an error when someone uses the debugfs preempt test interface in that case.
--- drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +3 -0
@@ -4501,6 +4501,9 @@ static int gfx_v12_0_ring_preempt_ib(struct amdgpu_ring *ring)struct amdgpu_ring *kiq_ring = &kiq->ring;unsigned long flags; +if (adev->enable_mes) +return -EINVAL ; +if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)return -EINVAL ;
Signature · 1 line
2.46.0
Ping on this series?
Alex
Quoted 27 lines · Alex Deucher
When MES is enabled KIQ is not available. Return an error when someone uses the debugfs preempt test interface in that case.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +3
-1@@ -5924,6 +5924,9 @@ static int gfx_v11_0_ring_preempt_ib(struct amdgpu_ring *ring)struct amdgpu_ring *kiq_ring = &kiq->ring;unsigned long flags; +if (adev->enable_mes) +return -EINVAL ; +if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)return -EINVAL ; --2.46.0
Quoted 14 lines · Alex Deucher
When MES is enabled KIQ is not available. Return an error when someone uses the debugfs preempt test interface in that case.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +0
-0
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c static int gfx_v11_0_ring_preempt_ib(struct amdgpu_ring *ring) · line 5932
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +3
-0@@ -5924,6 +5924,9 @@ static int gfx_v11_0_ring_preempt_ib(struct amdgpu_ring *ring)struct amdgpu_ring *kiq_ring = &kiq->ring;unsigned long flags; +if (adev->enable_mes) +return -EINVAL ; +if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)return -EINVAL ;
With MES feature enabled, based on allowing multiple command streams to be executed concurrently on the GPU Vs KIQ that is used to send commands to the GPU in a sequential manner, having both of them active at the same time could lead to conflicts.
Therefore, when the MES is enabled, the KIQ becomes unavailable.
With this understanding, this series is: