Skip to contentSkip to conversation

drm/amdgpu/gfx9: per queue reset only on bare metal

PATCH New Alex Deucher 1 participant 4 messages Jul 18, 2024

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/4 drm/amdgpu/gfx9: per queue reset only on bare metal

It's not supported under SR-IOV at the moment.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c   | 3 +++
 drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 3 +++
 2 files changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +3 -0
index 1a04f52ce0a3..ae23a7848237 100644
@@ -7146,6 +7146,9 @@ static int gfx_v9_0_reset_kcq(struct amdgpu_ring *ring,
 	unsigned long flags;
 	int i, r;
 
+	if (amdgpu_sriov_vf(adev))
+		return -EINVAL;
+
 	if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
 		return -EINVAL;
 
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +3 -0
index 267d5998bb80..eef4173b771c 100644
@@ -3308,6 +3308,9 @@ static int gfx_v9_4_3_reset_kcq(struct amdgpu_ring *ring,
 	unsigned long flags;
 	int r, i;
 
+	if (amdgpu_sriov_vf(adev))
+		return -EINVAL;
+
 	if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
 		return -EINVAL;
 
Signature · 1 line
2.45.2
author maintainer
#1 lore raw

PATCH 2/4 drm/amdgpu/gfx10: per queue reset only on bare metal

It's not supported under SR-IOV at the moment.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c +6 -0
index b833943faa53..a8f26a311faf 100644
@@ -9464,6 +9464,9 @@ static int gfx_v10_0_reset_kgq(struct amdgpu_ring *ring, unsigned int vmid)
 	u64 addr;
 	int r;
 
+	if (amdgpu_sriov_vf(adev))
+		return -EINVAL;
+
 	if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
 		return -EINVAL;
 
@@ -9527,6 +9530,9 @@ static int gfx_v10_0_reset_kcq(struct amdgpu_ring *ring,
 	unsigned long flags;
 	int i, r;
 
+	if (amdgpu_sriov_vf(adev))
+		return -EINVAL;
+
 	if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
 		return -EINVAL;
 
Signature · 1 line
2.45.2
author maintainer
#2 lore raw

PATCH 3/4 drm/amdgpu/gfx11: per queue reset only on bare metal

In reply to Alex Deucher

It's not supported under SR-IOV at the moment.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +6 -0
index 20be1b9ecdc3..021f7394b252 100644
@@ -6529,6 +6529,9 @@ static int gfx_v11_0_reset_kgq(struct amdgpu_ring *ring, unsigned int vmid)
 	struct amdgpu_device *adev = ring->adev;
 	int r;
 
+	if (amdgpu_sriov_vf(adev))
+		return -EINVAL;
+
 	r = amdgpu_mes_reset_legacy_queue(ring->adev, ring, vmid, false);
 	if (r)
 		return r;
@@ -6564,6 +6567,9 @@ static int gfx_v11_0_reset_kcq(struct amdgpu_ring *ring, unsigned int vmid)
 	struct amdgpu_device *adev = ring->adev;
 	int i, r = 0;
 
+	if (amdgpu_sriov_vf(adev))
+		return -EINVAL;
+
 	gfx_v11_0_set_safe_mode(adev, 0);
 	mutex_lock(&adev->srbm_mutex);
 	soc21_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
Signature · 1 line
2.45.2
author maintainer
#3 lore raw

PATCH 4/4 drm/amdgpu/gfx12: per queue reset only on bare metal

In reply to Alex Deucher

It's not supported under SR-IOV at the moment.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c +6 -0
index ba121491f5a7..4ee36a172471 100644
@@ -5140,6 +5140,9 @@ static int gfx_v12_0_reset_kgq(struct amdgpu_ring *ring, unsigned int vmid)
 	struct amdgpu_device *adev = ring->adev;
 	int r;
 
+	if (amdgpu_sriov_vf(adev))
+		return -EINVAL;
+
 	r = amdgpu_mes_reset_legacy_queue(ring->adev, ring, vmid, false);
 	if (r) {
 		dev_err(adev->dev, "reset via MES failed %d\n", r);
@@ -5177,6 +5180,9 @@ static int gfx_v12_0_reset_kcq(struct amdgpu_ring *ring, unsigned int vmid)
 	struct amdgpu_device *adev = ring->adev;
 	int r, i;
 
+	if (amdgpu_sriov_vf(adev))
+		return -EINVAL;
+
 	gfx_v12_0_set_safe_mode(adev, 0);
 	mutex_lock(&adev->srbm_mutex);
 	soc24_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
Signature · 1 line
2.45.2