diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-09-18 11:34:13 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2018-11-05 14:40:07 +0100 |
commit | 26ddd032a82bf66868271350f20453e865a90d5f (patch) | |
tree | fa0d0c1e92b501ad76610f97a701bf3b5fe5e432 /drivers/gpu/ipu-v3/ipu-image-convert.c | |
parent | gpu: ipu-v3: image-convert: store tile top/left position (diff) | |
download | linux-26ddd032a82bf66868271350f20453e865a90d5f.tar.xz linux-26ddd032a82bf66868271350f20453e865a90d5f.zip |
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>
Diffstat (limited to 'drivers/gpu/ipu-v3/ipu-image-convert.c')
-rw-r--r-- | drivers/gpu/ipu-v3/ipu-image-convert.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c index d14ee7b303a1..542c091cfef1 100644 --- a/drivers/gpu/ipu-v3/ipu-image-convert.c +++ b/drivers/gpu/ipu-v3/ipu-image-convert.c @@ -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,14 +1671,24 @@ 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 = fill_image(ctx, s_image, in, IMAGE_CONVERT_IN); + if (ret) + goto out_free; + ret = fill_image(ctx, d_image, out, IMAGE_CONVERT_OUT); + if (ret) + goto out_free; + ret = calc_image_resize_coefficients(ctx, in, out); if (ret) goto out_free; - ret = fill_image(ctx, s_image, in, IMAGE_CONVERT_IN); + calc_tile_dimensions(ctx, s_image); + ret = calc_tile_offsets(ctx, s_image); if (ret) goto out_free; - ret = fill_image(ctx, d_image, out, IMAGE_CONVERT_OUT); + + calc_tile_dimensions(ctx, d_image); + ret = calc_tile_offsets(ctx, d_image); if (ret) goto out_free; |