From ea1786416c58cb0896b640bad5a9e41e1baa4011 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Mon, 13 Jul 2015 14:34:57 +0100 Subject: 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 Signed-off-by: Emil Velikov Reviewed-by: Thierry Reding --- freedreno/msm/msm_bo.c | 1 + 1 file changed, 1 insertion(+) (limited to 'freedreno/msm') 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]); -- cgit v1.2.3