drm/amdgpu: initialize cg/pg flags and external rev id for navi12
authorXiaojie Yuan <xiaojie.yuan@amd.com>
Thu, 16 May 2019 11:47:33 +0000 (19:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Aug 2019 15:30:40 +0000 (10:30 -0500)
don't enable any cg/pg features yet.

v2: calculate external revision id from revision id so that we can
    differentiate navi12 A0 from A1 directly.

Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/nv.c

index 7b119285abe3c23e3031b402a669e292bd5f0016..eb859b3114093cdc54940a7ceaca27101af281d1 100644 (file)
@@ -596,6 +596,11 @@ static int nv_common_early_init(void *handle)
                        AMD_PG_SUPPORT_VCN_DPG;
                adev->external_rev_id = adev->rev_id + 0x1; /* ??? */
                break;
+       case CHIP_NAVI12:
+               adev->cg_flags = 0;
+               adev->pg_flags = 0;
+               adev->external_rev_id = adev->rev_id + 0xa;
+               break;
        default:
                /* FIXME: not supported yet */
                return -EINVAL;