Remove #include "amdgpu_uid.h" from amdgpu.h and add a foward declaration of struct amdgpu_uid.
Add #include "amdgpu_uid.h" into files amdgpu_device.c, amdgpu_xcp.c, smu_v13_0_12_ppt.c, smu_v13_0_6_ppt.c, and smu_v15_0_8_ppt.c. Signed-off-by: Shahyan Soltani <[email protected]> Acked-by: Christian König <[email protected]> --- This patch and patch 2 can be dropped if moving amdgpu_uid out of amdgpu.h is not desirable. --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 + drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index fff532bdc6ac..358508120dfd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h @@ -117,7 +117,6 @@ #include "amdgpu_mes.h" #include "amdgpu_sa.h" #include "amdgpu_acpi.h" -#include "amdgpu_uid.h" #include "amdgpu_video_codecs.h" #if defined(CONFIG_DRM_AMD_ISP) #include "amdgpu_isp.h" @@ -328,6 +327,7 @@ struct amdgpu_hive_info; struct amdgpu_reset_context; struct amdgpu_reset_control; struct amdgpu_coredump_info; +struct amdgpu_uid; enum amdgpu_cp_irq { AMDGPU_CP_IRQ_GFX_ME0_PIPE0_EOP = 0, diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 8d55658ecb31..f6905f9da587 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -78,6 +78,7 @@ #include "amdgpu_reset.h" #include "amdgpu_virt.h" #include "amdgpu_dev_coredump.h" +#include "amdgpu_uid.h" #include <linux/suspend.h> #include <drm/task_barrier.h> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c index 88e6eab91bc6..0f2e4d2995b9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c @@ -23,6 +23,7 @@ #include "amdgpu.h" #include "amdgpu_xcp.h" #include "amdgpu_drv.h" +#include "amdgpu_uid.h" #include <drm/drm_drv.h> #include "../amdxcp/amdgpu_xcp_drv.h" diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c index 12b57a0f4fc4..f61bdc2aed5e 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c @@ -35,6 +35,7 @@ #include <linux/pci.h> #include "smu_cmn.h" #include "amdgpu_ras.h" +#include "amdgpu_uid.h" #undef MP1_Public #undef smnMP1_FIRMWARE_FLAGS diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c index ce520f43ab94..799ef8dbe66c 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c @@ -50,6 +50,7 @@ #include "mp/mp_13_0_6_offset.h" #include "mp/mp_13_0_6_sh_mask.h" #include "umc_v12_0.h" +#include "amdgpu_uid.h" #undef MP1_Public #undef smnMP1_FIRMWARE_FLAGS diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c index 2105a1d7bb34..c241fe5f2e09 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c @@ -36,6 +36,7 @@ #include "mp/mp_15_0_8_sh_mask.h" #include "smu_v15_0.h" #include "amdgpu_fru_eeprom.h" +#include "amdgpu_uid.h" #undef MP1_Public -- 2.54.0
