drm/amdgpu: enable S/G display on PCO and RV2 (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jan 2020 22:46:02 +0000 (17:46 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Jan 2020 15:18:09 +0000 (10:18 -0500)
It should work on all Raven variants, but some users have
reported issues with original Raven with IOMMU enabled.
So far there have been no issues observed with PCO or RV2.

v2: split out the dm init and domain changes into separate
    patches.

Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

index 4e699071d1443deefe71aaf3841ac6f6b7bd0788..6d520a3eec4090732ae62d91eaa6cd5a1babc9f7 100644 (file)
@@ -513,13 +513,23 @@ uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
         * will not allow USWC mappings.
         * Also, don't allow GTT domain if the BO doens't have USWC falg set.
         */
-       if (adev->asic_type >= CHIP_CARRIZO &&
-           adev->asic_type < CHIP_RAVEN &&
-           (adev->flags & AMD_IS_APU) &&
-           (bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
+       if ((bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) &&
            amdgpu_bo_support_uswc(bo_flags) &&
-           amdgpu_device_asic_has_dc_support(adev->asic_type))
-               domain |= AMDGPU_GEM_DOMAIN_GTT;
+           amdgpu_device_asic_has_dc_support(adev->asic_type)) {
+               switch (adev->asic_type) {
+               case CHIP_CARRIZO:
+               case CHIP_STONEY:
+                       domain |= AMDGPU_GEM_DOMAIN_GTT;
+                       break;
+               case CHIP_RAVEN:
+                       /* enable S/G on PCO and RV2 */
+                       if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8)
+                               domain |= AMDGPU_GEM_DOMAIN_GTT;
+                       break;
+               default:
+                       break;
+               }
+       }
 #endif
 
        return domain;