All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
@ 2021-10-29 21:17 Mario Limonciello
  2021-10-30  3:49 ` Lazar, Lijo
  0 siblings, 1 reply; 7+ messages in thread
From: Mario Limonciello @ 2021-10-29 21:17 UTC (permalink / raw)
  To: amd-gfx; +Cc: Mario Limonciello, Alex Deucher

This command corresponding to this attribute was deprecated in the PMFW
for YC so don't show a non-functional attribute.

Since future APUs may be brought up using IP version checking also
disable it for future APU's.  If any do support the command then they
can be treated as exceptions.

Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 49fe4155c374..c7326f0ec517 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -2094,6 +2094,9 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
 	} else if (DEVICE_ATTR_IS(pp_dpm_dclk)) {
 		if (!(asic_type == CHIP_VANGOGH || asic_type == CHIP_SIENNA_CICHLID))
 			*states = ATTR_STATE_UNSUPPORTED;
+	} else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
+		if ((adev->flags & AMD_IS_APU) && asic_type >= CHIP_YELLOW_CARP)
+			*states = ATTR_STATE_UNSUPPORTED;
 	}
 
 	switch (asic_type) {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
  2021-10-29 21:17 [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs Mario Limonciello
@ 2021-10-30  3:49 ` Lazar, Lijo
  2021-10-30 14:41   ` Alex Deucher
  0 siblings, 1 reply; 7+ messages in thread
From: Lazar, Lijo @ 2021-10-30  3:49 UTC (permalink / raw)
  To: Limonciello, Mario, amd-gfx; +Cc: Limonciello, Mario, Deucher, Alexander

[-- Attachment #1: Type: text/plain, Size: 175 bytes --]

[Public]

Instead of ASIC check better to do the check based on ppt_func->get_power_profile_mode. If function is NULL/not implemented, drop the attribute.

Thanks,
Lijo

[-- Attachment #2: Type: text/html, Size: 685 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
  2021-10-30  3:49 ` Lazar, Lijo
@ 2021-10-30 14:41   ` Alex Deucher
  2021-10-30 15:05     ` Lazar, Lijo
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2021-10-30 14:41 UTC (permalink / raw)
  To: Lazar, Lijo; +Cc: Limonciello, Mario, amd-gfx, Deucher, Alexander

On Fri, Oct 29, 2021 at 11:49 PM Lazar, Lijo <Lijo.Lazar@amd.com> wrote:
>
> [Public]
>
>
> Instead of ASIC check better to do the check based on ppt_func->get_power_profile_mode. If function is NULL/not implemented, drop the attribute.
>

The pointer is always there at the subsystem level.  E.g.,
smu_get_power_profile_mode()

Alex

> Thanks,
> Lijo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
  2021-10-30 14:41   ` Alex Deucher
@ 2021-10-30 15:05     ` Lazar, Lijo
  2021-11-01  2:46       ` Limonciello, Mario
  0 siblings, 1 reply; 7+ messages in thread
From: Lazar, Lijo @ 2021-10-30 15:05 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Limonciello, Mario, amd-gfx, Deucher, Alexander

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

[Public]

For swsmu, we could add a helper macro like smu_is_supported(x) that checks if ppt func is not NULL.

Thanks,
Lijo

[-- Attachment #2: Type: text/html, Size: 530 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
  2021-10-30 15:05     ` Lazar, Lijo
@ 2021-11-01  2:46       ` Limonciello, Mario
  2021-11-01  3:41         ` Lazar, Lijo
  0 siblings, 1 reply; 7+ messages in thread
From: Limonciello, Mario @ 2021-11-01  2:46 UTC (permalink / raw)
  To: Lazar, Lijo, Alex Deucher; +Cc: amd-gfx, Deucher,  Alexander

[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

[Public]

smu_get_power_profile_mode actually calls smu->ppt_funcs->get_power_profile_mode

So shouldn't it be sufficient to do this?

        } else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
                if (!adev->smu.ppt_funcs->get_power_profile_mode)
                        *states = ATTR_STATE_UNSUPPORTED;
        }


From: Lazar, Lijo <Lijo.Lazar@amd.com>
Sent: Saturday, October 30, 2021 10:06
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Limonciello, Mario <Mario.Limonciello@amd.com>; amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs


[Public]

For swsmu, we could add a helper macro like smu_is_supported(x) that checks if ppt func is not NULL.

Thanks,
Lijo

[-- Attachment #2: Type: text/html, Size: 6337 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
  2021-11-01  2:46       ` Limonciello, Mario
@ 2021-11-01  3:41         ` Lazar, Lijo
  2021-11-01 13:27           ` Alex Deucher
  0 siblings, 1 reply; 7+ messages in thread
From: Lazar, Lijo @ 2021-11-01  3:41 UTC (permalink / raw)
  To: Limonciello, Mario, Alex Deucher; +Cc: amd-gfx, Deucher,  Alexander

[-- Attachment #1: Type: text/plain, Size: 1449 bytes --]

There are two subsystems - powerplay and swsmu. The subsystem implementation details are hidden from amdgpu_pm funcs. I thought Alex is talking about that.

Thanks,
Lijo
________________________________
From: Limonciello, Mario <Mario.Limonciello@amd.com>
Sent: Monday, November 1, 2021 8:16:27 AM
To: Lazar, Lijo <Lijo.Lazar@amd.com>; Alex Deucher <alexdeucher@gmail.com>
Cc: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: RE: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs


[Public]



smu_get_power_profile_mode actually calls smu->ppt_funcs->get_power_profile_mode



So shouldn’t it be sufficient to do this?



        } else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {

                if (!adev->smu.ppt_funcs->get_power_profile_mode)

                        *states = ATTR_STATE_UNSUPPORTED;

        }





From: Lazar, Lijo <Lijo.Lazar@amd.com>
Sent: Saturday, October 30, 2021 10:06
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Limonciello, Mario <Mario.Limonciello@amd.com>; amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs



[Public]



For swsmu, we could add a helper macro like smu_is_supported(x) that checks if ppt func is not NULL.



Thanks,
Lijo

[-- Attachment #2: Type: text/html, Size: 6381 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
  2021-11-01  3:41         ` Lazar, Lijo
@ 2021-11-01 13:27           ` Alex Deucher
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Deucher @ 2021-11-01 13:27 UTC (permalink / raw)
  To: Lazar, Lijo; +Cc: Deucher, Alexander, Limonciello, Mario, amd-gfx

Right.

Alex

On Sun, Oct 31, 2021 at 11:41 PM Lazar, Lijo <Lijo.Lazar@amd.com> wrote:
>
> There are two subsystems - powerplay and swsmu. The subsystem implementation details are hidden from amdgpu_pm funcs. I thought Alex is talking about that.
>
> Thanks,
> Lijo
> ________________________________
> From: Limonciello, Mario <Mario.Limonciello@amd.com>
> Sent: Monday, November 1, 2021 8:16:27 AM
> To: Lazar, Lijo <Lijo.Lazar@amd.com>; Alex Deucher <alexdeucher@gmail.com>
> Cc: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: RE: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
>
>
> [Public]
>
>
>
> smu_get_power_profile_mode actually calls smu->ppt_funcs->get_power_profile_mode
>
>
>
> So shouldn’t it be sufficient to do this?
>
>
>
>         } else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
>
>                 if (!adev->smu.ppt_funcs->get_power_profile_mode)
>
>                         *states = ATTR_STATE_UNSUPPORTED;
>
>         }
>
>
>
>
>
> From: Lazar, Lijo <Lijo.Lazar@amd.com>
> Sent: Saturday, October 30, 2021 10:06
> To: Alex Deucher <alexdeucher@gmail.com>
> Cc: Limonciello, Mario <Mario.Limonciello@amd.com>; amd-gfx@lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs
>
>
>
> [Public]
>
>
>
> For swsmu, we could add a helper macro like smu_is_supported(x) that checks if ppt func is not NULL.
>
>
>
> Thanks,
> Lijo

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-01 13:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 21:17 [PATCH] drm/amdgpu/pm: Don't show pp_power_profile_mode for YC and later APUs Mario Limonciello
2021-10-30  3:49 ` Lazar, Lijo
2021-10-30 14:41   ` Alex Deucher
2021-10-30 15:05     ` Lazar, Lijo
2021-11-01  2:46       ` Limonciello, Mario
2021-11-01  3:41         ` Lazar, Lijo
2021-11-01 13:27           ` Alex Deucher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.