drm/amdgpu: move amdgpu_ttm_tt_* declarations into amdgpu_ttm.h
Subsystems (2)
PATCH 1/2 drm/amdgpu: move amdgpu_ttm_tt_* declarations into amdgpu_ttm.h
From: Christian König <[email protected]>
Just some cleanup.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 15 --------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -15
@@ -1813,21 +1813,6 @@ void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, u64 num_bytes, u64 num_vis_bytes);void amdgpu_ttm_placement_from_domain (struct amdgpu_bo *abo,u32 domain);bool amdgpu_ttm_bo_is_amdgpu_bo (struct ttm_buffer_object *bo); -int amdgpu_ttm_tt_get_user_pages (struct ttm_tt *ttm,struct page **pages); -void amdgpu_ttm_tt_set_user_pages (struct ttm_tt *ttm,struct page **pages); -void amdgpu_ttm_tt_mark_user_pages (struct ttm_tt *ttm); -int amdgpu_ttm_tt_set_userptr (struct ttm_tt *ttm,uint64_t addr, -uint32_t flags); -bool amdgpu_ttm_tt_has_userptr (struct ttm_tt *ttm); -struct mm_struct *amdgpu_ttm_tt_get_usermm (struct ttm_tt *ttm); -bool amdgpu_ttm_tt_affect_userptr (struct ttm_tt *ttm,unsigned long start, -unsigned long end); -bool amdgpu_ttm_tt_userptr_invalidated (struct ttm_tt *ttm, -int *last_invalidated); -bool amdgpu_ttm_tt_userptr_needs_pages (struct ttm_tt *ttm); -bool amdgpu_ttm_tt_is_readonly (struct ttm_tt *ttm); -uint64_t amdgpu_ttm_tt_pte_flags (struct amdgpu_device *adev,struct ttm_tt *ttm, -struct ttm_mem_reg *mem);void amdgpu_vram_location (struct amdgpu_device *adev,struct amdgpu_mc *mc,u64 base);void amdgpu_gart_location (struct amdgpu_device *adev,struct amdgpu_mc *mc);void amdgpu_ttm_set_active_vram_size (struct amdgpu_device *adev,u64 size);
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +16 -0
@@ -82,4 +82,20 @@ bool amdgpu_ttm_is_bound(struct ttm_tt *ttm);int amdgpu_ttm_bind (struct ttm_buffer_object *bo,struct ttm_mem_reg *bo_mem);int amdgpu_ttm_recover_gart (struct amdgpu_device *adev); +int amdgpu_ttm_tt_get_user_pages (struct ttm_tt *ttm,struct page **pages); +void amdgpu_ttm_tt_set_user_pages (struct ttm_tt *ttm,struct page **pages); +void amdgpu_ttm_tt_mark_user_pages (struct ttm_tt *ttm); +int amdgpu_ttm_tt_set_userptr (struct ttm_tt *ttm,uint64_t addr, +uint32_t flags); +bool amdgpu_ttm_tt_has_userptr (struct ttm_tt *ttm); +struct mm_struct *amdgpu_ttm_tt_get_usermm (struct ttm_tt *ttm); +bool amdgpu_ttm_tt_affect_userptr (struct ttm_tt *ttm,unsigned long start, +unsigned long end); +bool amdgpu_ttm_tt_userptr_invalidated (struct ttm_tt *ttm, +int *last_invalidated); +bool amdgpu_ttm_tt_userptr_needs_pages (struct ttm_tt *ttm); +bool amdgpu_ttm_tt_is_readonly (struct ttm_tt *ttm); +uint64_t amdgpu_ttm_tt_pte_flags (struct amdgpu_device *adev,struct ttm_tt *ttm, +struct ttm_mem_reg *mem); +#endif
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1504885936-17207-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
PATCH 2/2 drm/amdgpu: move MMU notifier related defines to amdgpu_mn.h
From: Christian König <[email protected]>
Just some cleanup.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 25 +--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 52 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 24 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -24
@@ -66,6 +66,7 @@#include "amdgpu_vce.h" #include "amdgpu_vcn.h" #include "amdgpu_dm.h" +#include "amdgpu_mn.h" #include "gpu_scheduler.h" #include "amdgpu_virt.h"
@@ -180,7 +181,6 @@ struct amdgpu_cs_parser;struct amdgpu_job ;struct amdgpu_irq_src ;struct amdgpu_fpriv ; -struct amdgpu_mn ;struct amdgpu_bo_va_mapping ;enum amdgpu_cp_irq {
@@ -1200,29 +1200,6 @@ void amdgpu_benchmark(struct amdgpu_device *adev, int test_number);void amdgpu_test_moves (struct amdgpu_device *adev);/* -* MMU Notifier -*/ -#if defined(CONFIG_MMU_NOTIFIER ) -void amdgpu_mn_lock (struct amdgpu_mn *mn); -void amdgpu_mn_unlock (struct amdgpu_mn *mn); -struct amdgpu_mn *amdgpu_mn_get (struct amdgpu_device *adev); -int amdgpu_mn_register (struct amdgpu_bo *bo,unsigned long addr); -void amdgpu_mn_unregister (struct amdgpu_bo *bo); -#else -static inline void amdgpu_mn_lock (struct amdgpu_mn *mn) {} -static inline void amdgpu_mn_unlock (struct amdgpu_mn *mn) {} -static inline struct amdgpu_mn *amdgpu_mn_get (struct amdgpu_device *adev) -{ -return NULL ; -} -static inline int amdgpu_mn_register (struct amdgpu_bo *bo,unsigned long addr) -{ -return -ENODEV ; -} -static inline void amdgpu_mn_unregister (struct amdgpu_bo *bo) {} -#endif - -/* * Debugfs */ struct amdgpu_debugfs {
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h new file +52 -0
52 lines not on this page · raw message
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1504885936-17207-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org
Michel Dänzer
Reviewed-byRe: [PATCH 2/2] drm/amdgpu: move MMU notifier related defines to amdgpu_mn.h
Quoted 16 lines · Christian König
From: Christian König <[email protected]>
Just some cleanup.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 25 +--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 52 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 24 deletions(-) create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.hdrivers/gpu/drm/amd/amdgpu/amdgpu.h +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu.h line 69
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-0@@ -66,6 +66,7 @@#include "amdgpu_vce.h" #include "amdgpu_vcn.h" #include "amdgpu_dm.h" +#include "amdgpu_mn.h"
It would be better to add this line in other files which actually reference amdgpu_mn* instead of here. With that, and for patch 1 either way,
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): a27909e8-6045-59c4-a63e-93c72182f86a-otUistvHUpPR7s880joybQ@public.gmane.org
Re: [PATCH 2/2] drm/amdgpu: move MMU notifier related defines to amdgpu_mn.h
Am 11.09.2017 um 02:55 schrieb Michel Dänzer:
Quoted 12 lines · Christian König
Quoted 11 lines
From: Christian König <[email protected]>
Just some cleanup.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 25 +--------------- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 52 ++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 24 deletions(-)create mode 100644
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h line 69
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1
-0@@ -66,6 +66,7 @@#include "amdgpu_vce.h" #include "amdgpu_vcn.h" #include "amdgpu_dm.h" +#include "amdgpu_mn.h" It would be better to add this line in other files which actually reference amdgpu_mn* instead of here.
Yeah, that is the long term plan. But for the short term I want to decompose amdgpu.h into smaller and smaller parts first.
Including the parts which are only needed by certain components is the next step then.
Quoted 3 lines
With that, and for patch 1 either way,
Reviewed-by Michel Dänzer <[email protected]>
Thanks,
Christian.
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Alex Deucher
Reviewed-byQuoted 5 lines · Christian König
From: Christian König <[email protected]>
Just some cleanup.
Signed-off-by Christian König <[email protected]>
Quoted 59 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 15 --------------- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +0
-15@@ -1813,21 +1813,6 @@ void amdgpu_cs_report_moved_bytes(struct amdgpu_device *adev, u64 num_bytes, u64 num_vis_bytes);void amdgpu_ttm_placement_from_domain (struct amdgpu_bo *abo,u32 domain);bool amdgpu_ttm_bo_is_amdgpu_bo (struct ttm_buffer_object *bo); -int amdgpu_ttm_tt_get_user_pages (struct ttm_tt *ttm,struct page **pages); -void amdgpu_ttm_tt_set_user_pages (struct ttm_tt *ttm,struct page **pages); -void amdgpu_ttm_tt_mark_user_pages (struct ttm_tt *ttm); -int amdgpu_ttm_tt_set_userptr (struct ttm_tt *ttm,uint64_t addr, -uint32_t flags); -bool amdgpu_ttm_tt_has_userptr (struct ttm_tt *ttm); -struct mm_struct *amdgpu_ttm_tt_get_usermm (struct ttm_tt *ttm); -bool amdgpu_ttm_tt_affect_userptr (struct ttm_tt *ttm,unsigned long start, -unsigned long end); -bool amdgpu_ttm_tt_userptr_invalidated (struct ttm_tt *ttm, -int *last_invalidated); -bool amdgpu_ttm_tt_userptr_needs_pages (struct ttm_tt *ttm); -bool amdgpu_ttm_tt_is_readonly (struct ttm_tt *ttm); -uint64_t amdgpu_ttm_tt_pte_flags (struct amdgpu_device *adev,struct ttm_tt *ttm, -struct ttm_mem_reg *mem);void amdgpu_vram_location (struct amdgpu_device *adev,struct amdgpu_mc *mc,u64 base);void amdgpu_gart_location (struct amdgpu_device *adev,struct amdgpu_mc *mc);void amdgpu_ttm_set_active_vram_size (struct amdgpu_device *adev,u64 size);drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +16
-1@@ -82,4 +82,20 @@ bool amdgpu_ttm_is_bound(struct ttm_tt *ttm);int amdgpu_ttm_bind (struct ttm_buffer_object *bo,struct ttm_mem_reg *bo_mem);int amdgpu_ttm_recover_gart (struct amdgpu_device *adev); +int amdgpu_ttm_tt_get_user_pages (struct ttm_tt *ttm,struct page **pages); +void amdgpu_ttm_tt_set_user_pages (struct ttm_tt *ttm,struct page **pages); +void amdgpu_ttm_tt_mark_user_pages (struct ttm_tt *ttm); +int amdgpu_ttm_tt_set_userptr (struct ttm_tt *ttm,uint64_t addr, +uint32_t flags); +bool amdgpu_ttm_tt_has_userptr (struct ttm_tt *ttm); +struct mm_struct *amdgpu_ttm_tt_get_usermm (struct ttm_tt *ttm); +bool amdgpu_ttm_tt_affect_userptr (struct ttm_tt *ttm,unsigned long start, +unsigned long end); +bool amdgpu_ttm_tt_userptr_invalidated (struct ttm_tt *ttm, +int *last_invalidated); +bool amdgpu_ttm_tt_userptr_needs_pages (struct ttm_tt *ttm); +bool amdgpu_ttm_tt_is_readonly (struct ttm_tt *ttm); +uint64_t amdgpu_ttm_tt_pte_flags (struct amdgpu_device *adev,struct ttm_tt *ttm, +struct ttm_mem_reg *mem); +#endif --2.7.4
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx