summaryrefslogtreecommitdiff
path: root/freedreno/msm
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2015-07-13 14:34:57 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-07-16 16:41:38 +0100
commitea1786416c58cb0896b640bad5a9e41e1baa4011 (patch)
tree7e187a3ce45d7b66db3f365b09607a02cf332797 /freedreno/msm
parentdfed5e18f35e1a3b5d5b31ee11ada55a0d80abe1 (diff)
freedreno: zero is a valid fd number, treat it as such
Abeit quite unlikely to get hit by this bug here, let just fix it. v2: Correct conditional (do not call ioctl(DRM_IOCTL_PRIME_HANDLE_TO_FD) when we already have the fd). v3: Fix kgsl_pipe.c, suggested by Thierry. Cc: freedreno@lists.freedesktop.org Cc: Rob Clark <robdclark@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'freedreno/msm')
-rw-r--r--freedreno/msm/msm_bo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/freedreno/msm/msm_bo.c b/freedreno/msm/msm_bo.c
index fbd82df7..3f5b6d07 100644
--- a/freedreno/msm/msm_bo.c
+++ b/freedreno/msm/msm_bo.c
@@ -137,6 +137,7 @@ drm_private struct fd_bo * msm_bo_from_handle(struct fd_device *dev,
bo = &msm_bo->base;
bo->funcs = &funcs;
+ bo->fd = -1;
for (i = 0; i < ARRAY_SIZE(msm_bo->list); i++)
list_inithead(&msm_bo->list[i]);