aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0822-drm-amdgpu-disallow-foreign-BOs-in-the-display-path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0822-drm-amdgpu-disallow-foreign-BOs-in-the-display-path.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0822-drm-amdgpu-disallow-foreign-BOs-in-the-display-path.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0822-drm-amdgpu-disallow-foreign-BOs-in-the-display-path.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0822-drm-amdgpu-disallow-foreign-BOs-in-the-display-path.patch
new file mode 100644
index 00000000..6757f601
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0822-drm-amdgpu-disallow-foreign-BOs-in-the-display-path.patch
@@ -0,0 +1,36 @@
+From e3976d1e541b68fb73584a289acfa9e0f6d4f7d7 Mon Sep 17 00:00:00 2001
+From: Christian Koenig <christian.koenig@amd.com>
+Date: Wed, 2 Dec 2015 15:48:11 +0100
+Subject: [PATCH 0822/4131] drm/amdgpu: disallow foreign BOs in the display
+ path
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Pinning them in other devices VRAM would obviously not work.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+index 6744e0c..06a1b82 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+@@ -181,6 +181,12 @@ int amdgpu_crtc_page_flip_target(struct drm_crtc *crtc,
+ obj = new_amdgpu_fb->obj;
+ new_abo = gem_to_amdgpu_bo(obj);
+
++ if (new_rbo->adev != adev) {
++ DRM_ERROR("Foreign BOs not allowed in the display engine\n");
++ r = -EINVAL;
++ goto cleanup;
++ }
++
+ /* pin the new buffer */
+ r = amdgpu_bo_reserve(new_abo, false);
+ if (unlikely(r != 0)) {
+--
+2.7.4
+