| Refresh |
This website lore-kernel.gnuweeb.org/lkml/20220407132609.GN3293@kadam/T/ is currently offline. Cloudflare\'s Always Online™ shows a snapshot of this web page from the Internet Archive\'s Wayback Machine. To check for the live version, click Refresh. |
* [PATCH v2] staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used @ 2022-04-07 10:57 Kate Hsuan 2022-04-07 11:51 ` Dan Carpenter 0 siblings, 1 reply; 5+ messages in thread From: Kate Hsuan @ 2022-04-07 10:57 UTC (permalink / raw) To: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab, Greg Kroah-Hartman Cc: Jean-Michel Hautbois, linux-media, linux-staging, linux-kernel, hdegoede, Kate Hsuan A not calibrated x_start setting would result in an incorrect AWB location configuration on a sensor when only the rightmost stripe is used. x_start should be calibrated by subtracting the stripe offset to set the coordinate to the correct position on the second stripe. Signed-off-by: Kate Hsuan <hpa@redhat.com> --- Correct the patch. The correction should be awb, not awb_fr. --- drivers/staging/media/ipu3/ipu3-css-params.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/media/ipu3/ipu3-css-params.c b/drivers/staging/media/ipu3/ipu3-css-params.c index f84cf11358a8..76ad802d694e 100644 --- a/drivers/staging/media/ipu3/ipu3-css-params.c +++ b/drivers/staging/media/ipu3/ipu3-css-params.c @@ -2636,6 +2636,17 @@ int imgu_css_cfg_acc(struct imgu_css *css, unsigned int pipe, acc->stripe.down_scaled_stripes[1].offset + min_overlap) { /* Enable only for rightmost stripe, disable left */ acc->awb.stripes[0].rgbs_thr_b &= ~IPU3_UAPI_AWB_RGBS_THR_B_EN; + + acc->awb.stripes[1].grid.x_start = + (acc->awb.stripes[1].grid.x_start - + acc->stripe.down_scaled_stripes[1].offset) & + IPU3_UAPI_GRID_START_MASK; + + b_w_log2 = acc->awb.stripes[1].grid.block_width_log2; + acc->awb.stripes[1].grid.x_end = + imgu_css_grid_end(acc->awb.stripes[1].grid.x_start, + acc->awb.stripes[1].grid.width, + b_w_log2); } else if (acc->awb.config.grid.x_end <= acc->stripe.bds_out_stripes[0].width - min_overlap) { /* Enable only for leftmost stripe, disable right */ -- 2.35.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used 2022-04-07 10:57 [PATCH v2] staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used Kate Hsuan @ 2022-04-07 11:51 ` Dan Carpenter 2022-04-07 13:17 ` Kate Hsuan 0 siblings, 1 reply; 5+ messages in thread From: Dan Carpenter @ 2022-04-07 11:51 UTC (permalink / raw) To: Kate Hsuan Cc: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab, Greg Kroah-Hartman, Jean-Michel Hautbois, linux-media, linux-staging, linux-kernel, hdegoede On Thu, Apr 07, 2022 at 06:57:24PM +0800, Kate Hsuan wrote: > A not calibrated x_start setting would result in an incorrect AWB location > configuration on a sensor when only the rightmost stripe is used. x_start > should be calibrated by subtracting the stripe offset to set the coordinate > to the correct position on the second stripe. > I wish the commit description said more about what the bug looks like to the user. This is the front facing camera, right? Is part of the video blank or what's the deal? > Signed-off-by: Kate Hsuan <hpa@redhat.com> > --- > Correct the patch. The correction should be awb, not awb_fr. I tried to review the original patch and it was impossible. I saw you're from an @redhat.com email address so I decided it must be right. I kind of get that you need to be a domain expert to review these patches but this function is such a mess... regards, dan carpenter ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used 2022-04-07 11:51 ` Dan Carpenter @ 2022-04-07 13:17 ` Kate Hsuan 2022-04-07 13:26 ` Dan Carpenter 0 siblings, 1 reply; 5+ messages in thread From: Kate Hsuan @ 2022-04-07 13:17 UTC (permalink / raw) To: Dan Carpenter Cc: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab, Greg Kroah-Hartman, Jean-Michel Hautbois, linux-media, linux-staging, linux-kernel, Hans De Goede Hi Dan, On Thu, Apr 7, 2022 at 7:52 PM Dan Carpenter <dan.carpenter@oracle.com> wrote: > > On Thu, Apr 07, 2022 at 06:57:24PM +0800, Kate Hsuan wrote: > > A not calibrated x_start setting would result in an incorrect AWB location > > configuration on a sensor when only the rightmost stripe is used. x_start > > should be calibrated by subtracting the stripe offset to set the coordinate > > to the correct position on the second stripe. > > > > I wish the commit description said more about what the bug looks like to > the user. This is the front facing camera, right? Is part of the video > blank or what's the deal? This is IPU3 image processor. I tried to fix the configuration issues on stripe 1 coordinate settings. > > > Signed-off-by: Kate Hsuan <hpa@redhat.com> > > --- > > Correct the patch. The correction should be awb, not awb_fr. > > I tried to review the original patch and it was impossible. I saw > you're from an @redhat.com email address so I decided it must be right. > > I kind of get that you need to be a domain expert to review these > patches but this function is such a mess... Sorry for the misunderstanding in my comments. Since I made some mistakes on my v1 patch, so I had corrected this part and quickly sent the v2 patch. You are welcome to pinpoint the errors for my v2 patch. I could fix them. Thank you. > > regards, > dan carpenter > -- BR, Kate ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used
2022-04-07 13:17 ` Kate Hsuan
@ 2022-04-07 13:26 ` Dan Carpenter
2022-04-08 3:07 ` Kate Hsuan
0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2022-04-07 13:26 UTC (permalink / raw)
To: Kate Hsuan
Cc: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Jean-Michel Hautbois, linux-media,
linux-staging, linux-kernel, Hans De Goede
On Thu, Apr 07, 2022 at 09:17:38PM +0800, Kate Hsuan wrote:
> Hi Dan,
>
> On Thu, Apr 7, 2022 at 7:52 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > On Thu, Apr 07, 2022 at 06:57:24PM +0800, Kate Hsuan wrote:
> > > A not calibrated x_start setting would result in an incorrect AWB location
> > > configuration on a sensor when only the rightmost stripe is used. x_start
> > > should be calibrated by subtracting the stripe offset to set the coordinate
> > > to the correct position on the second stripe.
> > >
>
> >
> > I wish the commit description said more about what the bug looks like to
> > the user. This is the front facing camera, right? Is part of the video
> > blank or what's the deal?
>
> This is IPU3 image processor. I tried to fix the configuration issues
> on stripe 1 coordinate settings.
>
So in terms of users, if you configure it in a certain way then it
crashes? What happens in terms of what the ordinary user sees?
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2] staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used 2022-04-07 13:26 ` Dan Carpenter @ 2022-04-08 3:07 ` Kate Hsuan 0 siblings, 0 replies; 5+ messages in thread From: Kate Hsuan @ 2022-04-08 3:07 UTC (permalink / raw) To: Dan Carpenter Cc: Sakari Ailus, Bingbu Cao, Tianshu Qiu, Mauro Carvalho Chehab, Greg Kroah-Hartman, Jean-Michel Hautbois, linux-media, linux-staging, linux-kernel, Hans De Goede Hi Dan, On Thu, Apr 7, 2022 at 9:27 PM Dan Carpenter <dan.carpenter@oracle.com> wrote: > > On Thu, Apr 07, 2022 at 09:17:38PM +0800, Kate Hsuan wrote: > > Hi Dan, > > > > On Thu, Apr 7, 2022 at 7:52 PM Dan Carpenter <dan.carpenter@oracle.com> wrote: > > > > > > On Thu, Apr 07, 2022 at 06:57:24PM +0800, Kate Hsuan wrote: > > > > A not calibrated x_start setting would result in an incorrect AWB location > > > > configuration on a sensor when only the rightmost stripe is used. x_start > > > > should be calibrated by subtracting the stripe offset to set the coordinate > > > > to the correct position on the second stripe. > > > > > > > > > > > > I wish the commit description said more about what the bug looks like to > > > the user. This is the front facing camera, right? Is part of the video > > > blank or what's the deal? > > > > This is IPU3 image processor. I tried to fix the configuration issues > > on stripe 1 coordinate settings. > > > > So in terms of users, if you configure it in a certain way then it > crashes? What happens in terms of what the ordinary user sees? > It will not crash. Currently, application, such as libcamara only uses stripe 0 to estimate 3A (AE AWB AF). The grid coordinate can be used to determine the area on a sensor where we use this area to determine the 3A status. If we start to move the grid and it crosses the stripe 1 offset. The grid will be at the rightmost edge of the sensor. The user may only feel the location of AF, AWB, AE of the image is not the user's expectation. I'll update them in the v3 patch. > regards, > dan carpenter > -- BR, Kate ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-04-08 3:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-04-07 10:57 [PATCH v2] staging: media: ipu3: Fix AWB x_start position when rightmost stripe is used Kate Hsuan 2022-04-07 11:51 ` Dan Carpenter 2022-04-07 13:17 ` Kate Hsuan 2022-04-07 13:26 ` Dan Carpenter 2022-04-08 3:07 ` Kate Hsuan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox