[PATCH 1/3] amdgpu: move ttm domain definitions to amdgpu.h
Christian König
deathsimple at vodafone.de
Thu Aug 18 08:05:09 UTC 2016
NAK, we explicitly moved them to amdgpu_gds.h.
In general when some code needs those defines it should include the
appropriate header.
But it would make sense to move them into a (to be created)
amdgpu_ttm.h, cause those defines are more TTM related than GDS related.
Regards,
Christiuan.
Am 18.08.2016 um 04:58 schrieb Flora Cui:
> Signed-off-by: Flora Cui <Flora.Cui at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 ++++++++
> drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h | 8 --------
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index a55eb6f..92064be 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -401,6 +401,14 @@ unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring);
> * TTM.
> */
>
> +#define AMDGPU_PL_GDS TTM_PL_PRIV0
> +#define AMDGPU_PL_GWS TTM_PL_PRIV1
> +#define AMDGPU_PL_OA TTM_PL_PRIV2
> +
> +#define AMDGPU_PL_FLAG_GDS TTM_PL_FLAG_PRIV0
> +#define AMDGPU_PL_FLAG_GWS TTM_PL_FLAG_PRIV1
> +#define AMDGPU_PL_FLAG_OA TTM_PL_FLAG_PRIV2
> +
> #define AMDGPU_TTM_LRU_SIZE 20
>
> struct amdgpu_mman_lru {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h
> index 503d540..e73728d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h
> @@ -31,14 +31,6 @@
> #define AMDGPU_GWS_SHIFT PAGE_SHIFT
> #define AMDGPU_OA_SHIFT PAGE_SHIFT
>
> -#define AMDGPU_PL_GDS TTM_PL_PRIV0
> -#define AMDGPU_PL_GWS TTM_PL_PRIV1
> -#define AMDGPU_PL_OA TTM_PL_PRIV2
> -
> -#define AMDGPU_PL_FLAG_GDS TTM_PL_FLAG_PRIV0
> -#define AMDGPU_PL_FLAG_GWS TTM_PL_FLAG_PRIV1
> -#define AMDGPU_PL_FLAG_OA TTM_PL_FLAG_PRIV2
> -
> struct amdgpu_ring;
> struct amdgpu_bo;
>
More information about the amd-gfx
mailing list