Lines Matching defs:run

223 	/* the current conversion run */
1239 struct ipu_image_convert_run *run;
1244 list_for_each_entry(run, q, list) {
1245 if (run->ctx == ctx)
1252 static void convert_stop(struct ipu_image_convert_run *run)
1254 struct ipu_image_convert_ctx *ctx = run->ctx;
1258 dev_dbg(priv->ipu->dev, "%s: task %u: stopping ctx %p run %p\n",
1259 __func__, chan->ic_task, ctx, run);
1365 static int convert_start(struct ipu_image_convert_run *run, unsigned int tile)
1367 struct ipu_image_convert_ctx *ctx = run->ctx;
1378 dev_dbg(priv->ipu->dev, "%s: task %u: starting ctx %p run %p tile %u -> %u\n",
1379 __func__, chan->ic_task, ctx, run, tile, dst_tile);
1480 static int do_run(struct ipu_image_convert_run *run)
1482 struct ipu_image_convert_ctx *ctx = run->ctx;
1487 ctx->in.base.phys0 = run->in_phys;
1488 ctx->out.base.phys0 = run->out_phys;
1493 /* remove run from pending_q and set as current */
1494 list_del(&run->list);
1495 chan->current_run = run;
1497 return convert_start(run, 0);
1504 struct ipu_image_convert_run *run, *tmp;
1509 list_for_each_entry_safe(run, tmp, &chan->pending_q, list) {
1511 if (run->ctx->aborting) {
1513 "%s: task %u: skipping aborting ctx %p run %p\n",
1514 __func__, chan->ic_task, run->ctx, run);
1518 ret = do_run(run);
1523 * something went wrong with start, add the run
1524 * to done q and continue to the next run in the
1527 run->status = ret;
1528 list_add_tail(&run->list, &chan->done_q);
1536 struct ipu_image_convert_run *run;
1542 run = list_entry(chan->done_q.next,
1546 list_del(&run->list);
1549 "%s: task %u: completing ctx %p run %p with %d\n",
1550 __func__, chan->ic_task, run->ctx, run, run->status);
1552 /* call the completion callback and free the run */
1554 run->ctx->complete(run, run->ctx->complete_context);
1619 static irqreturn_t do_tile_complete(struct ipu_image_convert_run *run)
1621 struct ipu_image_convert_ctx *ctx = run->ctx;
1643 convert_stop(run);
1644 run->status = -EIO;
1652 convert_stop(run);
1653 run->status = 0;
1662 convert_stop(run);
1663 convert_start(run, ctx->next_tile);
1708 list_add_tail(&run->list, &chan->done_q);
1719 struct ipu_image_convert_run *run;
1726 /* get current run and its context */
1727 run = chan->current_run;
1728 if (!run) {
1733 ctx = run->ctx;
1761 ret = do_tile_complete(run);
1774 struct ipu_image_convert_run *run;
1779 run = chan->current_run;
1780 if (run && run->ctx == ctx) {
1781 convert_stop(run);
1782 run->status = -EIO;
1783 list_add_tail(&run->list, &chan->done_q);
2247 * Carry out a single image conversion run. Only the physaddr's of the input
2251 int ipu_image_convert_queue(struct ipu_image_convert_run *run)
2259 if (!run || !run->ctx || !run->in_phys || !run->out_phys)
2262 ctx = run->ctx;
2266 dev_dbg(priv->ipu->dev, "%s: task %u: ctx %p run %p\n", __func__,
2267 chan->ic_task, ctx, run);
2269 INIT_LIST_HEAD(&run->list);
2278 list_add_tail(&run->list, &chan->pending_q);
2281 ret = do_run(run);
2296 struct ipu_image_convert_run *run, *active_run, *tmp;
2303 list_for_each_entry_safe(run, tmp, &chan->pending_q, list) {
2304 if (run->ctx != ctx)
2306 run->status = -EIO;
2307 list_move_tail(&run->list, &chan->done_q);
2386 * a new conversion run. On successful return the caller must free the
2387 * run and call ipu_image_convert_unprepare() after conversion completes.
2397 struct ipu_image_convert_run *run;
2405 run = kzalloc(sizeof(*run), GFP_KERNEL);
2406 if (!run) {
2411 run->ctx = ctx;
2412 run->in_phys = in->phys0;
2413 run->out_phys = out->phys0;
2415 ret = ipu_image_convert_queue(run);
2418 kfree(run);
2422 return run;