gpu: ipu-v3: image-convert: calculate tile dimensions and offsets outside fill_image
This will allow to calculate seam positions after initializing the ipu_image base structure but before calculating tile dimensions. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: Steve Longerbeam <slongerbeam@gmail.com> Tested-by: Steve Longerbeam <slongerbeam@gmail.com>
This commit is contained in:
parent
571dd82c50
commit
26ddd032a8
|
@ -1467,9 +1467,7 @@ static int fill_image(struct ipu_image_convert_ctx *ctx,
|
|||
else
|
||||
ic_image->stride = ic_image->base.pix.bytesperline;
|
||||
|
||||
calc_tile_dimensions(ctx, ic_image);
|
||||
|
||||
return calc_tile_offsets(ctx, ic_image);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* borrowed from drivers/media/v4l2-core/v4l2-common.c */
|
||||
|
@ -1673,10 +1671,6 @@ ipu_image_convert_prepare(struct ipu_soc *ipu, enum ipu_ic_task ic_task,
|
|||
ctx->num_tiles = d_image->num_cols * d_image->num_rows;
|
||||
ctx->rot_mode = rot_mode;
|
||||
|
||||
ret = calc_image_resize_coefficients(ctx, in, out);
|
||||
if (ret)
|
||||
goto out_free;
|
||||
|
||||
ret = fill_image(ctx, s_image, in, IMAGE_CONVERT_IN);
|
||||
if (ret)
|
||||
goto out_free;
|
||||
|
@ -1684,6 +1678,20 @@ ipu_image_convert_prepare(struct ipu_soc *ipu, enum ipu_ic_task ic_task,
|
|||
if (ret)
|
||||
goto out_free;
|
||||
|
||||
ret = calc_image_resize_coefficients(ctx, in, out);
|
||||
if (ret)
|
||||
goto out_free;
|
||||
|
||||
calc_tile_dimensions(ctx, s_image);
|
||||
ret = calc_tile_offsets(ctx, s_image);
|
||||
if (ret)
|
||||
goto out_free;
|
||||
|
||||
calc_tile_dimensions(ctx, d_image);
|
||||
ret = calc_tile_offsets(ctx, d_image);
|
||||
if (ret)
|
||||
goto out_free;
|
||||
|
||||
calc_out_tile_map(ctx);
|
||||
calc_tile_resize_coefficients(ctx);
|
||||
|
||||
|
|
Loading…
Reference in New Issue