drm/amdgpu: Retire pcie_gen3_enable function
Subsystems (2)
PATCH 1/1 drm/amdgpu: Retire pcie_gen3_enable function
Not needed since from vi. drop the function so
we don't duplicate code when introduce new asics.
Signed-off-by Hawking Zhang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/nv.c | 17 ----------------- drivers/gpu/drm/amd/amdgpu/soc15.c | 20 -------------------- drivers/gpu/drm/amd/amdgpu/soc21.c | 17 ----------------- drivers/gpu/drm/amd/amdgpu/vi.c | 20 -------------------- 4 files changed, 74 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +0 -17
@@ -519,21 +519,6 @@ static int nv_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclk)return 0 ; } -static void nv_pcie_gen3_enable (struct amdgpu_device *adev) -{ -if (pci_is_root_bus (adev->pdev->bus)) -return ; - -if (amdgpu_pcie_gen2 ==0 ) -return ; - -if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | -CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ))) -return ; - -/* todo */ -} -static void nv_program_aspm (struct amdgpu_device *adev) {if (!amdgpu_device_should_use_aspm (adev))
@@ -1041,8 +1026,6 @@ static int nv_common_hw_init(void *handle)if (adev->nbio.funcs->apply_l1_link_width_reconfig_wa) adev->nbio.funcs->apply_l1_link_width_reconfig_wa (adev); -/* enable pcie gen2/3 link */ -nv_pcie_gen3_enable (adev);/* enable aspm */ nv_program_aspm (adev);/* setup nbio registers */
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -20
@@ -609,24 +609,6 @@ static int soc15_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclkreturn 0 ; } -static void soc15_pcie_gen3_enable (struct amdgpu_device *adev) -{ -if (pci_is_root_bus (adev->pdev->bus)) -return ; - -if (amdgpu_pcie_gen2 ==0 ) -return ; - -if (adev->flags &AMD_IS_APU ) -return ; - -if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | -CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ))) -return ; - -/* todo */ -} -static void soc15_program_aspm (struct amdgpu_device *adev) {if (!amdgpu_device_should_use_aspm (adev))
@@ -1183,8 +1165,6 @@ static int soc15_common_hw_init(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; -/* enable pcie gen2/3 link */ -soc15_pcie_gen3_enable (adev);/* enable aspm */ soc15_program_aspm (adev);/* setup nbio registers */
drivers/gpu/drm/amd/amdgpu/soc21.c +0 -17
@@ -370,21 +370,6 @@ static int soc21_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclkreturn 0 ; } -static void soc21_pcie_gen3_enable (struct amdgpu_device *adev) -{ -if (pci_is_root_bus (adev->pdev->bus)) -return ; - -if (amdgpu_pcie_gen2 ==0 ) -return ; - -if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | -CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ))) -return ; - -/* todo */ -} -static void soc21_program_aspm (struct amdgpu_device *adev) {if (!amdgpu_device_should_use_aspm (adev))
@@ -714,8 +699,6 @@ static int soc21_common_hw_init(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; -/* enable pcie gen2/3 link */ -soc21_pcie_gen3_enable (adev);/* enable aspm */ soc21_program_aspm (adev);/* setup nbio registers */
drivers/gpu/drm/amd/amdgpu/vi.c +0 -20
@@ -1105,24 +1105,6 @@ static int vi_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclk)return 0 ; } -static void vi_pcie_gen3_enable (struct amdgpu_device *adev) -{ -if (pci_is_root_bus (adev->pdev->bus)) -return ; - -if (amdgpu_pcie_gen2 ==0 ) -return ; - -if (adev->flags &AMD_IS_APU ) -return ; - -if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | -CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ))) -return ; - -/* todo */ -} -static void vi_enable_aspm (struct amdgpu_device *adev) {u32 data, orig;
@@ -1743,8 +1725,6 @@ static int vi_common_hw_init(void *handle)/* move the golden regs per IP block */ vi_init_golden_registers (adev); -/* enable pcie gen2/3 link */ -vi_pcie_gen3_enable (adev);/* enable aspm */ vi_program_aspm (adev);/* enable the doorbell aperture */
Signature · 1 line
2.17.1
[AMD Official Use Only - General]
This patch is Reviewed-by: Likun Gao <[email protected]>.
Regards,
Likun
________________________________
发件人: amd-gfx <[email protected]> 代表 Hawking Zhang <[email protected]> 发送时间: 2023年3月6日星期一 下午7:38
收件人: [email protected] <[email protected]>; Gao, Likun <[email protected]> 抄送: Zhang, Hawking <[email protected]>
主题: [PATCH] drm/amdgpu: Retire pcie_gen3_enable function
Not needed since from vi. drop the function so
we don't duplicate code when introduce new asics.
Signed-off-by Hawking Zhang <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/nv.c | 17 ----------------- drivers/gpu/drm/amd/amdgpu/soc15.c | 20 -------------------- drivers/gpu/drm/amd/amdgpu/soc21.c | 17 ----------------- drivers/gpu/drm/amd/amdgpu/vi.c | 20 -------------------- 4 files changed, 74 deletions(-)
drivers/gpu/drm/amd/amdgpu/nv.c +0 -17
@@ -519,21 +519,6 @@ static int nv_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclk)return 0 ; } -static void nv_pcie_gen3_enable (struct amdgpu_device *adev) -{ -if (pci_is_root_bus (adev->pdev->bus)) -return ; - -if (amdgpu_pcie_gen2 ==0 ) -return ; - -if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | -CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ))) -return ; - -/* todo */ -} -static void nv_program_aspm (struct amdgpu_device *adev) {if (!amdgpu_device_should_use_aspm (adev))
@@ -1041,8 +1026,6 @@ static int nv_common_hw_init(void *handle)if (adev->nbio.funcs->apply_l1_link_width_reconfig_wa) adev->nbio.funcs->apply_l1_link_width_reconfig_wa (adev); -/* enable pcie gen2/3 link */ -nv_pcie_gen3_enable (adev);/* enable aspm */ nv_program_aspm (adev);/* setup nbio registers */
drivers/gpu/drm/amd/amdgpu/soc15.c +0 -20
@@ -609,24 +609,6 @@ static int soc15_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclkreturn 0 ; } -static void soc15_pcie_gen3_enable (struct amdgpu_device *adev) -{ -if (pci_is_root_bus (adev->pdev->bus)) -return ; - -if (amdgpu_pcie_gen2 ==0 ) -return ; - -if (adev->flags &AMD_IS_APU ) -return ; - -if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | -CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ))) -return ; - -/* todo */ -} -static void soc15_program_aspm (struct amdgpu_device *adev) {if (!amdgpu_device_should_use_aspm (adev))
@@ -1183,8 +1165,6 @@ static int soc15_common_hw_init(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; -/* enable pcie gen2/3 link */ -soc15_pcie_gen3_enable (adev);/* enable aspm */ soc15_program_aspm (adev);/* setup nbio registers */
drivers/gpu/drm/amd/amdgpu/soc21.c +0 -17
@@ -370,21 +370,6 @@ static int soc21_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclkreturn 0 ; } -static void soc21_pcie_gen3_enable (struct amdgpu_device *adev) -{ -if (pci_is_root_bus (adev->pdev->bus)) -return ; - -if (amdgpu_pcie_gen2 ==0 ) -return ; - -if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | -CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ))) -return ; - -/* todo */ -} -static void soc21_program_aspm (struct amdgpu_device *adev) {if (!amdgpu_device_should_use_aspm (adev))
@@ -714,8 +699,6 @@ static int soc21_common_hw_init(void *handle) {struct amdgpu_device *adev = (struct amdgpu_device *)handle; -/* enable pcie gen2/3 link */ -soc21_pcie_gen3_enable (adev);/* enable aspm */ soc21_program_aspm (adev);/* setup nbio registers */
drivers/gpu/drm/amd/amdgpu/vi.c +0 -20
@@ -1105,24 +1105,6 @@ static int vi_set_vce_clocks(struct amdgpu_device *adev, u32 evclk, u32 ecclk)return 0 ; } -static void vi_pcie_gen3_enable (struct amdgpu_device *adev) -{ -if (pci_is_root_bus (adev->pdev->bus)) -return ; - -if (amdgpu_pcie_gen2 ==0 ) -return ; - -if (adev->flags &AMD_IS_APU ) -return ; - -if (!(adev->pm.pcie_gen_mask & (CAIL_PCIE_LINK_SPEED_SUPPORT_GEN2 | -CAIL_PCIE_LINK_SPEED_SUPPORT_GEN3 ))) -return ; - -/* todo */ -} -static void vi_enable_aspm (struct amdgpu_device *adev) {u32 data, orig;
@@ -1743,8 +1725,6 @@ static int vi_common_hw_init(void *handle)/* move the golden regs per IP block */ vi_init_golden_registers (adev); -/* enable pcie gen2/3 link */ -vi_pcie_gen3_enable (adev);/* enable aspm */ vi_program_aspm (adev);/* enable the doorbell aperture */
--
2.17.1