summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Wang <kevin1.wang@amd.com>2019-12-11 17:30:26 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-12-11 15:22:07 -0500
commitd549991ce5d5194d89eafe16085603b38e7cf989 (patch)
tree9941c55567ff0f733ac730efd04ead475e5b1e4a
parent5f5202bf695b344b4c13de3609b7c0805f89b898 (diff)
downloadtalos-op-linux-d549991ce5d5194d89eafe16085603b38e7cf989.tar.gz
talos-op-linux-d549991ce5d5194d89eafe16085603b38e7cf989.zip
drm/amdgpu: enable gfxoff feature for navi10 asic
enable gfxoff feature for some navi10 asics Signed-off-by: Kevin Wang <kevin1.wang@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index caa43b3a3dbf..5f54b6dac6f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -610,11 +610,29 @@ static void gfx_v10_0_init_rlc_ext_microcode(struct amdgpu_device *adev)
le32_to_cpu(rlc_hdr->reg_list_format_direct_reg_list_length);
}
+static bool gfx_v10_0_navi10_gfxoff_should_enable(struct amdgpu_device *adev)
+{
+ bool ret = false;
+
+ switch (adev->pdev->revision) {
+ case 0xc2:
+ case 0xc3:
+ ret = true;
+ break;
+ default:
+ ret = false;
+ break;
+ }
+
+ return ret ;
+}
+
static void gfx_v10_0_check_gfxoff_flag(struct amdgpu_device *adev)
{
switch (adev->asic_type) {
case CHIP_NAVI10:
- adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
+ if (!gfx_v10_0_navi10_gfxoff_should_enable(adev))
+ adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
break;
default:
break;
OpenPOWER on IntegriCloud