drm/amdgpu: add amdgpu.cg_mask and amdgpu.pg_mask parameters
Subsystems (2)
PATCH 1/4 drm/amdgpu: add amdgpu.cg_mask and amdgpu.pg_mask parameters
From: Nicolai Hähnle <[email protected]>
They allow disabling clock and power gating from the kernel command line, which hopefully helps with diagnosing problems in the field.
Reviewed-by Alex Deucher <[email protected]>
Signed-off-by Nicolai Hähnle <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++++++++ 3 files changed, 13 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +2 -0
@@ -88,6 +88,8 @@ extern int amdgpu_powerplay;extern int amdgpu_powercontainment;extern unsigned amdgpu_pcie_gen_cap;extern unsigned amdgpu_pcie_lane_cap; +extern unsigned amdgpu_cg_mask; +extern unsigned amdgpu_pg_mask;#define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000#define AMDGPU_MAX_USEC_TIMEOUT 100000/* 100 ms */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
@@ -1213,6 +1213,9 @@ static int amdgpu_early_init(struct amdgpu_device *adev) } } + adev->cg_flags &= amdgpu_cg_mask; + adev->pg_flags &= amdgpu_pg_mask; +return 0 ; }
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +8 -0
@@ -85,6 +85,8 @@ int amdgpu_powerplay = -1;int amdgpu_powercontainment =1 ;unsigned amdgpu_pcie_gen_cap =0 ;unsigned amdgpu_pcie_lane_cap =0 ; +unsigned amdgpu_cg_mask =0xffffffff ; +unsigned amdgpu_pg_mask =0xffffffff ;MODULE_PARM_DESC (vramlimit,"Restrict VRAM for testing, in megabytes" );module_param_named (vramlimit, amdgpu_vram_limit, int,0600 );
@@ -172,6 +174,12 @@ module_param_named(pcie_gen_cap, amdgpu_pcie_gen_cap, uint, 0444);MODULE_PARM_DESC (pcie_lane_cap,"PCIE Lane Caps (0: autodetect (default))" );module_param_named (pcie_lane_cap, amdgpu_pcie_lane_cap, uint,0444 ); +MODULE_PARM_DESC (cg_mask,"Clockgating flags mask (0 = disable clock gating)" ); +module_param_named (cg_mask, amdgpu_cg_mask, uint,0444 ); + +MODULE_PARM_DESC (pg_mask,"Powergating flags mask (0 = disable power gating)" ); +module_param_named (pg_mask, amdgpu_pg_mask, uint,0444 ); +static const struct pci_device_id pciidlist[] = { #ifdef CONFIG_DRM_AMDGPU_CIK /* Kaveri */
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/4 drm/amdgpu/gfx8: Switch Stoney to share CZ's RLC functions
From: Tom St Denis <[email protected]>
According to the bringup code ST/CZ share the RLC
ENTER/EXIT logic.
Tested on my ST board.
Signed-off-by Tom St Denis <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +1 -1
@@ -6439,9 +6439,9 @@ static void gfx_v8_0_set_rlc_funcs(struct amdgpu_device *adev) {switch (adev->asic_type) {case CHIP_TOPAZ : -case CHIP_STONEY : adev->gfx.rlc.funcs = &iceland_rlc_funcs;break ; +case CHIP_STONEY :case CHIP_CARRIZO : adev->gfx.rlc.funcs = &cz_rlc_funcs;break ;
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/4 drm/amdgpu/gfx8: Enable CG on Stoney
In reply to Alex DeucherFrom: Tom St Denis <[email protected]>
Enable all relevant CG flags for Stoney parts.
Signed-off-by Tom St Denis <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vi.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/vi.c +7 -0
@@ -1222,6 +1222,13 @@ static int vi_common_early_init(void *handle) adev->cg_flags =AMD_CG_SUPPORT_UVD_MGCG |AMD_CG_SUPPORT_GFX_MGCG |AMD_CG_SUPPORT_GFX_MGLS | +AMD_CG_SUPPORT_GFX_RLC_LS | +AMD_CG_SUPPORT_GFX_CP_LS | +AMD_CG_SUPPORT_GFX_CGTS | +AMD_CG_SUPPORT_GFX_MGLS | +AMD_CG_SUPPORT_GFX_CGTS_LS | +AMD_CG_SUPPORT_GFX_CGCG | +AMD_CG_SUPPORT_GFX_CGLS |AMD_CG_SUPPORT_BIF_LS |AMD_CG_SUPPORT_HDP_MGCG | AMD_CG_SUPPORT_HDP_LS |
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/4 drm/amdgpu/gfx8: Enable PG on Stoney
In reply to Alex DeucherFrom: Tom St Denis <[email protected]>
Signed-off-by Tom St Denis <[email protected]>
Reviewed-by Alex Deucher <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/vi.c +6 -1
@@ -1234,7 +1234,12 @@ static int vi_common_early_init(void *handle)AMD_CG_SUPPORT_HDP_LS |AMD_CG_SUPPORT_SDMA_MGCG |AMD_CG_SUPPORT_SDMA_LS ; - adev->pg_flags =0 ; + adev->pg_flags =AMD_PG_SUPPORT_GFX_PG | +AMD_PG_SUPPORT_GFX_SMG | +AMD_PG_SUPPORT_GFX_DMG | +AMD_PG_SUPPORT_GFX_PIPELINE | +AMD_PG_SUPPORT_CP | +AMD_PG_SUPPORT_RLC_SMU_HS ; adev->external_rev_id = adev->rev_id +0x1 ;break ;default :
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel