drm/amdgpu: Support new arcturus mtype
authorOak Zeng <Oak.Zeng@amd.com>
Fri, 26 Jul 2019 21:03:11 +0000 (16:03 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Sep 2019 22:35:48 +0000 (17:35 -0500)
Arcturus repurposed mtype WC to RW. Modify gmc functions
to support the new mtype

Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
drivers/gpu/drm/amd/include/vega10_enum.h

index b4eead9a0f6b2cebb511a406b13c57f22888ff24..420dcdd769ff27ffee2c3a298b3088a5c0efad99 100644 (file)
@@ -607,6 +607,9 @@ static uint64_t gmc_v9_0_get_vm_pte_flags(struct amdgpu_device *adev,
        case AMDGPU_VM_MTYPE_WC:
                pte_flag |= AMDGPU_PTE_MTYPE_VG10(MTYPE_WC);
                break;
+       case AMDGPU_VM_MTYPE_RW:
+               pte_flag |= AMDGPU_PTE_MTYPE_VG10(MTYPE_RW);
+               break;
        case AMDGPU_VM_MTYPE_CC:
                pte_flag |= AMDGPU_PTE_MTYPE_VG10(MTYPE_CC);
                break;
index c14ba65a24157f133f8d5bf37f5424c2d70d2ad1..adf1b754666e3d616378084f0c80760b87b6d961 100644 (file)
@@ -1037,6 +1037,7 @@ TCC_CACHE_POLICY_STREAM                  = 0x00000001,
 typedef enum MTYPE {
 MTYPE_NC                                 = 0x00000000,
 MTYPE_WC                                 = 0x00000001,
+MTYPE_RW                                 = 0x00000001,
 MTYPE_CC                                 = 0x00000002,
 MTYPE_UC                                 = 0x00000003,
 } MTYPE;