diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index ce15721cadda..96926a221bd5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | |||
@@ -614,6 +614,12 @@ amdgpu_user_framebuffer_create(struct drm_device *dev, | |||
614 | return ERR_PTR(-ENOENT); | 614 | return ERR_PTR(-ENOENT); |
615 | } | 615 | } |
616 | 616 | ||
617 | /* Handle is imported dma-buf, so cannot be migrated to VRAM for scanout */ | ||
618 | if (obj->import_attach) { | ||
619 | DRM_DEBUG_KMS("Cannot create framebuffer from imported dma_buf\n"); | ||
620 | return ERR_PTR(-EINVAL); | ||
621 | } | ||
622 | |||
617 | amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL); | 623 | amdgpu_fb = kzalloc(sizeof(*amdgpu_fb), GFP_KERNEL); |
618 | if (amdgpu_fb == NULL) { | 624 | if (amdgpu_fb == NULL) { |
619 | drm_gem_object_unreference_unlocked(obj); | 625 | drm_gem_object_unreference_unlocked(obj); |