[PATCH] drm/amdgpu: Move vram, gtt & flash defines to amdgpu_ ttm & _psp.h
Mario Limonciello
mario.limonciello at amd.com
Thu Jul 27 18:22:38 UTC 2023
On 7/27/2023 11:31, Srinivasan Shanmugam wrote:
> As amdgpu.h is getting decomposed, move vram and gtt extern defines into
> amdgpu_ttm.h & flash extern to amdgpu_psp.h
>
> 'Fixes: 35488e44ed48 ("drm/amdgpu: Move externs to amdgpu.h file from
> amdgpu_drv.c")'
> Suggested-by: Christian König <christian.koenig at amd.com>
> Cc: Mario Limonciello <mario.limonciello at amd.com>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ----
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 ++
> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 3 +++
> 4 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 93d0f4c7b560..a046160b6a0e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -1524,8 +1524,4 @@ static inline bool amdgpu_is_tmz(struct amdgpu_device *adev)
>
> int amdgpu_in_reset(struct amdgpu_device *adev);
>
> -extern const struct attribute_group amdgpu_vram_mgr_attr_group;
> -extern const struct attribute_group amdgpu_gtt_mgr_attr_group;
> -extern const struct attribute_group amdgpu_flash_attr_group;
> -
> #endif
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 900be3a62cdc..ea4951c08a7b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -51,6 +51,7 @@
> #include "amdgpu_xgmi.h"
> #include "amdgpu_reset.h"
> #include "../amdxcp/amdgpu_xcp_drv.h"
> +#include "amdgpu_psp.h"
>
IMO, if you're adding new headers here we may as well sort them
alphabetically first in a prerequisite patch and put this one in the
correct place.
> /*
> * KMS wrapper.
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> index c3203de4a007..e8cbfacb5ac1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> @@ -39,6 +39,8 @@
> #define PSP_TMR_ALIGNMENT 0x100000
> #define PSP_FW_NAME_LEN 0x24
>
> +extern const struct attribute_group amdgpu_flash_attr_group;
> +
> enum psp_shared_mem_size {
> PSP_ASD_SHARED_MEM_SIZE = 0x0,
> PSP_XGMI_SHARED_MEM_SIZE = 0x4000,
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> index 6d0d66e40db9..96732897f87a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> @@ -39,6 +39,9 @@
>
> #define AMDGPU_POISON 0xd0bed0be
>
> +extern const struct attribute_group amdgpu_vram_mgr_attr_group;
> +extern const struct attribute_group amdgpu_gtt_mgr_attr_group;
> +
> struct hmm_range;
>
> struct amdgpu_gtt_mgr {
More information about the amd-gfx
mailing list