[PATCH 2/7] drm/amd/dc: Use forward declaration instand of include header file

Harry Wentland harry.wentland at amd.com
Tue Feb 27 19:42:11 UTC 2018


On 2018-02-27 06:27 AM, Rex Zhu wrote:
> avoid build error:
> 
> drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smu9_driver_if.h:342:3: error: redeclaration of enumerator ‘WM_COUNT’
>    WM_COUNT,
>    ^
> In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:32:0,
>                  from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services.h:35,
>                  from drivers/gpu/drm/amd/amdgpu/../display/modules/inc/mod_freesync.h:57,
>                  from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_mode.h:48,
>                  from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:55,
>                  from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/amd_powerplay.h:33,
>                  from drivers/gpu/drm/amd/amdgpu/../powerplay/inc/smumgr.h:26,
>                  from drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega10_smumgr.c:24:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dm_pp_smu.h:43:2: note: previous definition of ‘WM_COUNT’ was here
>   WM_COUNT,
> 
> Change-Id: If1bc3c268594bd571afcd2c032cc1295d048369f
> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>

Reviewed-by: Harry Wentland <harry.wentland at amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/dm_services_types.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dm_services_types.h b/drivers/gpu/drm/amd/display/dc/dm_services_types.h
> index fa26cf4..fceeb28 100644
> --- a/drivers/gpu/drm/amd/display/dc/dm_services_types.h
> +++ b/drivers/gpu/drm/amd/display/dc/dm_services_types.h
> @@ -29,7 +29,7 @@
>  #include "os_types.h"
>  #include "dc_types.h"
>  
> -#include "dm_pp_smu.h"
> +struct pp_smu_funcs_rv;
>  
>  struct dm_pp_clock_range {
>  	int min_khz;
> 


More information about the amd-gfx mailing list