[PATCH] drm/amd/powerplay: add missing header file declaration

Liu, Aaron Aaron.Liu at amd.com
Tue Nov 19 05:07:09 UTC 2019


Acked-by: Aaron Liu <aaron.liu at amd.com>

BR,
Aaron Liu

> -----Original Message-----
> From: Quan, Evan <Evan.Quan at amd.com>
> Sent: Tuesday, November 19, 2019 11:57 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Liu, Aaron <Aaron.Liu at amd.com>; Quan, Evan <Evan.Quan at amd.com>
> Subject: [PATCH] drm/amd/powerplay: add missing header file declaration
> 
> This can fix the compile errors below:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c: In function
> ‘smu_v11_0_baco_set_state’:
> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1674:27: error:
> implicit declaration of function ‘amdgpu_ras_get_context’ [-Werror=implicit-
> function-declaration]
>   struct amdgpu_ras *ras = amdgpu_ras_get_context(adev);
>                            ^
> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1674:27: warning:
> initialization makes pointer from integer without a cast [-Wint-conversion]
> drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:1692:19: error:
> dereferencing pointer to incomplete type ‘struct amdgpu_ras’
>    if (!ras || !ras->supported) {
> 
> Change-Id: I1242e64e82715774b8e2931530749782b9107e32
> Signed-off-by: Evan Quan <evan.quan at amd.com>
> ---
>  drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> index 8b1c4164a1f6..f677743cb511 100644
> --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
> @@ -37,6 +37,7 @@
>  #include "soc15_common.h"
>  #include "atom.h"
>  #include "amd_pcie.h"
> +#include "amdgpu_ras.h"
> 
>  #include "asic_reg/thm/thm_11_0_2_offset.h"
>  #include "asic_reg/thm/thm_11_0_2_sh_mask.h"
> --
> 2.24.0



More information about the amd-gfx mailing list