summaryrefslogtreecommitdiff
path: root/freedreno
diff options
context:
space:
mode:
authorRob Clark <robclark@freedesktop.org>2014-01-05 12:19:12 -0500
committerRob Clark <robclark@freedesktop.org>2014-01-07 11:33:54 -0500
commitb6caecfa904de0b4e35b93ed1212ae0089078b6d (patch)
tree8b8971dba6a8bed060a4b7234ba554afba4c9265 /freedreno
parente8cbc579651ef55274763c67acb366dd4155e0ce (diff)
freedreno/kgsl: fix crash introduced w/ bo-cache
Signed-off-by: Rob Clark <robclark@freedesktop.org>
Diffstat (limited to 'freedreno')
-rw-r--r--freedreno/kgsl/kgsl_bo.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c
index 585851c7..76d1f277 100644
--- a/freedreno/kgsl/kgsl_bo.c
+++ b/freedreno/kgsl/kgsl_bo.c
@@ -85,6 +85,13 @@ static int kgsl_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
uint32_t current;
int ret;
+ /* special case for is_idle().. we can't really handle that
+ * properly in kgsl (perhaps we need a way to just disable
+ * the bo-cache for kgsl?)
+ */
+ if (!pipe)
+ return -EBUSY;
+
ret = kgsl_pipe_timestamp(to_kgsl_pipe(pipe), &current);
if (ret)
return ret;