Lines Matching defs:run

220 	/* the current conversion run */
1257 struct ipu_image_convert_run *run;
1262 list_for_each_entry(run, q, list) {
1263 if (run->ctx == ctx)
1270 static void convert_stop(struct ipu_image_convert_run *run)
1272 struct ipu_image_convert_ctx *ctx = run->ctx;
1276 dev_dbg(priv->ipu->dev, "%s: task %u: stopping ctx %p run %p\n",
1277 __func__, chan->ic_task, ctx, run);
1383 static int convert_start(struct ipu_image_convert_run *run, unsigned int tile)
1385 struct ipu_image_convert_ctx *ctx = run->ctx;
1396 dev_dbg(priv->ipu->dev, "%s: task %u: starting ctx %p run %p tile %u -> %u\n",
1397 __func__, chan->ic_task, ctx, run, tile, dst_tile);
1498 static int do_run(struct ipu_image_convert_run *run)
1500 struct ipu_image_convert_ctx *ctx = run->ctx;
1505 ctx->in.base.phys0 = run->in_phys;
1506 ctx->out.base.phys0 = run->out_phys;
1511 /* remove run from pending_q and set as current */
1512 list_del(&run->list);
1513 chan->current_run = run;
1515 return convert_start(run, 0);
1522 struct ipu_image_convert_run *run, *tmp;
1527 list_for_each_entry_safe(run, tmp, &chan->pending_q, list) {
1529 if (run->ctx->aborting) {
1531 "%s: task %u: skipping aborting ctx %p run %p\n",
1532 __func__, chan->ic_task, run->ctx, run);
1536 ret = do_run(run);
1541 * something went wrong with start, add the run
1542 * to done q and continue to the next run in the
1545 run->status = ret;
1546 list_add_tail(&run->list, &chan->done_q);
1554 struct ipu_image_convert_run *run;
1560 run = list_entry(chan->done_q.next,
1564 list_del(&run->list);
1567 "%s: task %u: completing ctx %p run %p with %d\n",
1568 __func__, chan->ic_task, run->ctx, run, run->status);
1570 /* call the completion callback and free the run */
1572 run->ctx->complete(run, run->ctx->complete_context);
1637 static irqreturn_t do_tile_complete(struct ipu_image_convert_run *run)
1639 struct ipu_image_convert_ctx *ctx = run->ctx;
1661 convert_stop(run);
1662 run->status = -EIO;
1670 convert_stop(run);
1671 run->status = 0;
1680 convert_stop(run);
1681 convert_start(run, ctx->next_tile);
1726 list_add_tail(&run->list, &chan->done_q);
1737 struct ipu_image_convert_run *run;
1744 /* get current run and its context */
1745 run = chan->current_run;
1746 if (!run) {
1751 ctx = run->ctx;
1779 ret = do_tile_complete(run);
1792 struct ipu_image_convert_run *run;
1797 run = chan->current_run;
1798 if (run && run->ctx == ctx) {
1799 convert_stop(run);
1800 run->status = -EIO;
1801 list_add_tail(&run->list, &chan->done_q);
2265 * Carry out a single image conversion run. Only the physaddr's of the input
2269 int ipu_image_convert_queue(struct ipu_image_convert_run *run)
2277 if (!run || !run->ctx || !run->in_phys || !run->out_phys)
2280 ctx = run->ctx;
2284 dev_dbg(priv->ipu->dev, "%s: task %u: ctx %p run %p\n", __func__,
2285 chan->ic_task, ctx, run);
2287 INIT_LIST_HEAD(&run->list);
2296 list_add_tail(&run->list, &chan->pending_q);
2299 ret = do_run(run);
2314 struct ipu_image_convert_run *run, *active_run, *tmp;
2321 list_for_each_entry_safe(run, tmp, &chan->pending_q, list) {
2322 if (run->ctx != ctx)
2324 run->status = -EIO;
2325 list_move_tail(&run->list, &chan->done_q);
2404 * a new conversion run. On successful return the caller must free the
2405 * run and call ipu_image_convert_unprepare() after conversion completes.
2415 struct ipu_image_convert_run *run;
2423 run = kzalloc(sizeof(*run), GFP_KERNEL);
2424 if (!run) {
2429 run->ctx = ctx;
2430 run->in_phys = in->phys0;
2431 run->out_phys = out->phys0;
2433 ret = ipu_image_convert_queue(run);
2436 kfree(run);
2440 return run;
2445 static void image_convert_sync_complete(struct ipu_image_convert_run *run,
2457 struct ipu_image_convert_run *run;
2463 run = ipu_image_convert(ipu, ic_task, in, out, rot_mode,
2465 if (IS_ERR(run))
2466 return PTR_ERR(run);
2471 ipu_image_convert_unprepare(run->ctx);
2472 kfree(run);