[PATCH 7/7] gpu: ipu-v3: image-convert: only sample into the next tile if necessary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The first pixel of the next tile is only sampled by the hardware if the
fractional input position corresponding to the last written output pixel
is not an integer position.

Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
 drivers/gpu/ipu-v3/ipu-image-convert.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers/gpu/ipu-v3/ipu-image-convert.c
index cc237c1f32f0..06d658c8ca3b 100644
--- a/drivers/gpu/ipu-v3/ipu-image-convert.c
+++ b/drivers/gpu/ipu-v3/ipu-image-convert.c
@@ -1149,7 +1149,7 @@ static void calc_tile_resize_coefficients(struct ipu_image_convert_ctx *ctx)
 		 * burst size.
 		 */
 		last_output = resized_width - 1;
-		if (closest)
+		if (closest && ((last_output * resize_coeff_h) % 8192))
 			last_output++;
 		in_width = round_up(
 			(DIV_ROUND_UP(last_output * resize_coeff_h, 8192) + 1)
@@ -1206,7 +1206,7 @@ static void calc_tile_resize_coefficients(struct ipu_image_convert_ctx *ctx)
 		 * IDMAC restrictions.
 		 */
 		last_output = resized_height - 1;
-		if (closest)
+		if (closest && ((last_output * resize_coeff_v) % 8192))
 			last_output++;
 		in_height = round_up(
 			(DIV_ROUND_UP(last_output * resize_coeff_v, 8192) + 1)
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux