[PATCH 1/3] amdgpu: move ttm domain definitions to amdgpu.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 18, 2016 at 10:05:09AM +0200, Christian König wrote:
> 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.
OK. I'll update patch to move them into amdgpu_ttm.h. AMDGPU_PL_...
definitions in amdgpu_gds.h is really unfriendly to newly added ones.
> 
> 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;
> 
> 


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux