From: Mario Limonciello <mario.limoncie...@amd.com>

Messages emitted from amdgpu_atombios are currently with legacy DRM
macros. These don't show which device they are using. To make messages
clearer in multi-GPU systems adjust to drm_*() macros.

Signed-off-by: Mario Limonciello <mario.limoncie...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 28 +++++++++++---------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
index e476e45b996a2..efdcedc372887 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c
@@ -370,7 +370,7 @@ bool 
amdgpu_atombios_get_connector_info_from_object_table(struct amdgpu_device *
                                continue;
 
                        if (con_obj_id >= ARRAY_SIZE(object_connector_convert)) 
{
-                               DRM_ERROR("invalid con_obj_id %d for device tag 
0x%04x\n",
+                               drm_err(adev_to_drm(adev), "invalid con_obj_id 
%d for device tag 0x%04x\n",
                                          con_obj_id, 
le16_to_cpu(path->usDeviceTag));
                                continue;
                        }
@@ -875,7 +875,7 @@ static void amdgpu_atombios_get_igp_ss_overrides(struct 
amdgpu_device *adev,
                        }
                        break;
                default:
-                       DRM_ERROR("Unsupported IGP table: %d %d\n", frev, crev);
+                       drm_err(adev_to_drm(adev), "Unsupported IGP table: %d 
%d\n", frev, crev);
                        break;
                }
                if (percentage)
@@ -995,7 +995,8 @@ bool amdgpu_atombios_get_asic_ss_info(struct amdgpu_device 
*adev,
                        }
                        break;
                default:
-                       DRM_ERROR("Unsupported ASIC_InternalSS_Info table: %d 
%d\n", frev, crev);
+                       drm_err(adev_to_drm(adev),
+                               "Unsupported ASIC_InternalSS_Info table: %d 
%d\n", frev, crev);
                        break;
                }
 
@@ -1254,7 +1255,7 @@ int amdgpu_atombios_get_max_vddc(struct amdgpu_device 
*adev, u8 voltage_type,
                *voltage = le16_to_cpu(args.v3.usVoltageLevel);
                break;
        default:
-               DRM_ERROR("Unknown table version %d, %d\n", frev, crev);
+               drm_err(adev_to_drm(adev), "Unknown table version %d, %d\n", 
frev, crev);
                return -EINVAL;
        }
 
@@ -1329,12 +1330,12 @@ int amdgpu_atombios_get_svi2_info(struct amdgpu_device 
*adev,
                                }
                                break;
                        default:
-                               DRM_ERROR("unknown voltage object table\n");
+                               drm_err(adev_to_drm(adev), "unknown voltage 
object table\n");
                                return -EINVAL;
                        }
                        break;
                default:
-                       DRM_ERROR("unknown voltage object table\n");
+                       drm_err(adev_to_drm(adev), "unknown voltage object 
table\n");
                        return -EINVAL;
                }
 
@@ -1365,12 +1366,12 @@ amdgpu_atombios_is_voltage_gpio(struct amdgpu_device 
*adev,
                                        return true;
                                break;
                        default:
-                               DRM_ERROR("unknown voltage object table\n");
+                               drm_err(adev_to_drm(adev), "unknown voltage 
object table\n");
                                return false;
                        }
                        break;
                default:
-                       DRM_ERROR("unknown voltage object table\n");
+                       drm_err(adev_to_drm(adev), "unknown voltage object 
table\n");
                        return false;
                }
 
@@ -1423,12 +1424,12 @@ int amdgpu_atombios_get_voltage_table(struct 
amdgpu_device *adev,
                                }
                                break;
                        default:
-                               DRM_ERROR("unknown voltage object table\n");
+                               drm_err(adev_to_drm(adev), "unknown voltage 
object table\n");
                                return -EINVAL;
                        }
                        break;
                default:
-                       DRM_ERROR("unknown voltage object table\n");
+                       drm_err(adev_to_drm(adev), "unknown voltage object 
table\n");
                        return -EINVAL;
                }
        }
@@ -1467,7 +1468,7 @@ int amdgpu_atombios_init_mc_reg_table(struct 
amdgpu_device *adev,
                        (adev->mode_info.atom_context->bios + data_offset);
                switch (frev) {
                case 1:
-                       DRM_ERROR("old table version %d, %d\n", frev, crev);
+                       drm_err(adev_to_drm(adev), "old table version %d, 
%d\n", frev, crev);
                        return -EINVAL;
                case 2:
                        switch (crev) {
@@ -1529,12 +1530,13 @@ int amdgpu_atombios_init_mc_reg_table(struct 
amdgpu_device *adev,
                                        return -EINVAL;
                                break;
                        default:
-                               DRM_ERROR("Unknown table version %d, %d\n", 
frev, crev);
+                               drm_err(adev_to_drm(adev),
+                                       "Unknown table version %d, %d\n", frev, 
crev);
                                return -EINVAL;
                        }
                        break;
                default:
-                       DRM_ERROR("Unknown table version %d, %d\n", frev, crev);
+                       drm_err(adev_to_drm(adev), "Unknown table version %d, 
%d\n", frev, crev);
                        return -EINVAL;
                }
                return 0;
-- 
2.43.0

Reply via email to