public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dongchun Zhu <dongchun.zhu@mediatek.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Robert Foss <robert.foss@linaro.org>, <mchehab@kernel.org>,
	<linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Ben Kao <ben.kao@intel.com>, <tfiga@google.com>,
	<shengnan.wang@mediatek.com>, <dongchun.zhu@mediatek.com>
Subject: Re: [PATCH] media: ov8856: Remove 3280x2464 mode
Date: Tue, 24 Nov 2020 18:10:16 +0800	[thread overview]
Message-ID: <1606212616.4733.157.camel@mhfsdcap03> (raw)
In-Reply-To: <20201124084343.GD3940@paasikivi.fi.intel.com>

Hi Sakari,

On Tue, 2020-11-24 at 10:43 +0200, Sakari Ailus wrote:
> Hi Dongchun,
> 
> On Tue, Nov 24, 2020 at 03:40:51PM +0800, Dongchun Zhu wrote:
> > >  static const struct ov8856_mode supported_modes[] = {
> > > -	{
> > > -		.width = 3280,
> > > -		.height = 2464,
> > > -		.hts = 1928,
> > > -		.vts_def = 2488,
> > > -		.vts_min = 2488,
> > > -		.reg_list = {
> > > -			.num_of_regs = ARRAY_SIZE(mode_3280x2464_regs),
> > > -			.regs = mode_3280x2464_regs,
> > > -		},
> > > -		.link_freq_index = OV8856_LINK_FREQ_720MBPS,
> > > -	},
> > 
> > If 3280x2464 resolution is removed, bayer order needs to be updated in
> > the meantime. From OV8856's datasheet, bayer order turns to be BGGR if
> > sensor adopts full mode (3264x2448) or binning mode (1632x1224).
> 
> How is this related to the patch?
> 

Yes, it seems to be another issue.
But it is very often that bayer order is strongly related to the image
window size and mirror/flip setting.

> The next largest size is 16 by 16 less, so the Bayer order is the same. If
> it's wrong currently (as it would appear to), it should be a separate
> patch.
> 

OV8856 sensor array region consists of 3 main window settings.
The inner window is controlled by [H_win_off, V_win_off].
From the old unusual 3280x2464 and 1640x1232 setting,
H_win_off(R3810-R3811) is 0, V_win_off(R3812-R3813) is 1.

Considering that the register TEST_PATTERN_CTRL(R4320) controlling pixel
order is not set (default: 0x80, meaning BG/GR) and mirror/flip are both
OFF, the absolute coordinate of crop_start is expressed as:
[H_crop_start+H_win_off, V_crop_start+V_win_off] = [0, 7]

Thus the first pixel shall start with G channel(according to datasheet).
This is different with current resolutions (3264x2448 and 1632x1224).


  reply	other threads:[~2020-11-24 10:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-16 15:50 [PATCH] media: ov8856: Remove 3280x2464 mode Robert Foss
2020-11-24  7:40 ` Dongchun Zhu
2020-11-24  8:43   ` Sakari Ailus
2020-11-24 10:10     ` Dongchun Zhu [this message]
2020-11-24 10:45       ` Robert Foss
     [not found]     ` <CAG3jFytX_=RcKyLkNOSCEmNHnruxSP_=PNFuGRdrevJ17x4ndQ@mail.gmail.com>
     [not found]       ` <961bb1b9384a4261949e9afd1e37d43e@MTKMBS31N1.mediatek.inc>
2020-11-24 10:18         ` Robert Foss
2020-11-24  9:40 ` Bingbu Cao
2020-11-24 10:20   ` Robert Foss
2020-11-25  4:11     ` Bingbu Cao
2020-11-25  7:32       ` Tomasz Figa
2020-11-26 10:00         ` Robert Foss
2020-11-27 10:26           ` Tomasz Figa
2020-11-27 13:38             ` Robert Foss
2020-12-09  5:07               ` Tomasz Figa
2020-11-24 11:27 ` Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1606212616.4733.157.camel@mhfsdcap03 \
    --to=dongchun.zhu@mediatek.com \
    --cc=ben.kao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robert.foss@linaro.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=shengnan.wang@mediatek.com \
    --cc=tfiga@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox