[PATCH 04/14] drm/amd: Adjust amdgpu_vpe messages from dev_*() to drm_*()

Mario Limonciello superm1 at kernel.org
Thu Mar 27 20:38:48 UTC 2025


From: Mario Limonciello <mario.limonciello at amd.com>

Messages emitted in amdgpu_vpe are currently device scope, but as
they are drm driver messages they should be drm scope. Adjust
accordingly.

Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
index 121ee17b522bd..25dfe47dc2af0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c
@@ -263,7 +263,7 @@ int amdgpu_vpe_init_microcode(struct amdgpu_vpe *vpe)
 
 	return 0;
 out:
-	dev_err(adev->dev, "fail to initialize vpe microcode\n");
+	drm_err(adev_to_drm(adev), "fail to initialize vpe microcode\n");
 	release_firmware(adev->vpe.fw);
 	adev->vpe.fw = NULL;
 	return ret;
@@ -317,7 +317,8 @@ static int vpe_early_init(struct amdgpu_ip_block *ip_block)
 	vpe_set_ring_funcs(adev);
 	vpe_set_regs(vpe);
 
-	dev_info(adev->dev, "VPE: collaborate mode %s", vpe->collaborate_mode ? "true" : "false");
+	drm_info(adev_to_drm(adev), "VPE: collaborate mode %s",
+		 vpe->collaborate_mode ? "true" : "false");
 
 	return 0;
 }
@@ -347,7 +348,7 @@ static int vpe_common_init(struct amdgpu_vpe *vpe)
 				    &adev->vpe.cmdbuf_gpu_addr,
 				    (void **)&adev->vpe.cmdbuf_cpu_addr);
 	if (r) {
-		dev_err(adev->dev, "VPE: failed to allocate cmdbuf bo %d\n", r);
+		drm_err(adev_to_drm(adev), "VPE: failed to allocate cmdbuf bo %d\n", r);
 		return r;
 	}
 
@@ -635,7 +636,7 @@ static int vpe_ring_preempt_ib(struct amdgpu_ring *ring)
 
 	if (i >= adev->usec_timeout) {
 		r = -EINVAL;
-		dev_err(adev->dev, "ring %d failed to be preempted\n", ring->idx);
+		drm_err(adev_to_drm(adev), "ring %d failed to be preempted\n", ring->idx);
 	}
 
 	/* deassert IB preemption */
@@ -660,7 +661,7 @@ static int vpe_set_powergating_state(struct amdgpu_ip_block *ip_block,
 	struct amdgpu_vpe *vpe = &adev->vpe;
 
 	if (!adev->pm.dpm_enabled)
-		dev_err(adev->dev, "Without PM, cannot support powergating\n");
+		drm_err(adev_to_drm(adev), "Without PM, cannot support powergating\n");
 
 	dev_dbg(adev->dev, "%s: %s!\n", __func__, (state == AMD_PG_STATE_GATE) ? "GATE":"UNGATE");
 
@@ -756,7 +757,7 @@ static int vpe_ring_test_ring(struct amdgpu_ring *ring)
 
 	ret = amdgpu_device_wb_get(adev, &index);
 	if (ret) {
-		dev_err(adev->dev, "(%d) failed to allocate wb slot\n", ret);
+		drm_err(adev_to_drm(adev), "(%d) failed to allocate wb slot\n", ret);
 		return ret;
 	}
 
@@ -765,7 +766,8 @@ static int vpe_ring_test_ring(struct amdgpu_ring *ring)
 
 	ret = amdgpu_ring_alloc(ring, 4);
 	if (ret) {
-		dev_err(adev->dev, "amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, ret);
+		drm_err(adev_to_drm(adev),
+			"amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, ret);
 		goto out;
 	}
 
@@ -800,7 +802,7 @@ static int vpe_ring_test_ib(struct amdgpu_ring *ring, long timeout)
 
 	ret = amdgpu_device_wb_get(adev, &index);
 	if (ret) {
-		dev_err(adev->dev, "(%d) failed to allocate wb slot\n", ret);
+		drm_err(adev_to_drm(adev), "(%d) failed to allocate wb slot\n", ret);
 		return ret;
 	}
 
-- 
2.43.0



More information about the amd-gfx mailing list