freedreno/kgsl: fix crash introduced w/ bo-cache

Signed-off-by: Rob Clark <robclark@freedesktop.org>
main
Rob Clark 2014-01-05 12:19:12 -05:00
parent e8cbc57965
commit b6caecfa90
1 changed files with 7 additions and 0 deletions

View File

@ -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;