[PATCH] drm/amd/powerplay: initlialize smu->is_apu is false by default
Wang, Kevin(Yang)
Kevin1.Wang at amd.com
Fri Sep 27 09:05:00 UTC 2019
this member should be initialize in smu driver.
by default should be set "false".
Best Regards,
Kevin
________________________________
From: Liang, Prike <Prike.Liang at amd.com>
Sent: Friday, September 27, 2019 4:37 PM
To: Wang, Kevin(Yang) <Kevin1.Wang at amd.com>; amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Huang, Ray <Ray.Huang at amd.com>; Feng, Kenneth <Kenneth.Feng at amd.com>
Subject: RE: [PATCH] drm/amd/powerplay: initlialize smu->is_apu is false by default
Does use the default value (false) for the Boolean variable of is_apu not enough for identifying DGPU?
Anyway, initialize the is_apu during smu early initialize also fine and the patch is
Reviewed-by: Prike Liang <Prike.Liang at amd.com>
Thanks,
Prike
> -----Original Message-----
> From: Wang, Kevin(Yang) <Kevin1.Wang at amd.com>
> Sent: Friday, September 27, 2019 2:58 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Huang, Ray <Ray.Huang at amd.com>; Feng, Kenneth
> <Kenneth.Feng at amd.com>; Liang, Prike <Prike.Liang at amd.com>; Wang,
> Kevin(Yang) <Kevin1.Wang at amd.com>
> Subject: [PATCH] drm/amd/powerplay: initlialize smu->is_apu is false by
> default
>
> the member of is_apu in smu_context need to initlialize by default.
>
> set default value is false (dGPU)
>
> for patch:
> drm/amd/powerplay: bypass dpm_context null pointer check guard
> for some smu series
>
> Signed-off-by: Kevin Wang <kevin1.wang at amd.com>
> ---
> drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> index 7b995b0834eb..6a64f765fcd4 100644
> --- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> +++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
> @@ -712,6 +712,7 @@ static int smu_early_init(void *handle)
>
> smu->adev = adev;
> smu->pm_enabled = !!amdgpu_dpm;
> + smu->is_apu = false;
> mutex_init(&smu->mutex);
>
> return smu_set_funcs(adev);
> --
> 2.17.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190927/4a4bd713/attachment.html>
More information about the amd-gfx
mailing list