* [PATCH v4] media: ov8856: Configure sensor for GRBG Bayer for all modes
@ 2021-01-18 19:01 Robert Foss
2021-01-18 19:18 ` Andrey Konovalov
0 siblings, 1 reply; 5+ messages in thread
From: Robert Foss @ 2021-01-18 19:01 UTC (permalink / raw)
To: dongchun.zhu, mchehab, linux-media, linux-kernel, Dongchun Zhu,
Sakari Ailus, Bingbu Cao, Andrey Konovalov
Cc: Tomasz Figa, Robert Foss
The previously added modes 3264x2448 & 1632x1224 are actually
configuring the sensor for BGGR mode, this is an issue since
the mode that is exposed through V4L incorrectly is set as GRBG.
This patch fixes the issue by moving the output crop window of
internal sensor ISP uses by one row, which means that the Bayer
pattern of the output is changed.
From:
row 1: B G B G B G ...
row 2: G R G R G R ...
raw 3: B G B G B G ...
...
To:
raw 2: G R G R G R ...
raw 3: B G B G B G ...
...
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Suggested-by: Andrey Konovalov <andrey.konovalov@linaro.org>
---
Changes since v1:
- Sakari: Added mode information to ov8856_mode struct
- Sakari: enum_mbus_code updated
Changes since v2:
- Andrey: Switched approach to changing the sensor configuration
to yield identical Bayer modes for all modes
Changes since v3:
- Andrey: Improve commit msg to explain Bayer shift better
drivers/media/i2c/ov8856.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
index 2f4ceaa80593..8a355135c7db 100644
--- a/drivers/media/i2c/ov8856.c
+++ b/drivers/media/i2c/ov8856.c
@@ -428,7 +428,7 @@ static const struct ov8856_reg mode_3264x2448_regs[] = {
{0x3810, 0x00},
{0x3811, 0x04},
{0x3812, 0x00},
- {0x3813, 0x02},
+ {0x3813, 0x01},
{0x3814, 0x01},
{0x3815, 0x01},
{0x3816, 0x00},
@@ -821,7 +821,7 @@ static const struct ov8856_reg mode_1632x1224_regs[] = {
{0x3810, 0x00},
{0x3811, 0x02},
{0x3812, 0x00},
- {0x3813, 0x02},
+ {0x3813, 0x01},
{0x3814, 0x03},
{0x3815, 0x01},
{0x3816, 0x00},
--
2.27.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4] media: ov8856: Configure sensor for GRBG Bayer for all modes
2021-01-18 19:01 [PATCH v4] media: ov8856: Configure sensor for GRBG Bayer for all modes Robert Foss
@ 2021-01-18 19:18 ` Andrey Konovalov
2021-01-18 19:28 ` Andrey Konovalov
0 siblings, 1 reply; 5+ messages in thread
From: Andrey Konovalov @ 2021-01-18 19:18 UTC (permalink / raw)
To: Robert Foss, dongchun.zhu, mchehab, linux-media, linux-kernel,
Sakari Ailus, Bingbu Cao
Cc: Tomasz Figa
Hi Robert,
Thanks for you patch!
Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
On 18.01.2021 22:01, Robert Foss wrote:
> The previously added modes 3264x2448 & 1632x1224 are actually
> configuring the sensor for BGGR mode, this is an issue since
> the mode that is exposed through V4L incorrectly is set as GRBG.
>
> This patch fixes the issue by moving the output crop window of
> internal sensor ISP uses by one row, which means that the Bayer
> pattern of the output is changed.
>
> From:
> row 1: B G B G B G ...
> row 2: G R G R G R ...
> raw 3: B G B G B G ...
> ...
>
> To:
> raw 2: G R G R G R ...
> raw 3: B G B G B G ...
> ...
>
> Signed-off-by: Robert Foss <robert.foss@linaro.org>
> Suggested-by: Andrey Konovalov <andrey.konovalov@linaro.org>
> ---
>
> Changes since v1:
> - Sakari: Added mode information to ov8856_mode struct
> - Sakari: enum_mbus_code updated
>
> Changes since v2:
> - Andrey: Switched approach to changing the sensor configuration
> to yield identical Bayer modes for all modes
>
> Changes since v3:
> - Andrey: Improve commit msg to explain Bayer shift better
>
> drivers/media/i2c/ov8856.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
> index 2f4ceaa80593..8a355135c7db 100644
> --- a/drivers/media/i2c/ov8856.c
> +++ b/drivers/media/i2c/ov8856.c
> @@ -428,7 +428,7 @@ static const struct ov8856_reg mode_3264x2448_regs[] = {
> {0x3810, 0x00},
> {0x3811, 0x04},
> {0x3812, 0x00},
> - {0x3813, 0x02},
> + {0x3813, 0x01},
> {0x3814, 0x01},
> {0x3815, 0x01},
> {0x3816, 0x00},
> @@ -821,7 +821,7 @@ static const struct ov8856_reg mode_1632x1224_regs[] = {
> {0x3810, 0x00},
> {0x3811, 0x02},
> {0x3812, 0x00},
> - {0x3813, 0x02},
> + {0x3813, 0x01},
> {0x3814, 0x03},
> {0x3815, 0x01},
> {0x3816, 0x00},
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4] media: ov8856: Configure sensor for GRBG Bayer for all modes
2021-01-18 19:18 ` Andrey Konovalov
@ 2021-01-18 19:28 ` Andrey Konovalov
2021-01-18 19:54 ` Robert Foss
0 siblings, 1 reply; 5+ messages in thread
From: Andrey Konovalov @ 2021-01-18 19:28 UTC (permalink / raw)
To: Robert Foss, dongchun.zhu, mchehab, linux-media, linux-kernel,
Sakari Ailus, Bingbu Cao
Cc: Tomasz Figa
Oops.. I've missed a few mistypes
On 18.01.2021 22:18, Andrey Konovalov wrote:
> Hi Robert,
>
> Thanks for you patch!
>
> Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
>
> On 18.01.2021 22:01, Robert Foss wrote:
>> The previously added modes 3264x2448 & 1632x1224 are actually
>> configuring the sensor for BGGR mode, this is an issue since
>> the mode that is exposed through V4L incorrectly is set as GRBG.
>>
>> This patch fixes the issue by moving the output crop window of
>> internal sensor ISP uses by one row, which means that the Bayer
>> pattern of the output is changed.
>>
>> From:
>> row 1: B G B G B G ...
>> row 2: G R G R G R ...
>> raw 3: B G B G B G ...
- row
>> ...
>>
>> To:
>> raw 2: G R G R G R ...
- row
>> raw 3: B G B G B G ...
- row
Thanks,
Andrey
>> ...
>>
>> Signed-off-by: Robert Foss <robert.foss@linaro.org>
>> Suggested-by: Andrey Konovalov <andrey.konovalov@linaro.org>
>> ---
>>
>> Changes since v1:
>> - Sakari: Added mode information to ov8856_mode struct
>> - Sakari: enum_mbus_code updated
>>
>> Changes since v2:
>> - Andrey: Switched approach to changing the sensor configuration
>> to yield identical Bayer modes for all modes
>>
>> Changes since v3:
>> - Andrey: Improve commit msg to explain Bayer shift better
>>
>> drivers/media/i2c/ov8856.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
>> index 2f4ceaa80593..8a355135c7db 100644
>> --- a/drivers/media/i2c/ov8856.c
>> +++ b/drivers/media/i2c/ov8856.c
>> @@ -428,7 +428,7 @@ static const struct ov8856_reg mode_3264x2448_regs[] = {
>> {0x3810, 0x00},
>> {0x3811, 0x04},
>> {0x3812, 0x00},
>> - {0x3813, 0x02},
>> + {0x3813, 0x01},
>> {0x3814, 0x01},
>> {0x3815, 0x01},
>> {0x3816, 0x00},
>> @@ -821,7 +821,7 @@ static const struct ov8856_reg mode_1632x1224_regs[] = {
>> {0x3810, 0x00},
>> {0x3811, 0x02},
>> {0x3812, 0x00},
>> - {0x3813, 0x02},
>> + {0x3813, 0x01},
>> {0x3814, 0x03},
>> {0x3815, 0x01},
>> {0x3816, 0x00},
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4] media: ov8856: Configure sensor for GRBG Bayer for all modes
2021-01-18 19:28 ` Andrey Konovalov
@ 2021-01-18 19:54 ` Robert Foss
2021-01-18 20:03 ` Andrey Konovalov
0 siblings, 1 reply; 5+ messages in thread
From: Robert Foss @ 2021-01-18 19:54 UTC (permalink / raw)
To: Andrey Konovalov
Cc: Dongchun Zhu, Mauro Carvalho Chehab, linux-media, linux-kernel,
Sakari Ailus, Bingbu Cao, Tomasz Figa
I was going for row, but got a bit wild with the Ctrl-C + Ctrl-V, is
that alright with you?
On Mon, 18 Jan 2021 at 20:28, Andrey Konovalov
<andrey.konovalov@linaro.org> wrote:
>
> Oops.. I've missed a few mistypes
>
> On 18.01.2021 22:18, Andrey Konovalov wrote:
> > Hi Robert,
> >
> > Thanks for you patch!
> >
> > Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
> >
> > On 18.01.2021 22:01, Robert Foss wrote:
> >> The previously added modes 3264x2448 & 1632x1224 are actually
> >> configuring the sensor for BGGR mode, this is an issue since
> >> the mode that is exposed through V4L incorrectly is set as GRBG.
> >>
> >> This patch fixes the issue by moving the output crop window of
> >> internal sensor ISP uses by one row, which means that the Bayer
> >> pattern of the output is changed.
> >>
> >> From:
> >> row 1: B G B G B G ...
> >> row 2: G R G R G R ...
> >> raw 3: B G B G B G ...
> - row
> >> ...
> >>
> >> To:
> >> raw 2: G R G R G R ...
> - row
> >> raw 3: B G B G B G ...
> - row
>
> Thanks,
> Andrey
>
> >> ...
> >>
> >> Signed-off-by: Robert Foss <robert.foss@linaro.org>
> >> Suggested-by: Andrey Konovalov <andrey.konovalov@linaro.org>
> >> ---
> >>
> >> Changes since v1:
> >> - Sakari: Added mode information to ov8856_mode struct
> >> - Sakari: enum_mbus_code updated
> >>
> >> Changes since v2:
> >> - Andrey: Switched approach to changing the sensor configuration
> >> to yield identical Bayer modes for all modes
> >>
> >> Changes since v3:
> >> - Andrey: Improve commit msg to explain Bayer shift better
> >>
> >> drivers/media/i2c/ov8856.c | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
> >> index 2f4ceaa80593..8a355135c7db 100644
> >> --- a/drivers/media/i2c/ov8856.c
> >> +++ b/drivers/media/i2c/ov8856.c
> >> @@ -428,7 +428,7 @@ static const struct ov8856_reg mode_3264x2448_regs[] = {
> >> {0x3810, 0x00},
> >> {0x3811, 0x04},
> >> {0x3812, 0x00},
> >> - {0x3813, 0x02},
> >> + {0x3813, 0x01},
> >> {0x3814, 0x01},
> >> {0x3815, 0x01},
> >> {0x3816, 0x00},
> >> @@ -821,7 +821,7 @@ static const struct ov8856_reg mode_1632x1224_regs[] = {
> >> {0x3810, 0x00},
> >> {0x3811, 0x02},
> >> {0x3812, 0x00},
> >> - {0x3813, 0x02},
> >> + {0x3813, 0x01},
> >> {0x3814, 0x03},
> >> {0x3815, 0x01},
> >> {0x3816, 0x00},
> >>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4] media: ov8856: Configure sensor for GRBG Bayer for all modes
2021-01-18 19:54 ` Robert Foss
@ 2021-01-18 20:03 ` Andrey Konovalov
0 siblings, 0 replies; 5+ messages in thread
From: Andrey Konovalov @ 2021-01-18 20:03 UTC (permalink / raw)
To: Robert Foss
Cc: Dongchun Zhu, Mauro Carvalho Chehab, linux-media, linux-kernel,
Sakari Ailus, Bingbu Cao, Tomasz Figa
Hi Robert,
On 18.01.2021 22:54, Robert Foss wrote:
> I was going for row, but got a bit wild with the Ctrl-C + Ctrl-V, is
Yeah... "raw" was in my original text
> that alright with you?
Other than these few raw vs row mistypes the patch is fine for me.
My Reviewed-by tag holds.
Thanks,
Andrey
> On Mon, 18 Jan 2021 at 20:28, Andrey Konovalov
> <andrey.konovalov@linaro.org> wrote:
>>
>> Oops.. I've missed a few mistypes
>>
>> On 18.01.2021 22:18, Andrey Konovalov wrote:
>>> Hi Robert,
>>>
>>> Thanks for you patch!
>>>
>>> Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
>>>
>>> On 18.01.2021 22:01, Robert Foss wrote:
>>>> The previously added modes 3264x2448 & 1632x1224 are actually
>>>> configuring the sensor for BGGR mode, this is an issue since
>>>> the mode that is exposed through V4L incorrectly is set as GRBG.
>>>>
>>>> This patch fixes the issue by moving the output crop window of
>>>> internal sensor ISP uses by one row, which means that the Bayer
>>>> pattern of the output is changed.
>>>>
>>>> From:
>>>> row 1: B G B G B G ...
>>>> row 2: G R G R G R ...
>>>> raw 3: B G B G B G ...
>> - row
>>>> ...
>>>>
>>>> To:
>>>> raw 2: G R G R G R ...
>> - row
>>>> raw 3: B G B G B G ...
>> - row
>>
>> Thanks,
>> Andrey
>>
>>>> ...
>>>>
>>>> Signed-off-by: Robert Foss <robert.foss@linaro.org>
>>>> Suggested-by: Andrey Konovalov <andrey.konovalov@linaro.org>
>>>> ---
>>>>
>>>> Changes since v1:
>>>> - Sakari: Added mode information to ov8856_mode struct
>>>> - Sakari: enum_mbus_code updated
>>>>
>>>> Changes since v2:
>>>> - Andrey: Switched approach to changing the sensor configuration
>>>> to yield identical Bayer modes for all modes
>>>>
>>>> Changes since v3:
>>>> - Andrey: Improve commit msg to explain Bayer shift better
>>>>
>>>> drivers/media/i2c/ov8856.c | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
>>>> index 2f4ceaa80593..8a355135c7db 100644
>>>> --- a/drivers/media/i2c/ov8856.c
>>>> +++ b/drivers/media/i2c/ov8856.c
>>>> @@ -428,7 +428,7 @@ static const struct ov8856_reg mode_3264x2448_regs[] = {
>>>> {0x3810, 0x00},
>>>> {0x3811, 0x04},
>>>> {0x3812, 0x00},
>>>> - {0x3813, 0x02},
>>>> + {0x3813, 0x01},
>>>> {0x3814, 0x01},
>>>> {0x3815, 0x01},
>>>> {0x3816, 0x00},
>>>> @@ -821,7 +821,7 @@ static const struct ov8856_reg mode_1632x1224_regs[] = {
>>>> {0x3810, 0x00},
>>>> {0x3811, 0x02},
>>>> {0x3812, 0x00},
>>>> - {0x3813, 0x02},
>>>> + {0x3813, 0x01},
>>>> {0x3814, 0x03},
>>>> {0x3815, 0x01},
>>>> {0x3816, 0x00},
>>>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-18 20:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 19:01 [PATCH v4] media: ov8856: Configure sensor for GRBG Bayer for all modes Robert Foss
2021-01-18 19:18 ` Andrey Konovalov
2021-01-18 19:28 ` Andrey Konovalov
2021-01-18 19:54 ` Robert Foss
2021-01-18 20:03 ` Andrey Konovalov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®