[PATCH] drm/amdgpu: only allow scatter/gather display with DC
Christian König
ckoenig.leichtzumerken at gmail.com
Fri Jan 12 21:02:50 UTC 2018
Am 12.01.2018 um 20:58 schrieb Alex Deucher:
> Check if DC is enabled before allowing scanout buffers
> to be pinned in system memory.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> index 8ede2645a06c..859942552e9f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
> @@ -507,9 +507,12 @@ uint32_t amdgpu_display_framebuffer_domains(struct amdgpu_device *adev)
> {
> uint32_t domain = AMDGPU_GEM_DOMAIN_VRAM;
>
> +#if defined(CONFIG_DRM_AMD_DC)
> if (adev->asic_type >= CHIP_CARRIZO && adev->asic_type < CHIP_RAVEN &&
> - adev->flags & AMD_IS_APU)
> + adev->flags & AMD_IS_APU &&
> + amdgpu_device_asic_has_dc_support(adev->asic_type))
> domain |= AMDGPU_GEM_DOMAIN_GTT;
> +#endif
>
> return domain;
> }
More information about the amd-gfx
mailing list