From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Claus Stovgaard <claus.stovgaard@gmail.com>
Cc: Bingbu Cao <bingbu.cao@linux.intel.com>,
bingbu.cao@intel.com, linux-media@vger.kernel.org,
sakari.ailus@linux.intel.com, ilpo.jarvinen@linux.intel.com,
tfiga@chromium.org, senozhatsky@chromium.org,
andriy.shevchenko@linux.intel.com, hdegoede@redhat.com,
tomi.valkeinen@ideasonboard.com, tian.shu.qiu@intel.com,
hongju.wang@intel.com
Subject: Re: [PATCH 00/15] Intel IPU6 and IPU6 input system drivers
Date: Mon, 21 Aug 2023 15:19:08 +0300 [thread overview]
Message-ID: <20230821121908.GD10135@pendragon.ideasonboard.com> (raw)
In-Reply-To: <d451bbec67358373ca8495544cc0802233108a03.camel@gmail.com>
Hi Claus,
On Mon, Aug 21, 2023 at 12:07:59PM +0200, Claus Stovgaard wrote:
> On Mon, 2023-08-21 at 08:55 +0200, Claus Stovgaard wrote:
> > On Mon, 2023-08-21 at 14:22 +0800, Bingbu Cao wrote:
> > >
> > > Claus,
> > >
> > >
> > > On 8/21/23 11:14 AM, Bingbu Cao wrote:
> > >
> > >
> > > I see that the ivsc driver has not been in master branch. Before
> > > that,
> > > could you try several hack to check whether camera can work on
> > > master?
> > >
> > > https://github.com/bingbucao/linux/commits/ipu_dev
> > >
> > > 7ebff51284d9 media: ov01a10: hack ivsc to make camera can work
> > > 01cc9f3d1b61 i2c: ljca: Call acpi_dev_clear_dependencies()
> > > 92e5d122e105 vsc: Defer firmware loading to avoid long probing time
> > > 5f5d5f0df06b driver: ivsc: add intel ivsc driver
> > > 0f4819dec533 Revert "gpio: Add support for Intel LJCA USB GPIO
> > > driver"
> >
> > Thanks for your quick reply.
> >
> > I was missing understanding of ivsc when I wrote the mail yesterday.
> > Got some basic understanding yesterday after I wrote, and big thanks
> > for confirming it, and also thanks for your ipu_dev branch. Has just
> > cloned it, and is building as I write.
> >
> > Just fyi, I was trying to hack something together yesterday, and got
> > further, but not yet working.
> >
> > My hack was to combine the out-of-tree ivsc drivers and firmware from
> >
> > * https://github.com/intel/ivsc-firmware.git
> > * https://github.com/intel/ivsc-driver.git
> >
> > Though noticed that I need some changes to the sensor driver so was
> > also building all the drivers from ipu6-drivers (with minor changes
> > to
> > get_pages) as out-of-tree modules.
> >
> > * https://github.com/intel/ipu6-drivers.git
> >
> > Here I used everything beside media/pci/*.ko files. I could see the
> > sensor and got further, but was missing the last.
> >
> > Looking forward to try your branch. Looks much cleaner, and would be
> > nice to get working :)
>
> I got it to work on Dell XPS 9320.
I'm glad to hear this ! Even if PSYS support will be needed to make the
IPU6 truly usable, it is a very nice step in the right direction.
Would you be interested in adding initial support for the IPU6 in
libcamera ? :-) Given that only the ISYS is currently available, and
given the simplicity of the hardware, it may be as easy as a single line
addition.
> With some minor changes compared to your guide in Documentation/admin-
> guide/media/ipu6-isys.rst
>
> [root@xps-1 ]# uname -a
> Linux xps-1 6.5.0-rc7-g7ebff51284d9 #1 SMP PREEMPT_DYNAMIC Mon Aug 21
> 09:02:20 CEST 2023 x86_64 GNU/Linux
>
> [root@xps-1 ]# media-ctl -d /dev/media0 -p | tail -n10
>
> - entity 2149: ov01a10 16-0036 (1 pad, 1 link)
> type V4L2 subdev subtype Sensor flags 0
> device node name /dev/v4l-subdev4
> pad0: Source
> [fmt:SBGGR10_1X10/1280x800 field:none colorspace:raw
> crop.bounds:(0,0)/1296x816
> crop:(8,8)/1280x800]
> -> "Intel IPU6 CSI2 2":0 []
>
> So i2c is 16-0036 - and we use it for setup like your guide.
>
> export MDEV=/dev/media0
>
> media-ctl -d $MDEV -l "\"ov01a10 17-0036\":0 -> \"Intel IPU6 CSI2
> 2\":0[1]"
>
> media-ctl -d $MDEV -V "\"ov01a10 17-0036\":0 [fmt:SBGGR10/1280x800]"
> media-ctl -d $MDEV -V "\"Intel IPU6 CSI2 2\":0 [fmt:SBGGR10/1280x800]"
> media-ctl -d $MDEV -V "\"Intel IPU6 CSI2 2\":1 [fmt:SBGGR10/1280x800]"
>
> media-ctl -d $MDEV -l "\"ov01a10 17-0036\":0 -> \"Intel IPU6 CSI2
> 2\":0[1]"
> media-ctl -d $MDEV -l "\"Intel IPU6 CSI2 2\":1 ->\"Intel IPU6 ISYS
> Capture 0\":0[5]"
>
> Though yavta does not work in the way as described in the guide.
>
> [root@xps-1 ]# yavta --data-prefix -u -c10 -n5 -I -s 1280x800 --
> file=/tmp/frame-#.bin -f SBGGR10 /dev/video0
> Device /dev/video0 opened.
> Device `ipu6' on `PCI:0000:00:05.0' (driver 'isys') supports video,
> capture, with mplanes.
> Video format set: SBGGR10 (30314742) 1280x800 field none, 1 planes:
> * Stride 2560, buffer size 2050560
> Video format: SBGGR10 (30314742) 1280x800 field none, 1 planes:
> * Stride 2560, buffer size 2050560
> Unable to request buffers: Invalid argument (22).
>
>
> So I changed to use v4l2-ctl
>
> [root@xps-1 ]# v4l2-ctl -d /dev/video0 --set-fmt-video
> width=1280,height=800,pixelformat=BG10 --stream-mmap --stream-count=1 -
> -stream-to=frame.bin
>
> With this I created raw data in BG10 format, and later used a small
> python script with numpy and opencv to look at the data.
>
> #!/usr/bin/env python3
> # Demosaicing Bayer Raw image
>
> import cv2
> import numpy as np
>
> width = 1280
> height = 800
>
> with open("frame.bin", "rb") as rawimg:
> # Read the bayer data
> data = np.fromfile(rawimg, np.uint16, width * height)
> bayer = np.reshape(data, (height, width))
>
> # Just a offset gain to be able to see something
> for x in range(0, len(bayer)):
> for y in range(0, len(bayer[0])):
> bayer[x, y] = (bayer[x,y] << 8)
>
> rgb = cv2.cvtColor(bayer, cv2.COLOR_BayerBGGR2RGB)
>
> cv2.imshow('rgb', rgb)
> cv2.waitKey()
> cv2.destroyAllWindows()
>
>
> Thanks for the help, and now we know what is needed to make it work on
> top of yesterdays rc7
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-08-21 12:19 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 7:15 [PATCH 00/15] Intel IPU6 and IPU6 input system drivers bingbu.cao
2023-07-27 7:15 ` [PATCH 01/15] media: intel/ipu6: add Intel IPU6 PCI device driver bingbu.cao
2023-07-27 10:47 ` Andy Shevchenko
2023-10-03 10:12 ` Andreas Helbech Kleist
2023-10-16 9:39 ` Andreas Helbech Kleist
2023-10-19 8:23 ` Bingbu Cao
2023-10-20 10:48 ` Andreas Helbech Kleist
2023-10-20 10:48 ` Andreas Helbech Kleist
2023-07-27 7:15 ` [PATCH 02/15] media: intel/ipu6: add IPU auxiliary devices bingbu.cao
2023-10-03 10:13 ` Andreas Helbech Kleist
2023-10-19 8:24 ` Bingbu Cao
2023-07-27 7:15 ` [PATCH 03/15] media: intel/ipu6: add IPU6 buttress interface driver bingbu.cao
2023-07-27 7:15 ` [PATCH 04/15] media: intel/ipu6: CPD parsing for get firmware components bingbu.cao
2023-07-27 7:15 ` [PATCH 05/15] media: intel/ipu6: add IPU6 DMA mapping API and MMU table bingbu.cao
2023-07-27 7:15 ` [PATCH 06/15] media: intel/ipu6: add syscom interfaces between firmware and driver bingbu.cao
2023-07-27 7:15 ` [PATCH 07/15] media: intel/ipu6: input system ABI " bingbu.cao
2023-07-27 7:15 ` [PATCH 08/15] media: intel/ipu6: add IPU6 CSI2 receiver v4l2 sub-device bingbu.cao
2023-07-27 7:15 ` [PATCH 09/15] media: intel/ipu6: add the CSI2 DPHY implementation bingbu.cao
2023-07-27 7:15 ` [PATCH 10/15] media: intel/ipu6: add input system driver bingbu.cao
2023-10-03 10:13 ` Andreas Helbech Kleist
2023-10-19 8:28 ` Bingbu Cao
2023-10-19 12:22 ` Andy Shevchenko
2023-10-20 2:21 ` Cao, Bingbu
2023-10-20 10:20 ` Andy Shevchenko
2023-10-20 10:47 ` Andreas Helbech Kleist
2023-10-20 14:39 ` Hans de Goede
2023-10-23 6:23 ` Andreas Helbech Kleist
2023-10-23 7:44 ` Hans de Goede
2023-10-23 8:23 ` Bingbu Cao
2023-10-23 11:29 ` Andy Shevchenko
2023-12-20 12:53 ` RFC: Intel IPU4 driver proof of concept Andreas Helbech Kleist
2026-02-22 19:57 ` Ruslan Bay
2026-03-04 11:03 ` Ruslan Bay
2026-03-04 12:16 ` johannes.goede
2023-10-23 11:29 ` [PATCH 10/15] media: intel/ipu6: add input system driver Andy Shevchenko
2023-07-27 7:15 ` [PATCH 11/15] media: intel/ipu6: input system video capture nodes bingbu.cao
2023-10-23 11:36 ` Andreas Helbech Kleist
2023-12-07 9:28 ` Andreas Helbech Kleist
2023-12-20 3:42 ` Bingbu Cao
2023-12-20 6:51 ` Laurent Pinchart
2023-12-20 9:25 ` Bingbu Cao
2023-07-27 7:15 ` [PATCH 12/15] media: add Kconfig and Makefile for IPU6 bingbu.cao
2023-10-03 10:13 ` Andreas Helbech Kleist
2023-10-19 8:28 ` Bingbu Cao
2023-07-27 7:15 ` [PATCH 13/15] MAINTAINERS: add maintainers for Intel IPU6 input system driver bingbu.cao
2023-07-27 10:19 ` Andy Shevchenko
2023-07-27 7:15 ` [PATCH 14/15] Documentation: add Intel IPU6 ISYS driver admin-guide doc bingbu.cao
2023-07-27 7:15 ` [PATCH 15/15] Documentation: add documentation of Intel IPU6 driver and hardware overview bingbu.cao
2023-08-20 15:09 ` [PATCH 00/15] Intel IPU6 and IPU6 input system drivers Claus Stovgaard
2023-08-21 3:14 ` Bingbu Cao
2023-08-21 6:22 ` Bingbu Cao
2023-08-21 6:55 ` Claus Stovgaard
2023-08-21 10:07 ` Claus Stovgaard
2023-08-21 12:19 ` Laurent Pinchart [this message]
2023-08-22 12:52 ` claus.stovgaard
2023-08-22 14:22 ` Laurent Pinchart
2023-08-24 20:35 ` Claus Stovgaard
2023-08-22 3:05 ` Bingbu Cao
2023-08-24 20:19 ` Claus Stovgaard
2023-08-31 21:24 ` Hans de Goede
2023-09-02 14:54 ` Hans de Goede
2023-09-03 14:32 ` Hans de Goede
2023-09-04 3:13 ` Cao, Bingbu
2023-09-04 7:35 ` Hans de Goede
2023-10-02 17:19 ` Hans de Goede
2023-10-02 17:38 ` Laurent Pinchart
2023-10-02 17:41 ` Hans de Goede
2023-10-09 6:23 ` Bingbu Cao
2023-10-09 12:25 ` Bingbu Cao
2023-10-09 12:53 ` Hans de Goede
2023-10-10 2:54 ` Bingbu Cao
2023-10-10 8:10 ` Hans de Goede
2023-10-10 8:35 ` Bingbu Cao
2023-09-04 6:12 ` Bingbu Cao
2023-09-04 9:16 ` Andy Shevchenko
2023-09-19 10:23 ` Hans de Goede
2023-09-20 4:46 ` Bingbu Cao
2023-09-20 8:52 ` Hans de Goede
2023-09-20 12:32 ` Claus Stovgaard
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=20230821121908.GD10135@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=bingbu.cao@linux.intel.com \
--cc=claus.stovgaard@gmail.com \
--cc=hdegoede@redhat.com \
--cc=hongju.wang@intel.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=senozhatsky@chromium.org \
--cc=tfiga@chromium.org \
--cc=tian.shu.qiu@intel.com \
--cc=tomi.valkeinen@ideasonboard.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