From c2482f603b37f49db910b7e0f5d3f1191adaa0ab Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 31 Oct 2018 21:42:04 -0500 Subject: [PATCH] drm/amdgpu/raven: add rlc firmware version check for gfxoff Need a new enough rlc firmware to support it. bug: https://bugs.freedesktop.org/show_bug.cgi?id=108606 Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 100f23b5e22f..34036211258e 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -697,8 +697,17 @@ static int gfx_v9_0_init_microcode(struct amdgpu_device *adev) for (i = 0 ; i < (adev->gfx.rlc.reg_list_size_bytes >> 2); i++) adev->gfx.rlc.register_restore[i] = le32_to_cpu(tmp[i]); - if (adev->gfx.rlc.is_rlc_v2_1) + if (adev->gfx.rlc.is_rlc_v2_1) { gfx_v9_0_init_rlc_ext_microcode(adev); + if (adev->gfx.rlc_fw_version < 531) { + adev->powerplay.pp_feature &= ~PP_GFXOFF_MASK; + } else if ((adev->gfx.rlc_fw_version == 531) && + (adev->gfx.rlc_feature_version < 1)) { + adev->powerplay.pp_feature &= ~PP_GFXOFF_MASK; + } + } else { + adev->powerplay.pp_feature &= ~PP_GFXOFF_MASK; + } snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_mec.bin", chip_name); err = request_firmware(&adev->gfx.mec_fw, fw_name, adev->dev); -- 2.13.6