aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-11-08 16:34:48 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-11-09 16:29:54 -0500
commit688be01a0ab7eeefb1cccf3ad1c59803276b5a12 (patch)
tree78c81a5d6f983b18d3357a2069b4302103c61e91 /drivers/gpu/drm/amd
parentc10caceddca2236ada8359603767ba629e6f19ba (diff)
drm/amdgpu/gfx9: rework lbpw enable code
To avoid changing the global lbpw module parameter directly. Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index d6783ba2c9d0..c27caa144c57 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -2400,26 +2400,21 @@ static int gfx_v9_0_rlc_resume(struct amdgpu_device *adev)
2400 return r; 2400 return r;
2401 } 2401 }
2402 2402
2403 if (amdgpu_lbpw == -1) { 2403 switch (adev->asic_type) {
2404 switch (adev->asic_type) { 2404 case CHIP_RAVEN:
2405 case CHIP_RAVEN: 2405 if (amdgpu_lbpw == 0)
2406 amdgpu_lbpw = 1; 2406 gfx_v9_0_enable_lbpw(adev, false);
2407 break; 2407 else
2408 case CHIP_VEGA20: 2408 gfx_v9_0_enable_lbpw(adev, true);
2409 amdgpu_lbpw = 0; 2409 break;
2410 break; 2410 case CHIP_VEGA20:
2411 default: 2411 if (amdgpu_lbpw > 0)
2412 amdgpu_lbpw = 0;
2413 break;
2414 }
2415 }
2416
2417 if (adev->asic_type == CHIP_RAVEN ||
2418 adev->asic_type == CHIP_VEGA20) {
2419 if (amdgpu_lbpw != 0)
2420 gfx_v9_0_enable_lbpw(adev, true); 2412 gfx_v9_0_enable_lbpw(adev, true);
2421 else 2413 else
2422 gfx_v9_0_enable_lbpw(adev, false); 2414 gfx_v9_0_enable_lbpw(adev, false);
2415 break;
2416 default:
2417 break;
2423 } 2418 }
2424 2419
2425 adev->gfx.rlc.funcs->start(adev); 2420 adev->gfx.rlc.funcs->start(adev);