drm/amdgpu/gfx9: rework lbpw enable code
Subsystems (2)
PATCH 1/1 drm/amdgpu/gfx9: rework lbpw enable code
To avoid changing the global lbpw module parameter directly.
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +12 -17
@@ -2499,26 +2499,21 @@ static int gfx_v9_0_rlc_resume(struct amdgpu_device *adev)return r; } -if (amdgpu_lbpw ==-1 ) { -switch (adev->asic_type) { -case CHIP_RAVEN : - amdgpu_lbpw =1 ; -break ; -case CHIP_VEGA20 : - amdgpu_lbpw =0 ; -break ; -default : - amdgpu_lbpw =0 ; -break ; - } - } - -if (adev->asic_type ==CHIP_RAVEN || - adev->asic_type ==CHIP_VEGA20 ) { -if (amdgpu_lbpw !=0 ) +switch (adev->asic_type) { +case CHIP_RAVEN : +if (amdgpu_lbpw ==0 ) +gfx_v9_0_enable_lbpw (adev, false); +else +gfx_v9_0_enable_lbpw (adev, true); +break ; +case CHIP_VEGA20 : +if (amdgpu_lbpw >0 )gfx_v9_0_enable_lbpw (adev, true);else gfx_v9_0_enable_lbpw (adev, false); +break ; +default : +break ; }gfx_v9_0_rlc_start (adev);
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): 20181108213804.18912-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org
Quan, Evan
Reviewed-by Evan QuanQuoted 64 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: 2018年11月9日 5:38
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu/gfx9: rework lbpw enable codeTo avoid changing the global lbpw module parameter directly.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 29 ++++++++++++--------------- -- 1 file changed, 12 insertions(+), 17 deletions(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +12
-17@@ -2499,26 +2499,21 @@ static int gfx_v9_0_rlc_resume(struct amdgpu_device *adev)return r; } -if (amdgpu_lbpw ==-1 ) { -switch (adev->asic_type) { -case CHIP_RAVEN : - amdgpu_lbpw =1 ; -break ; -case CHIP_VEGA20 : - amdgpu_lbpw =0 ; -break ; -default : - amdgpu_lbpw =0 ; -break ; - } - } - -if (adev->asic_type ==CHIP_RAVEN || - adev->asic_type ==CHIP_VEGA20 ) { -if (amdgpu_lbpw !=0 ) +switch (adev->asic_type) { +case CHIP_RAVEN : +if (amdgpu_lbpw ==0 ) +gfx_v9_0_enable_lbpw (adev, false); +else +gfx_v9_0_enable_lbpw (adev, true); +break ; +case CHIP_VEGA20 : +if (amdgpu_lbpw >0 )gfx_v9_0_enable_lbpw (adev, true);else gfx_v9_0_enable_lbpw (adev, false); +break ; +default : +break ; }
gfx_v9_0_rlc_start(adev);
--
2.13.6
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