gpu: ipu-v3: image-convert: Fix image downsize coefficients
authorSteve Longerbeam <slongerbeam@gmail.com>
Wed, 12 Jun 2019 01:16:57 +0000 (18:16 -0700)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Fri, 14 Jun 2019 12:06:16 +0000 (14:06 +0200)
commit912bbf7e9ca422099935dd69d3ff0fd62db24882
tree043ac031cca36f1a02054d3ae891ca57363cebeb
parentbca4d70cf1b8f6478a711c448a3a1e47b794b162
gpu: ipu-v3: image-convert: Fix image downsize coefficients

The output of the IC downsizer unit in both dimensions must be <= 1024
before being passed to the IC resizer unit. This was causing corrupted
images when:

input_dim > 1024, and
input_dim / 2 < output_dim < input_dim

Some broken examples were 1920x1080 -> 1024x768 and 1920x1080 ->
1280x1080.

Fixes: 70b9b6b3bcb21 ("gpu: ipu-v3: image-convert: calculate per-tile
resize coefficients")

Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
drivers/gpu/ipu-v3/ipu-image-convert.c