[v3,2/2] staging: media: ipu3: fixing stripe1 x_end is greater than BDS width
Commit Message
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@redhat.com>
---
drivers/staging/media/ipu3/ipu3-css-params.c | 4 ++++
1 file changed, 4 insertions(+)
@@ -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