aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4838-drm-amdgpu-fix-the-wrong-type-of-gem-object-creation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4838-drm-amdgpu-fix-the-wrong-type-of-gem-object-creation.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/4838-drm-amdgpu-fix-the-wrong-type-of-gem-object-creation.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4838-drm-amdgpu-fix-the-wrong-type-of-gem-object-creation.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4838-drm-amdgpu-fix-the-wrong-type-of-gem-object-creation.patch
new file mode 100644
index 00000000..697dfff7
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4838-drm-amdgpu-fix-the-wrong-type-of-gem-object-creation.patch
@@ -0,0 +1,67 @@
+From 62dae4abbf71a52cf03938be0630ebda51854861 Mon Sep 17 00:00:00 2001
+From: Huang Rui <ray.huang@amd.com>
+Date: Thu, 28 Jun 2018 14:38:21 +0800
+Subject: [PATCH 4838/5725] drm/amdgpu: fix the wrong type of gem object
+ creation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We still use legacy type of gem_object_create, it should update to ttm_bo_type
+now.
+
+Signed-off-by: Huang Rui <ray.huang@amd.com>
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +-
+ drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+index cc55fa5..6b65342 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+@@ -146,7 +146,7 @@ static int amdgpufb_create_pinned_object(struct amdgpu_fbdev *rfbdev,
+ AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED |
+ AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS |
+ AMDGPU_GEM_CREATE_VRAM_CLEARED,
+- true, NULL, &gobj);
++ ttm_bo_type_kernel, NULL, &gobj);
+ if (ret) {
+ pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
+ return -ENOMEM;
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+index 330c07a..868832e 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+@@ -297,7 +297,7 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
+
+ r = amdgpu_gem_object_create(adev, size, args->in.alignment,
+ (u32)(0xffffffff & args->in.domains),
+- flags, false, resv, &gobj);
++ flags, ttm_bo_type_device, resv, &gobj);
+ if (flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID) {
+ if (!r) {
+ struct amdgpu_bo *abo = gem_to_amdgpu_bo(gobj);
+@@ -410,7 +410,7 @@ int amdgpu_gem_userptr_ioctl(struct drm_device *dev, void *data,
+
+ /* create a gem object to contain this object in */
+ r = amdgpu_gem_object_create(adev, args->size, 0, AMDGPU_GEM_DOMAIN_CPU,
+- 0, 0, NULL, &gobj);
++ 0, ttm_bo_type_device, NULL, &gobj);
+ if (r)
+ return r;
+
+@@ -916,7 +916,7 @@ int amdgpu_mode_dumb_create(struct drm_file *file_priv,
+ amdgpu_display_supported_domains(adev));
+ r = amdgpu_gem_object_create(adev, args->size, 0, domain,
+ AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED,
+- false, NULL, &gobj);
++ ttm_bo_type_device, NULL, &gobj);
+ if (r)
+ return -ENOMEM;
+
+--
+2.7.4
+