]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu/vcn: enable indirect DPG SRAM mode for navi14
authorXiaojie Yuan <xiaojie.yuan@amd.com>
Tue, 2 Jul 2019 17:52:52 +0000 (12:52 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 18 Jul 2019 19:18:01 +0000 (14:18 -0500)
Enable VCN dynamic powergating for navi14.

Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
drivers/gpu/drm/amd/amdgpu/nv.c

index 1ff0f9e9df1eb4f39a6efdad7f458366577c489a..3e1a360dee5496b5dc534c52962fc78ddb2cb5f2 100644 (file)
@@ -84,6 +84,9 @@ int amdgpu_vcn_sw_init(struct amdgpu_device *adev)
                break;
     case CHIP_NAVI14:
                fw_name = FIRMWARE_NAVI14;
+               if ((adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) &&
+                   (adev->pg_flags & AMD_PG_SUPPORT_VCN_DPG))
+                       adev->vcn.indirect_sram = true;
                break;
        default:
                return -EINVAL;
index 3813ed6b9e79f49ed5e1da331cd1d447173b9cc5..800321f9985782bd4604a821a768dead074c9be7 100644 (file)
@@ -589,7 +589,8 @@ static int nv_common_early_init(void *handle)
                        AMD_CG_SUPPORT_VCN_MGCG |
                        AMD_CG_SUPPORT_BIF_MGCG |
                        AMD_CG_SUPPORT_BIF_LS;
-               adev->pg_flags = AMD_PG_SUPPORT_VCN;
+               adev->pg_flags = AMD_PG_SUPPORT_VCN |
+                       AMD_PG_SUPPORT_VCN_DPG;
                adev->external_rev_id = adev->rev_id + 0x1; /* ??? */
                break;
        default: