All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add support for the Sony Exmor-RS IMX300 camera sensor
@ 2020-10-18 12:31 kholk11
  2020-10-18 12:31 ` [PATCH 1/2] media: i2c: Add driver " kholk11
  2020-10-18 12:31 ` [PATCH 2/2] media: dt-bindings: media: i2c: Add IMX300 CMOS sensor binding kholk11
  0 siblings, 2 replies; 9+ messages in thread
From: kholk11 @ 2020-10-18 12:31 UTC (permalink / raw)
  To: mchehab
  Cc: robh+dt, marijns95, konradybcio, martin.botka1, devicetree,
	linux-media, phone-devel, linux-kernel,
	AngeloGioacchino Del Regno

From: AngeloGioacchino Del Regno <kholk11@gmail.com>

This patch series adds support for the IMX300 camera sensor, (one of the)
first Exmor-RS Stacked CMOS sensor(s), with support for both of the
supported aspect ratios (4:3 and 16:9).
This driver came out from reverse engineering of so called "userspace
drivers" from Sony Xperia smartphones.

I tried to document all of my findings and giving a sense to the registers
as much as possible, but that was only partially possible and resembles
some names from the IMX219 public datasheet, even though the addresses are
basically completely different.

This camera sensor driver was tested with all the resolutions declared in
it on two phones: Sony Xperia XA2 and XA2 Ultra, on a SDM630 SoC (camss
patches for this SoC will come in a later series) and is working great.

AngeloGioacchino Del Regno (2):
  media: i2c: Add driver for the Sony Exmor-RS IMX300 camera sensor
  media: dt-bindings: media: i2c: Add IMX300 CMOS sensor binding

 .../devicetree/bindings/media/i2c/imx300.yaml |  115 +
 MAINTAINERS                                   |    8 +
 drivers/media/i2c/Kconfig                     |   13 +
 drivers/media/i2c/Makefile                    |    1 +
 drivers/media/i2c/imx300.c                    | 3087 +++++++++++++++++
 5 files changed, 3224 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/imx300.yaml
 create mode 100644 drivers/media/i2c/imx300.c

-- 
2.28.0


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] media: i2c: Add driver for the Sony Exmor-RS IMX300 camera sensor
@ 2020-10-23 18:40 kernel test robot
  0 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-10-23 18:40 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 5032 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20201018123106.14917-2-kholk11@gmail.com>
References: <20201018123106.14917-2-kholk11@gmail.com>
TO: kholk11(a)gmail.com
TO: mchehab(a)kernel.org
CC: robh+dt(a)kernel.org
CC: marijns95(a)gmail.com
CC: konradybcio(a)gmail.com
CC: martin.botka1(a)gmail.com
CC: devicetree(a)vger.kernel.org
CC: linux-media(a)vger.kernel.org
CC: phone-devel(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
CC: AngeloGioacchino Del Regno <kholk11@gmail.com>

Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on robh/for-next linus/master v5.9 next-20201023]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/kholk11-gmail-com/Add-support-for-the-Sony-Exmor-RS-IMX300-camera-sensor/20201018-203244
base:   git://linuxtv.org/media_tree.git master
:::::: branch date: 5 days ago
:::::: commit date: 5 days ago
config: x86_64-randconfig-m001-20201022 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/media/i2c/imx300.c:2413 imx300_set_framefmt() error: uninitialized symbol 'ret'.

vim +/ret +2413 drivers/media/i2c/imx300.c

c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2376  
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2377  static int imx300_set_framefmt(struct imx300 *imx300)
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2378  {
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2379  	int ret;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2380  
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2381  	switch (imx300->fmt.code) {
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2382  	case MEDIA_BUS_FMT_SRGGB8_1X8:
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2383  		fallthrough;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2384  	case MEDIA_BUS_FMT_SGRBG8_1X8:
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2385  		fallthrough;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2386  	case MEDIA_BUS_FMT_SGBRG8_1X8:
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2387  		fallthrough;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2388  	case MEDIA_BUS_FMT_SBGGR8_1X8:
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2389  		ret = imx300_write_regs(imx300, raw8_framefmt_regs,
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2390  					ARRAY_SIZE(raw8_framefmt_regs));
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2391  		if (ret)
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2392  			return ret;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2393  		imx300->cur_bps = 8;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2394  		break;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2395  	case MEDIA_BUS_FMT_SRGGB10_1X10:
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2396  		fallthrough;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2397  	case MEDIA_BUS_FMT_SGRBG10_1X10:
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2398  		fallthrough;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2399  	case MEDIA_BUS_FMT_SGBRG10_1X10:
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2400  		fallthrough;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2401  	case MEDIA_BUS_FMT_SBGGR10_1X10:
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2402  		ret = imx300_write_regs(imx300, raw10_framefmt_regs,
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2403  					ARRAY_SIZE(raw10_framefmt_regs));
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2404  		if (ret)
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2405  			return ret;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2406  		imx300->cur_bps = 10;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2407  		break;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2408  	}
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2409  
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2410  	/* Update the pixel rate to eventually save some power */
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2411  	__v4l2_ctrl_s_ctrl_int64(imx300->pixel_rate, get_pixel_rate(imx300));
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2412  
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18 @2413  	return ret;
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2414  }
c82629fb21ade4 AngeloGioacchino Del Regno 2020-10-18  2415  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 36018 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-10-26 13:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-18 12:31 [PATCH 0/2] Add support for the Sony Exmor-RS IMX300 camera sensor kholk11
2020-10-18 12:31 ` [PATCH 1/2] media: i2c: Add driver " kholk11
2020-10-26  8:57   ` Dan Carpenter
2020-10-26  8:57     ` Dan Carpenter
2020-10-26  8:57     ` Dan Carpenter
2020-10-18 12:31 ` [PATCH 2/2] media: dt-bindings: media: i2c: Add IMX300 CMOS sensor binding kholk11
2020-10-19 16:26   ` Krzysztof Kozlowski
2020-10-26 13:33   ` Rob Herring
  -- strict thread matches above, loose matches on Subject: below --
2020-10-23 18:40 [PATCH 1/2] media: i2c: Add driver for the Sony Exmor-RS IMX300 camera sensor kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.