Skip to contentSkip to conversation

drm/amdgpu/amdkfd: clean up mmhub and gfxhub includes

PATCH In review Alex Deucher 2 participants 3 messages Oct 22, 2018 – Oct 25, 2018 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/amdkfd: clean up mmhub and gfxhub includes

Use the appropriate mmhub and gfxhub headers rather than adding them to the gmc9 header.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h          | 2 ++
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h             | 6 ------
 drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h           | 2 ++
 4 files changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c +2 -1
index 54c369091f6c..02d1d363931b 100644
@@ -46,7 +46,8 @@
 #include "v9_structs.h"
 #include "soc15.h"
 #include "soc15d.h"
-#include "gmc_v9_0.h"
+#include "mmhub_v1_0.h"
+#include "gfxhub_v1_0.h"
 
 /* HACK: MMHUB and GC both have VM-related register with the same
  * names but different offsets. Define the MMHUB register we need here
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h +2 -0
index 206e29cad753..92d3a70cd9b1 100644
@@ -30,5 +30,7 @@ void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
 					  bool value);
 void gfxhub_v1_0_init(struct amdgpu_device *adev);
 u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev);
+void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
+				uint64_t page_table_base);
 
 #endif
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h +0 -6
index 1fd178a65e66..b030ca5ea107 100644
@@ -27,10 +27,4 @@
 extern const struct amd_ip_funcs gmc_v9_0_ip_funcs;
 extern const struct amdgpu_ip_block_version gmc_v9_0_ip_block;
 
-/* amdgpu_amdkfd*.c */
-void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
-				uint64_t page_table_base);
-void mmhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
-				uint64_t page_table_base);
-
 #endif
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h +2 -0
index bef3d0c0c117..0de0fdf98c00 100644
@@ -34,5 +34,7 @@ int mmhub_v1_0_set_clockgating(struct amdgpu_device *adev,
 void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags);
 void mmhub_v1_0_update_power_gating(struct amdgpu_device *adev,
                                 bool enable);
+void mmhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
+				uint64_t page_table_base);
 
 #endif
Signature · 6 lines
2.13.6

_______________________________________________
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): 20181022222452.1309-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 5 lines · Alex Deucher

Use the appropriate mmhub and gfxhub headers rather than adding them to the gmc9 header.

Ping?

Alex

Quoted 61 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h          | 2 ++
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h             | 6 ------
 drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h           | 2 ++
 4 files changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c +2 -1
index 54c369091f6c..02d1d363931b 100644
@@ -46,7 +46,8 @@
 #include "v9_structs.h"
 #include "soc15.h"
 #include "soc15d.h"
-#include "gmc_v9_0.h"
+#include "mmhub_v1_0.h"
+#include "gfxhub_v1_0.h"
 
 /* HACK: MMHUB and GC both have VM-related register with the same
  * names but different offsets. Define the MMHUB register we need here
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h +2 -0
index 206e29cad753..92d3a70cd9b1 100644
@@ -30,5 +30,7 @@ void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
                                          bool value);
 void gfxhub_v1_0_init(struct amdgpu_device *adev);
 u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev);
+void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
+                               uint64_t page_table_base);
 
 #endif
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h +0 -6
index 1fd178a65e66..b030ca5ea107 100644
@@ -27,10 +27,4 @@
 extern const struct amd_ip_funcs gmc_v9_0_ip_funcs;
 extern const struct amdgpu_ip_block_version gmc_v9_0_ip_block;
 
-/* amdgpu_amdkfd*.c */
-void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
-                               uint64_t page_table_base);
-void mmhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
-                               uint64_t page_table_base);
-
 #endif
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h +2 -1
index bef3d0c0c117..0de0fdf98c00 100644
@@ -34,5 +34,7 @@ int mmhub_v1_0_set_clockgating(struct amdgpu_device *adev,
 void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags);
 void mmhub_v1_0_update_power_gating(struct amdgpu_device *adev,
                                 bool enable);
+void mmhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
+                               uint64_t page_table_base);
 
 #endif
--
Quoted 2 lines

2.13.6

_______________________________________________
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): CADnq5_OW7CWBPze+fMWgeS8Pim_T-UA99hD6Y1PJJ80EpB9asg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Reviewed-by Felix Kuehling
#4 lore raw
Quoted 6 lines · Alex Deucher
Quoted 4 lines · Alex Deucher

Use the appropriate mmhub and gfxhub headers rather than adding them to the gmc9 header.

Ping?

Quoted 62 lines

Alex

Quoted 59 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h          | 2 ++
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h             | 6 ------
 drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h           | 2 ++
 4 files changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c +2 -1
index 54c369091f6c..02d1d363931b 100644
@@ -46,7 +46,8 @@
 #include "v9_structs.h"
 #include "soc15.h"
 #include "soc15d.h"
-#include "gmc_v9_0.h"
+#include "mmhub_v1_0.h"
+#include "gfxhub_v1_0.h"
 
 /* HACK: MMHUB and GC both have VM-related register with the same
  * names but different offsets. Define the MMHUB register we need here
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h +2 -0
index 206e29cad753..92d3a70cd9b1 100644
@@ -30,5 +30,7 @@ void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
                                          bool value);
 void gfxhub_v1_0_init(struct amdgpu_device *adev);
 u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev);
+void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
+                               uint64_t page_table_base);
 
 #endif
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.h +0 -6
index 1fd178a65e66..b030ca5ea107 100644
@@ -27,10 +27,4 @@
 extern const struct amd_ip_funcs gmc_v9_0_ip_funcs;
 extern const struct amdgpu_ip_block_version gmc_v9_0_ip_block;
 
-/* amdgpu_amdkfd*.c */
-void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
-                               uint64_t page_table_base);
-void mmhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
-                               uint64_t page_table_base);
-
 #endif
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h +2 -0
index bef3d0c0c117..0de0fdf98c00 100644
@@ -34,5 +34,7 @@ int mmhub_v1_0_set_clockgating(struct amdgpu_device *adev,
 void mmhub_v1_0_get_clockgating(struct amdgpu_device *adev, u32 *flags);
 void mmhub_v1_0_update_power_gating(struct amdgpu_device *adev,
                                 bool enable);
+void mmhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
+                               uint64_t page_table_base);
 
Quoted 8 lines
Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.h +0 -1
 #endif
--

2.13.6

_______________________________________________
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