Commit d549991c authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher
Browse files

drm/amdgpu: enable gfxoff feature for navi10 asic



enable gfxoff feature for some navi10 asics

Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarFeifei Xu <Feifei.Xu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5f5202bf
Loading
Loading
Loading
Loading
+19 −1
Original line number Diff line number Diff line
@@ -610,10 +610,28 @@ 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:
		if (!gfx_v10_0_navi10_gfxoff_should_enable(adev))
			adev->pm.pp_feature &= ~PP_GFXOFF_MASK;
		break;
	default: