Skip to contentSkip to conversation

drm/amdgpu: Remove unused nbif_v6_3_1_sriov_funcs

PATCH Applied [email protected] 2 participants 2 messages Feb 19, 2025 – Feb 21, 2025

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

PATCH 1/1 drm/amdgpu: Remove unused nbif_v6_3_1_sriov_funcs

From: "Dr. David Alan Gilbert" <[email protected]>

The nbif_v6_3_1_sriov_funcs instance of amdgpu_nbio_funcs was added in commit 894c6d3522d1 ("drm/amdgpu: Add nbif v6_3_1 ip block support") but has remained unused.

Alex has confirmed it wasn't needed.

Remove it, together with the four unused stub functions:
nbif_v6_3_1_sriov_ih_doorbell_range nbif_v6_3_1_sriov_gc_doorbell_init nbif_v6_3_1_sriov_vcn_doorbell_range nbif_v6_3_1_sriov_sdma_doorbell_range

---
 drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c | 46 ------------------------
 drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.h |  1 -
 2 files changed, 47 deletions(-)
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c +0 -46
index c92875ceb31f..9efe74148867 100644
@@ -474,52 +474,6 @@ const struct amdgpu_nbio_funcs nbif_v6_3_1_funcs = {
 };
 
 
-static void nbif_v6_3_1_sriov_ih_doorbell_range(struct amdgpu_device *adev,
-						bool use_doorbell, int doorbell_index)
-{
-}
-
-static void nbif_v6_3_1_sriov_sdma_doorbell_range(struct amdgpu_device *adev,
-						  int instance, bool use_doorbell,
-						  int doorbell_index,
-						  int doorbell_size)
-{
-}
-
-static void nbif_v6_3_1_sriov_vcn_doorbell_range(struct amdgpu_device *adev,
-						 bool use_doorbell,
-						 int doorbell_index, int instance)
-{
-}
-
-static void nbif_v6_3_1_sriov_gc_doorbell_init(struct amdgpu_device *adev)
-{
-}
-
-const struct amdgpu_nbio_funcs nbif_v6_3_1_sriov_funcs = {
-	.get_hdp_flush_req_offset = nbif_v6_3_1_get_hdp_flush_req_offset,
-	.get_hdp_flush_done_offset = nbif_v6_3_1_get_hdp_flush_done_offset,
-	.get_pcie_index_offset = nbif_v6_3_1_get_pcie_index_offset,
-	.get_pcie_data_offset = nbif_v6_3_1_get_pcie_data_offset,
-	.get_rev_id = nbif_v6_3_1_get_rev_id,
-	.mc_access_enable = nbif_v6_3_1_mc_access_enable,
-	.get_memsize = nbif_v6_3_1_get_memsize,
-	.sdma_doorbell_range = nbif_v6_3_1_sriov_sdma_doorbell_range,
-	.vcn_doorbell_range = nbif_v6_3_1_sriov_vcn_doorbell_range,
-	.gc_doorbell_init = nbif_v6_3_1_sriov_gc_doorbell_init,
-	.enable_doorbell_aperture = nbif_v6_3_1_enable_doorbell_aperture,
-	.enable_doorbell_selfring_aperture = nbif_v6_3_1_enable_doorbell_selfring_aperture,
-	.ih_doorbell_range = nbif_v6_3_1_sriov_ih_doorbell_range,
-	.update_medium_grain_clock_gating = nbif_v6_3_1_update_medium_grain_clock_gating,
-	.update_medium_grain_light_sleep = nbif_v6_3_1_update_medium_grain_light_sleep,
-	.get_clockgating_state = nbif_v6_3_1_get_clockgating_state,
-	.ih_control = nbif_v6_3_1_ih_control,
-	.init_registers = nbif_v6_3_1_init_registers,
-	.remap_hdp_registers = nbif_v6_3_1_remap_hdp_registers,
-	.get_rom_offset = nbif_v6_3_1_get_rom_offset,
-	.set_reg_remap = nbif_v6_3_1_set_reg_remap,
-};
-
 static int nbif_v6_3_1_set_ras_err_event_athub_irq_state(struct amdgpu_device *adev,
 						       struct amdgpu_irq_src *src,
 						       unsigned type,
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.h +0 -1
index 9ac4831d39e1..3afec715a9fe 100644
@@ -28,7 +28,6 @@
 
 extern const struct nbio_hdp_flush_reg nbif_v6_3_1_hdp_flush_reg;
 extern const struct amdgpu_nbio_funcs nbif_v6_3_1_funcs;
-extern const struct amdgpu_nbio_funcs nbif_v6_3_1_sriov_funcs;
 extern struct amdgpu_nbio_ras nbif_v6_3_1_ras;
 
 #endif
Signature · 1 line
2.48.1
Applied
#1 lore raw

Applied. Thanks!

Quoted 93 lines · On Wed, Feb 19, 2025 at 4:48 PM <[email protected]> wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

The nbif_v6_3_1_sriov_funcs instance of amdgpu_nbio_funcs was added in commit 894c6d3522d1 ("drm/amdgpu: Add nbif v6_3_1 ip block support") but has remained unused.

Alex has confirmed it wasn't needed.

Remove it, together with the four unused stub functions:
nbif_v6_3_1_sriov_ih_doorbell_range nbif_v6_3_1_sriov_gc_doorbell_init nbif_v6_3_1_sriov_vcn_doorbell_range nbif_v6_3_1_sriov_sdma_doorbell_range

---
 drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c | 46 ------------------------
 drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.h |  1 -
 2 files changed, 47 deletions(-)
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c +0 -46
index c92875ceb31f..9efe74148867 100644
@@ -474,52 +474,6 @@ const struct amdgpu_nbio_funcs nbif_v6_3_1_funcs = {
 };
 
 
-static void nbif_v6_3_1_sriov_ih_doorbell_range(struct amdgpu_device *adev,
-                                               bool use_doorbell, int doorbell_index)
-{
-}
-
-static void nbif_v6_3_1_sriov_sdma_doorbell_range(struct amdgpu_device *adev,
-                                                 int instance, bool use_doorbell,
-                                                 int doorbell_index,
-                                                 int doorbell_size)
-{
-}
-
-static void nbif_v6_3_1_sriov_vcn_doorbell_range(struct amdgpu_device *adev,
-                                                bool use_doorbell,
-                                                int doorbell_index, int instance)
-{
-}
-
-static void nbif_v6_3_1_sriov_gc_doorbell_init(struct amdgpu_device *adev)
-{
-}
-
-const struct amdgpu_nbio_funcs nbif_v6_3_1_sriov_funcs = {
-       .get_hdp_flush_req_offset = nbif_v6_3_1_get_hdp_flush_req_offset,
-       .get_hdp_flush_done_offset = nbif_v6_3_1_get_hdp_flush_done_offset,
-       .get_pcie_index_offset = nbif_v6_3_1_get_pcie_index_offset,
-       .get_pcie_data_offset = nbif_v6_3_1_get_pcie_data_offset,
-       .get_rev_id = nbif_v6_3_1_get_rev_id,
-       .mc_access_enable = nbif_v6_3_1_mc_access_enable,
-       .get_memsize = nbif_v6_3_1_get_memsize,
-       .sdma_doorbell_range = nbif_v6_3_1_sriov_sdma_doorbell_range,
-       .vcn_doorbell_range = nbif_v6_3_1_sriov_vcn_doorbell_range,
-       .gc_doorbell_init = nbif_v6_3_1_sriov_gc_doorbell_init,
-       .enable_doorbell_aperture = nbif_v6_3_1_enable_doorbell_aperture,
-       .enable_doorbell_selfring_aperture = nbif_v6_3_1_enable_doorbell_selfring_aperture,
-       .ih_doorbell_range = nbif_v6_3_1_sriov_ih_doorbell_range,
-       .update_medium_grain_clock_gating = nbif_v6_3_1_update_medium_grain_clock_gating,
-       .update_medium_grain_light_sleep = nbif_v6_3_1_update_medium_grain_light_sleep,
-       .get_clockgating_state = nbif_v6_3_1_get_clockgating_state,
-       .ih_control = nbif_v6_3_1_ih_control,
-       .init_registers = nbif_v6_3_1_init_registers,
-       .remap_hdp_registers = nbif_v6_3_1_remap_hdp_registers,
-       .get_rom_offset = nbif_v6_3_1_get_rom_offset,
-       .set_reg_remap = nbif_v6_3_1_set_reg_remap,
-};
-
 static int nbif_v6_3_1_set_ras_err_event_athub_irq_state(struct amdgpu_device *adev,
                                                       struct amdgpu_irq_src *src,
                                                       unsigned type,
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.h +0 -2
index 9ac4831d39e1..3afec715a9fe 100644
@@ -28,7 +28,6 @@
 
 extern const struct nbio_hdp_flush_reg nbif_v6_3_1_hdp_flush_reg;
 extern const struct amdgpu_nbio_funcs nbif_v6_3_1_funcs;
-extern const struct amdgpu_nbio_funcs nbif_v6_3_1_sriov_funcs;
 extern struct amdgpu_nbio_ras nbif_v6_3_1_ras;
 
 #endif
--

2.48.1