diff options
author | Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> | 2023-07-20 13:09:24 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-07-25 20:37:25 +0300 |
commit | cbd0606e6a776bf2ba10d4a6957bb7628c0da947 (patch) | |
tree | 2ec7f6616f1a2e044b96601bc894ff8118729245 /drivers/gpu/drm/radeon | |
parent | 8eb94c9b51412dab881211535afeda44d70d6136 (diff) | |
download | linux-cbd0606e6a776bf2ba10d4a6957bb7628c0da947.tar.xz |
drm/radeon: Prefer dev_* variant over printk
Changed from pr_err/info to dev_* variants so that
we get better debug info when there are multiple GPUs
in the system.
Fixes: 09edeb4c1680 ("drm/radeon: Prefer pr_err/_info over printk")
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atpx_handler.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 595354e3ce0b..fb4d931fdf18 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c @@ -94,6 +94,8 @@ static union acpi_object *radeon_atpx_call(acpi_handle handle, int function, union acpi_object atpx_arg_elements[2]; struct acpi_object_list atpx_arg; struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; + struct acpi_device *adev = container_of(handle, struct acpi_device, handle); + struct device *dev = &adev->dev; atpx_arg.count = 2; atpx_arg.pointer = &atpx_arg_elements[0]; @@ -115,8 +117,8 @@ static union acpi_object *radeon_atpx_call(acpi_handle handle, int function, /* Fail only if calling the method fails and ATPX is supported */ if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { - pr_err("failed to evaluate ATPX got %s\n", - acpi_format_exception(status)); + dev_err(dev, "failed to evaluate ATPX got %s\n", + acpi_format_exception(status)); kfree(buffer.pointer); return NULL; } @@ -157,6 +159,8 @@ static void radeon_atpx_parse_functions(struct radeon_atpx_functions *f, u32 mas static int radeon_atpx_validate(struct radeon_atpx *atpx) { u32 valid_bits = 0; + struct acpi_device *adev = container_of(atpx->handle, struct acpi_device, handle); + struct device *dev = &adev->dev; if (atpx->functions.px_params) { union acpi_object *info; @@ -171,7 +175,7 @@ static int radeon_atpx_validate(struct radeon_atpx *atpx) size = *(u16 *) info->buffer.pointer; if (size < 10) { - pr_err("ATPX buffer is too small: %zu\n", size); + dev_err(dev, "ATPX buffer is too small: %zu\n", size); kfree(info); return -EINVAL; } @@ -202,7 +206,7 @@ static int radeon_atpx_validate(struct radeon_atpx *atpx) atpx->is_hybrid = false; if (valid_bits & ATPX_MS_HYBRID_GFX_SUPPORTED) { - pr_info("ATPX Hybrid Graphics\n"); + dev_info(dev, "ATPX Hybrid Graphics\n"); /* * Disable legacy PM methods only when pcie port PM is usable, * otherwise the device might fail to power off or power on. |