summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0536-drm-vc4-Fix-a-couple-error-codes-in-vc4_cl_lookup_bo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0536-drm-vc4-Fix-a-couple-error-codes-in-vc4_cl_lookup_bo.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0536-drm-vc4-Fix-a-couple-error-codes-in-vc4_cl_lookup_bo.patch39
1 files changed, 0 insertions, 39 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0536-drm-vc4-Fix-a-couple-error-codes-in-vc4_cl_lookup_bo.patch b/target/linux/brcm2708/patches-4.4/0536-drm-vc4-Fix-a-couple-error-codes-in-vc4_cl_lookup_bo.patch
deleted file mode 100644
index 72aac75bf9..0000000000
--- a/target/linux/brcm2708/patches-4.4/0536-drm-vc4-Fix-a-couple-error-codes-in-vc4_cl_lookup_bo.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 33286005886531c3f54e84b474b10f05f7c1771e Mon Sep 17 00:00:00 2001
-From: Dan Carpenter <dan.carpenter@oracle.com>
-Date: Thu, 13 Oct 2016 11:54:31 +0300
-Subject: [PATCH] drm/vc4: Fix a couple error codes in vc4_cl_lookup_bos()
-
-If the allocation fails the current code returns success. If
-copy_from_user() fails it returns the number of bytes remaining instead
-of -EFAULT.
-
-Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
-Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
-Reviewed-by: Eric Anholt <eric@anholt.net>
-(cherry picked from commit b2cdeb19f16ad984eb5bb9193f793d05a8101511)
----
- drivers/gpu/drm/vc4/vc4_gem.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
---- a/drivers/gpu/drm/vc4/vc4_gem.c
-+++ b/drivers/gpu/drm/vc4/vc4_gem.c
-@@ -560,14 +560,15 @@ vc4_cl_lookup_bos(struct drm_device *dev
-
- handles = drm_malloc_ab(exec->bo_count, sizeof(uint32_t));
- if (!handles) {
-+ ret = -ENOMEM;
- DRM_ERROR("Failed to allocate incoming GEM handles\n");
- goto fail;
- }
-
-- ret = copy_from_user(handles,
-- (void __user *)(uintptr_t)args->bo_handles,
-- exec->bo_count * sizeof(uint32_t));
-- if (ret) {
-+ if (copy_from_user(handles,
-+ (void __user *)(uintptr_t)args->bo_handles,
-+ exec->bo_count * sizeof(uint32_t))) {
-+ ret = -EFAULT;
- DRM_ERROR("Failed to copy in GEM handles\n");
- goto fail;
- }