struct priv_cmd_entry *cmd = NULL;
struct gk20a *g = c->g;
u32 free_count;
- int err;
+ int err = 0;
if (c->has_timedout)
return -ETIMEDOUT;
mutex_unlock(&c->submit_lock);
return -ENOMEM;
}
+ if (g->ops.fifo.resetup_ramfc)
+ err = g->ops.fifo.resetup_ramfc(c);
+ if (err)
+ return err;
}
gk20a_fence_put(c->last_submit.pre_fence);
mutex_unlock(&c->submit_lock);
goto clean_up;
}
+ if (g->ops.fifo.resetup_ramfc)
+ err = g->ops.fifo.resetup_ramfc(c);
+ if (err)
+ return err;
}
/*
/* Nothing to do. */
}
+static int gk20a_channel_syncpt_id(struct gk20a_channel_sync *s)
+{
+ struct gk20a_channel_syncpt *sp =
+ container_of(s, struct gk20a_channel_syncpt, ops);
+ return sp->id;
+}
+
static void gk20a_channel_syncpt_destroy(struct gk20a_channel_sync *s)
{
struct gk20a_channel_syncpt *sp =
sp->ops.incr_user = gk20a_channel_syncpt_incr_user;
sp->ops.set_min_eq_max = gk20a_channel_syncpt_set_min_eq_max;
sp->ops.signal_timeline = gk20a_channel_syncpt_signal_timeline;
+ sp->ops.syncpt_id = gk20a_channel_syncpt_id;
sp->ops.destroy = gk20a_channel_syncpt_destroy;
sp->ops.aggressive_destroy = true;
gk20a_sync_timeline_signal(sp->timeline);
}
+static int gk20a_channel_semaphore_syncpt_id(struct gk20a_channel_sync *s)
+{
+ return -EINVAL;
+}
+
static void gk20a_channel_semaphore_destroy(struct gk20a_channel_sync *s)
{
struct gk20a_channel_semaphore *sema =
sema->ops.incr_user = gk20a_channel_semaphore_incr_user;
sema->ops.set_min_eq_max = gk20a_channel_semaphore_set_min_eq_max;
sema->ops.signal_timeline = gk20a_channel_semaphore_signal_timeline;
+ sema->ops.syncpt_id = gk20a_channel_semaphore_syncpt_id;
sema->ops.destroy = gk20a_channel_semaphore_destroy;
/* Aggressively destroying the semaphore sync would cause overhead
* expired. */
void (*signal_timeline)(struct gk20a_channel_sync *s);
+ /* Returns the sync point id or negative number if no syncpt*/
+ int (*syncpt_id)(struct gk20a_channel_sync *s);
+
/* flag to set sync destroy aggressiveness */
bool aggressive_destroy;
void (*free_inst)(struct gk20a *g, struct channel_gk20a *ch);
int (*setup_ramfc)(struct channel_gk20a *c, u64 gpfifo_base,
u32 gpfifo_entries);
+ int (*resetup_ramfc)(struct channel_gk20a *c);
int (*preempt_channel)(struct gk20a *g, u32 hw_chid);
int (*update_runlist)(struct gk20a *g, u32 runlist_id,
u32 hw_chid, bool add,