summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2021-01-27 13:20:40 +0100
committerAlex Deucher <alexander.deucher@amd.com>2021-02-02 12:06:54 -0500
commitdd017d01c3d96e48abd6fe6ccce4ef977fb5e10b (patch)
tree4359e89d95eceda63e982658de315720d1902a63 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parente487cb54db1b42a2c7907defb14c71ab27622f9b (diff)
downloadlinux-stable-dd017d01c3d96e48abd6fe6ccce4ef977fb5e10b.tar.gz
linux-stable-dd017d01c3d96e48abd6fe6ccce4ef977fb5e10b.tar.bz2
linux-stable-dd017d01c3d96e48abd6fe6ccce4ef977fb5e10b.zip
drm/amdgpu: enable freesync for A+A configs
Some newer APUs can scanout directly from GTT, that saves us from allocating another bounce buffer in VRAM and enables freesync in such configurations. Without this patch creating a framebuffer from the imported BO will fail and userspace will fall back to a copy. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Shashank Sharma <shashank.sharma@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index 996147111c3e..4b29b8205442 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -897,7 +897,7 @@ int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
return -EINVAL;
/* A shared bo cannot be migrated to VRAM */
- if (bo->prime_shared_count) {
+ if (bo->prime_shared_count || bo->tbo.base.import_attach) {
if (domain & AMDGPU_GEM_DOMAIN_GTT)
domain = AMDGPU_GEM_DOMAIN_GTT;
else