[PATCH 03/14] drm/amd: Convert dev_err_once() messages to drm_err_once()
Alex Deucher
alexdeucher at gmail.com
Fri Mar 28 19:04:32 UTC 2025
On Thu, Mar 27, 2025 at 4:48 PM Mario Limonciello <superm1 at kernel.org> wrote:
>
> From: Mario Limonciello <mario.limonciello at amd.com>
>
> The errors for power consumption in amdgpu_acpi_is_s0ix_active() are
> under device scope. As they're drm errors, adjust to drm scope.
Is there an advantage to drm vs dev scope? I guess just consistency
with core drm messages? I presume the drm variants also print device
information so we can differentiate between multiple GPUs in a system?
That was why we transitioned from the DRM to the dev variants in the
first place.
Alex
>
> Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> index 840901d65fed7..4372738bf2c9d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
> @@ -1518,14 +1518,14 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
> * in that case.
> */
> if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) {
> - dev_err_once(adev->dev,
> + drm_err_once(adev_to_drm(adev),
> "Power consumption will be higher as BIOS has not been configured for suspend-to-idle.\n"
> "To use suspend-to-idle change the sleep mode in BIOS setup.\n");
> return false;
> }
>
> #if !IS_ENABLED(CONFIG_AMD_PMC)
> - dev_err_once(adev->dev,
> + drm_err_once(adev_to_drm(adev),
> "Power consumption will be higher as the kernel has not been compiled with CONFIG_AMD_PMC.\n");
> return false;
> #else
> --
> 2.43.0
>
More information about the amd-gfx
mailing list