[PATCH v3 2/2] staging: media: ipu3: fixing stripe1 x_end is greater than BDS width

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

 



If both stripes are enabled, an improper AF grid configuration leads
the AF scene width to be wilder than the BDS width. Also, the second
stripe x_end is estimated based on the remaining AF scene width.
Therefore, the second stripe x_end will be greater than the second
stripe BDS width.

In this patch, if the second stripe x_end is greater than BDS width,
x_end will be set to BDS width.

Signed-off-by: Kate Hsuan <hpa@xxxxxxxxxx>
---
 drivers/staging/media/ipu3/ipu3-css-params.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/staging/media/ipu3/ipu3-css-params.c b/drivers/staging/media/ipu3/ipu3-css-params.c
index 5a8c07f34756..8923760aa913 100644
--- a/drivers/staging/media/ipu3/ipu3-css-params.c
+++ b/drivers/staging/media/ipu3/ipu3-css-params.c
@@ -2593,6 +2593,10 @@ int imgu_css_cfg_acc(struct imgu_css *css, unsigned int pipe,
 					  acc->af.stripes[1].grid_cfg.width,
 					  b_w_log2);
 
+		if (acc->af.stripes[1].grid_cfg.x_end >= acc->stripe.bds_out_stripes[1].width)
+			acc->af.stripes[1].grid_cfg.x_end =
+				acc->stripe.bds_out_stripes[1].width - min_overlap;
+
 		/*
 		 * To reduce complexity of debubbling and loading statistics
 		 * fix grid_height_per_slice to 1 for both stripes
-- 
2.35.1





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux