Lines Matching defs:run

223 	/* the current conversion run */
1253 struct ipu_image_convert_run *run;
1258 list_for_each_entry(run, q, list) {
1259 if (run->ctx == ctx)
1266 static void convert_stop(struct ipu_image_convert_run *run)
1268 struct ipu_image_convert_ctx *ctx = run->ctx;
1272 dev_dbg(priv->ipu->dev, "%s: task %u: stopping ctx %p run %p\n",
1273 __func__, chan->ic_task, ctx, run);
1379 static int convert_start(struct ipu_image_convert_run *run, unsigned int tile)
1381 struct ipu_image_convert_ctx *ctx = run->ctx;
1392 dev_dbg(priv->ipu->dev, "%s: task %u: starting ctx %p run %p tile %u -> %u\n",
1393 __func__, chan->ic_task, ctx, run, tile, dst_tile);
1494 static int do_run(struct ipu_image_convert_run *run)
1496 struct ipu_image_convert_ctx *ctx = run->ctx;
1501 ctx->in.base.phys0 = run->in_phys;
1502 ctx->out.base.phys0 = run->out_phys;
1507 /* remove run from pending_q and set as current */
1508 list_del(&run->list);
1509 chan->current_run = run;
1511 return convert_start(run, 0);
1518 struct ipu_image_convert_run *run, *tmp;
1523 list_for_each_entry_safe(run, tmp, &chan->pending_q, list) {
1525 if (run->ctx->aborting) {
1527 "%s: task %u: skipping aborting ctx %p run %p\n",
1528 __func__, chan->ic_task, run->ctx, run);
1532 ret = do_run(run);
1537 * something went wrong with start, add the run
1538 * to done q and continue to the next run in the
1541 run->status = ret;
1542 list_add_tail(&run->list, &chan->done_q);
1550 struct ipu_image_convert_run *run;
1556 run = list_entry(chan->done_q.next,
1560 list_del(&run->list);
1563 "%s: task %u: completing ctx %p run %p with %d\n",
1564 __func__, chan->ic_task, run->ctx, run, run->status);
1566 /* call the completion callback and free the run */
1568 run->ctx->complete(run, run->ctx->complete_context);
1633 static irqreturn_t do_tile_complete(struct ipu_image_convert_run *run)
1635 struct ipu_image_convert_ctx *ctx = run->ctx;
1657 convert_stop(run);
1658 run->status = -EIO;
1666 convert_stop(run);
1667 run->status = 0;
1676 convert_stop(run);
1677 convert_start(run, ctx->next_tile);
1722 list_add_tail(&run->list, &chan->done_q);
1733 struct ipu_image_convert_run *run;
1740 /* get current run and its context */
1741 run = chan->current_run;
1742 if (!run) {
1747 ctx = run->ctx;
1775 ret = do_tile_complete(run);
1788 struct ipu_image_convert_run *run;
1793 run = chan->current_run;
1794 if (run && run->ctx == ctx) {
1795 convert_stop(run);
1796 run->status = -EIO;
1797 list_add_tail(&run->list, &chan->done_q);
2261 * Carry out a single image conversion run. Only the physaddr's of the input
2265 int ipu_image_convert_queue(struct ipu_image_convert_run *run)
2273 if (!run || !run->ctx || !run->in_phys || !run->out_phys)
2276 ctx = run->ctx;
2280 dev_dbg(priv->ipu->dev, "%s: task %u: ctx %p run %p\n", __func__,
2281 chan->ic_task, ctx, run);
2283 INIT_LIST_HEAD(&run->list);
2292 list_add_tail(&run->list, &chan->pending_q);
2295 ret = do_run(run);
2310 struct ipu_image_convert_run *run, *active_run, *tmp;
2317 list_for_each_entry_safe(run, tmp, &chan->pending_q, list) {
2318 if (run->ctx != ctx)
2320 run->status = -EIO;
2321 list_move_tail(&run->list, &chan->done_q);
2400 * a new conversion run. On successful return the caller must free the
2401 * run and call ipu_image_convert_unprepare() after conversion completes.
2411 struct ipu_image_convert_run *run;
2419 run = kzalloc(sizeof(*run), GFP_KERNEL);
2420 if (!run) {
2425 run->ctx = ctx;
2426 run->in_phys = in->phys0;
2427 run->out_phys = out->phys0;
2429 ret = ipu_image_convert_queue(run);
2432 kfree(run);
2436 return run;
2441 static void image_convert_sync_complete(struct ipu_image_convert_run *run,
2453 struct ipu_image_convert_run *run;
2459 run = ipu_image_convert(ipu, ic_task, in, out, rot_mode,
2461 if (IS_ERR(run))
2462 return PTR_ERR(run);
2467 ipu_image_convert_unprepare(run->ctx);
2468 kfree(run);