[PATCH v2] drm/amdgpu: Move vram, gtt & flash defines to amdgpu_ ttm & _psp.h

Chen, Guchun Guchun.Chen at amd.com
Mon Jul 31 08:47:03 UTC 2023


[Public]

Acked-by: Guchun Chen <guchun.chen at amd.com>

Regards,
Guchun

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Srinivasan Shanmugam
> Sent: Friday, July 28, 2023 12:27 PM
> To: Koenig, Christian <Christian.Koenig at amd.com>; Deucher, Alexander
> <Alexander.Deucher at amd.com>; Limonciello, Mario
> <Mario.Limonciello at amd.com>
> Cc: SHANMUGAM, SRINIVASAN <SRINIVASAN.SHANMUGAM at amd.com>;
> amd-gfx at lists.freedesktop.org
> Subject: [PATCH v2] drm/amdgpu: Move vram, gtt & flash defines to
> amdgpu_ ttm & _psp.h
>
> 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>
> ---
>
> v2:
>
>    1. As a prerequisite, sorted the inludes in other patch
>       https://patchwork.freedesktop.org/patch/549850/ | drm/amdgpu: Sort
> the includes in amdgpu/amdgpu_drv.c (Mario)
>    2. Include _psp.h, & moved vram & gtt extern defines into appropriate
>       places (Mario)
>
>
>  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 +++
>  3 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 90faaf1eadcd..0fec81d6a7df 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -45,6 +45,7 @@
>  #include "amdgpu_drv.h"
>  #include "amdgpu_fdinfo.h"
>  #include "amdgpu_irq.h"
> +#include "amdgpu_psp.h"
>  #include "amdgpu_ras.h"
>  #include "amdgpu_reset.h"
>  #include "amdgpu_sched.h"
> 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 {
> --
> 2.25.1

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 16534 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20230731/fa2a577d/attachment-0001.bin>


More information about the amd-gfx mailing list