Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: enable S/G display on PCO and RV2 (v2)

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>

+16 -6
+16 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
··· 513 513 * will not allow USWC mappings. 514 514 * Also, don't allow GTT domain if the BO doens't have USWC falg set. 515 515 */ 516 - if (adev->asic_type >= CHIP_CARRIZO && 517 - adev->asic_type < CHIP_RAVEN && 518 - (adev->flags & AMD_IS_APU) && 519 - (bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) && 516 + if ((bo_flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) && 520 517 amdgpu_bo_support_uswc(bo_flags) && 521 - amdgpu_device_asic_has_dc_support(adev->asic_type)) 522 - domain |= AMDGPU_GEM_DOMAIN_GTT; 518 + amdgpu_device_asic_has_dc_support(adev->asic_type)) { 519 + switch (adev->asic_type) { 520 + case CHIP_CARRIZO: 521 + case CHIP_STONEY: 522 + domain |= AMDGPU_GEM_DOMAIN_GTT; 523 + break; 524 + case CHIP_RAVEN: 525 + /* enable S/G on PCO and RV2 */ 526 + if (adev->rev_id >= 0x8 || adev->pdev->device == 0x15d8) 527 + domain |= AMDGPU_GEM_DOMAIN_GTT; 528 + break; 529 + default: 530 + break; 531 + } 532 + } 523 533 #endif 524 534 525 535 return domain;