#endif /* MALI_UNIT_TEST */
#define KBASE_DRV_NAME "mali"
-#define ROCKCHIP_VERSION 3
+#define ROCKCHIP_VERSION 4
static const char kbase_drv_name[] = KBASE_DRV_NAME;
static int kbase_dev_nr;
static void kbase_fence_cancel_wait(kbase_jd_atom *katom)
{
+ if(!katom || !katom->fence)
+ {
+ pr_info("%s,katom or katom->fence NULL\n",__func__);
+ return;
+ }
if (sync_fence_cancel_async(katom->fence, &katom->sync_waiter) != 0)
{
/* The wait wasn't cancelled - leave the cleanup for kbase_fence_wait_callback */
break;
case BASE_JD_REQ_SOFT_FENCE_WAIT:
/* Release the reference to the fence object */
- sync_fence_put(katom->fence);
- katom->fence = NULL;
+ if(katom->fence){
+ sync_fence_put(katom->fence);
+ katom->fence = NULL;
+ }
break;
#endif /* CONFIG_SYNC */
}