[PATCH 03/14] drm/amd: Convert dev_err_once() messages to drm_err_once()
Mario Limonciello
superm1 at kernel.org
Mon Mar 31 04:20:23 UTC 2025
On 3/28/25 14:04, Alex Deucher wrote:
> 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
>
Yeah it's just consistency that you end up with a [drm] at the end of
the dev_*() prefix for all messages. So you can easily find all drm
core and amdgpu messages by grep'ing '[drm]'.
>>
>> 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