use DRM_WARN instead of dev_warn

Change-Id: I8ede212b5f99b1f77d0bd7499da3d85873403c7a
Signed-off-by: Chunming Zhou <david1.z...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 6 +++++-
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 6 +++++-
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 9fc3296592fe..dae73f6768c2 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -450,9 +450,13 @@ static void gmc_v6_0_set_prt(struct amdgpu_device *adev, 
bool enable)
        u32 tmp;
 
        if (enable && !adev->gmc.prt_warning) {
-               dev_warn(adev->dev, "Disabling VM faults because of PRT 
request!\n");
+               DRM_WARN("Disabling VM faults because of PRT request!\n");
                adev->gmc.prt_warning = true;
        }
+       if (!enable && adev->gmc.prt_warning) {
+               DRM_WARN("Re-enabling VM faults!\n");
+               adev->gmc.prt_warning = false;
+       }
 
        tmp = RREG32(mmVM_PRT_CNTL);
        tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index 761dcfb2fec0..5bdeb358bfb5 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -544,9 +544,13 @@ static void gmc_v7_0_set_prt(struct amdgpu_device *adev, 
bool enable)
        uint32_t tmp;
 
        if (enable && !adev->gmc.prt_warning) {
-               dev_warn(adev->dev, "Disabling VM faults because of PRT 
request!\n");
+               DRM_WARN("Disabling VM faults because of PRT request!\n");
                adev->gmc.prt_warning = true;
        }
+       if (!enable && adev->gmc.prt_warning) {
+               DRM_WARN("Re-enabling VM faults!\n");
+               adev->gmc.prt_warning = false;
+       }
 
        tmp = RREG32(mmVM_PRT_CNTL);
        tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 1ad7e6b8ed1d..5150ab614eaa 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -770,9 +770,13 @@ static void gmc_v8_0_set_prt(struct amdgpu_device *adev, 
bool enable)
        u32 tmp;
 
        if (enable && !adev->gmc.prt_warning) {
-               dev_warn(adev->dev, "Disabling VM faults because of PRT 
request!\n");
+               DRM_WARN("Disabling VM faults because of PRT request!\n");
                adev->gmc.prt_warning = true;
        }
+       if (!enable && adev->gmc.prt_warning) {
+               DRM_WARN("Re-enabling VM faults!\n");
+               adev->gmc.prt_warning = false;
+       }
 
        tmp = RREG32(mmVM_PRT_CNTL);
        tmp = REG_SET_FIELD(tmp, VM_PRT_CNTL,
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to