OMAP3ISP Parallel Camera Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Warning, I have a lot of screen dumps.  I apologize in advance, but I
am hoping if this can get resolved, it might help others too.

I have a Leopard Imaging LI-5M04 camera attached in 8-bit mode to a
DM3730 (OMAP3630)

I have an LCD that displays at 480x272 and I'd like to stream the
video from the camera to the LCD without using any of the TI
proprietary DSP stuff.  I'd like to use the 4.9.y stable branch.

(I did apply a patch from Laurent Pinchart that doesn't appear to have
made it into the mainline, and I am hoping he might have a commend on
whether or not that is still necessary.
https://lkml.org/lkml/2016/9/29/93

My board has mainline device tree (logicpd-torpedo-37xx-devkit).
Using (https://github.com/Alaganraj/omap3isp/blob/master/0001-ARM-omap3-beagle-Add-.dtsi-for-the-LI-5M03-camera-se.patch)
as an example, I have my device tree setup as follows:

&i2c2 {
  mt9p031@48 {
  compatible = "aptina,mt9p031";
  reg = <0x48>;
  clocks = <&isp 0>;
  vaa-supply = <&vaux4>;
  vdd-supply = <&vaux4>;
  vdd_io-supply = <&vaux4>;
  port {
    mt9p031_out: endpoint {
      input-clock-frequency = <24000000>;
      pixel-clock-frequency = <72000000>;
      remote-endpoint = <&ccdc_ep>;
      };
    };
  };
};


My ISP is setup as follows:

&isp {
  pinctrl-names = "default";
  pinctrl-0 = <&isp_pins>;
  ports {
    port@0 {
      reg = <0>;
      ccdc_ep: endpoint {
      remote-endpoint = <&mt9p031_out>;
      bus-width = <8>;
      hsync-active = <1>;
      vsync-active = <1>;
      pclk-sample = <0>;
      };
    };
  };
};


My undestanding of the OMAP3 ISP is that you need to setup the sources
and sinks and resizer stuff.  So I beleive I have done this:

media-ctl -v -r -l '"mt9p031 1-0048":0->"OMAP3 ISP CCDC":0[1], "OMAP3
ISP CCDC":2->"OMAP3 ISP preview":0[1], "OMAP3 ISP preview":1->"OMAP3
ISP resizer":0[1], "OMAP3 ISP resizer":1->"OMAP3 ISP resizer
output":0[1]'

I have the Resizer set to the exact resolution of my LCD and from what
I can tell below, it appears to be setup that way in UYVY8 format:

media-ctl -v -V '"mt9p031 1-0048":0 [SGRBG8 1298x970
(664,541)/1298x970], "OMAP3 ISP CCDC":2 [SGRBG10 1298x970], "OMAP3 ISP
preview":1 [UYVY 1298x970], "OMAP3 ISP resizer":1 [UYVY 480x272]'



Opening media device /dev/media0
Enumerating entities
looking up device: 81:7
looking up device: 81:0
looking up device: 81:8
looking up device: 81:1
looking up device: 81:9
looking up device: 81:2
looking up device: 81:10
looking up device: 81:3
looking up device: 81:4
looking up device: 81:11
looking up device: 81:5
looking up device: 81:6
looking up device: 81:12
looking up device: 81:13
looking up device: 81:14
looking up device: 81:15
Found 16 entities
Enumerating pads and links
Setting up selection target 0 rectangle (664,541)/1298x970 on pad
mt9p031 1-0048/0
Selection rectangle set: (664,542)/1298x970
Setting up format SGRBG8_1X8 1298x970 on pad mt9p031 1-0048/0
Format set: SGRBG12_1X12 1298x970
Setting up format SGRBG12_1X12 1298x970 on pad OMAP3 ISP CCDC/0
Format set: SGRBG12_1X12 1298x970
Setting up format SGRBG10_1X10 1298x970 on pad OMAP3 ISP CCDC/2
Format set: SGRBG10_1X10 1298x969
Setting up format SGRBG10_1X10 1298x969 on pad OMAP3 ISP preview/0
Format set: SGRBG10_1X10 1298x969
Setting up format SGRBG10_1X10 1298x969 on pad OMAP3 ISP AEWB/0
Unable to set format: Inappropriate ioctl for device (-25)
Setting up format SGRBG10_1X10 1298x969 on pad OMAP3 ISP AF/0
Unable to set format: Inappropriate ioctl for device (-25)
Setting up format SGRBG10_1X10 1298x969 on pad OMAP3 ISP histogram/0
Unable to set format: Inappropriate ioctl for device (-25)
Setting up format UYVY8_1X16 1298x970 on pad OMAP3 ISP preview/1
Format set: UYVY8_1X16 1280x961
Setting up format UYVY8_1X16 1280x961 on pad OMAP3 ISP resizer/0
Format set: UYVY8_1X16 1280x961
Setting up format UYVY8_1X16 480x272 on pad OMAP3 ISP resizer/1
Format set: UYVY8_1X16 480x272


Since gstreamer stuff is so old (and I was having issues) i wanted to
use some modern tools, so I chose ffmpeg to stream.  I invoke it with
the following:

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so ffmpeg -f v4l2 -s 480x272 -r
30 -i /dev/video6 -pix_fmt rgb565le -f fbdev /dev/fb0


The ideas is to stream at about 30 fps from the /dev/video6 ->
/dev/fb0 which is a 16-bit parallel LCD panel (configured as RGB 565)

Unfortunately, I don't get any image other than a plain, white screen.
I have register dump of the contents the ISP registers.  I

# LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so ffmpeg -f v4l2 -s 480x272 -r 30 -i /
dev/video6 -pix_fmt rgb565le -f fbdev /dev/fb0

[   49.121154] omap3isp 480bc000.isp: -------------Resizer Register
dump----------
[   49.132629] omap3isp 480bc000.isp: ###RSZ PCR=0x00000004
[   49.142395] omap3isp 480bc000.isp: ###RSZ CNT=0x009e12a7
[   49.152191] omap3isp 480bc000.isp: ###RSZ OUT_SIZE=0x011001e0
[   49.162475] omap3isp 480bc000.isp: ###RSZ IN_START=0x00000000
[   49.172698] omap3isp 480bc000.isp: ###RSZ IN_SIZE=0x03c104ff
[   49.182861] omap3isp 480bc000.isp: ###RSZ SDR_INADD=0x00000000
[   49.193206] omap3isp 480bc000.isp: ###RSZ SDR_INOFF=0x00000000
[   49.203521] omap3isp 480bc000.isp: ###RSZ SDR_OUTADD=0x40000000
[   49.213958] omap3isp 480bc000.isp: ###RSZ SDR_OUTOFF=0x000003c0
[   49.224395] omap3isp 480bc000.isp: ###RSZ YENH=0x00000000
[   49.234252] omap3isp 480bc000.isp:
--------------------------------------------
[   49.246276] omap3isp 480bc000.isp: -------------Preview Register
dump----------
[   49.258056] omap3isp 480bc000.isp: ###PRV PCR=0x18080600
[   49.267852] omap3isp 480bc000.isp: ###PRV HORZ_INFO=0x0006050d
[   49.278167] omap3isp 480bc000.isp: ###PRV VERT_INFO=0x000003c8
[   49.288513] omap3isp 480bc000.isp: ###PRV RSDR_ADDR=0x00000000
[   49.298858] omap3isp 480bc000.isp: ###PRV RADR_OFFSET=0x00000000
[   49.309387] omap3isp 480bc000.isp: ###PRV DSDR_ADDR=0x00000000
[   49.319702] omap3isp 480bc000.isp: ###PRV DRKF_OFFSET=0x00000000
[   49.330230] omap3isp 480bc000.isp: ###PRV WSDR_ADDR=0x00000000
[   49.340576] omap3isp 480bc000.isp: ###PRV WADD_OFFSET=0x00000000
[   49.351104] omap3isp 480bc000.isp: ###PRV AVE=0x00000014
[   49.360870] omap3isp 480bc000.isp: ###PRV HMED=0x00000000
[   49.370758] omap3isp 480bc000.isp: ###PRV NF=0x00000003
[   49.380462] omap3isp 480bc000.isp: ###PRV WB_DGAIN=0x00000100
[   49.390716] omap3isp 480bc000.isp: ###PRV WBGAIN=0x20202020
[   49.400756] omap3isp 480bc000.isp: ###PRV WBSEL=0xee44ee44
[   49.410736] omap3isp 480bc000.isp: ###PRV CFA=0x00002828
[   49.420532] omap3isp 480bc000.isp: ###PRV BLKADJOFF=0x00000000
[   49.430877] omap3isp 480bc000.isp: ###PRV RGB_MAT1=0x0f3001e2
[   49.441131] omap3isp 480bc000.isp: ###PRV RGB_MAT2=0x0f9b0fee
[   49.450836] omap3isp 480bc000.isp: ###PRV RGB_MAT3=0x0fb901ac
[   49.456909] omap3isp 480bc000.isp: ###PRV RGB_MAT4=0x0ec00fe0
[   49.462951] omap3isp 480bc000.isp: ###PRV RGB_MAT5=0x00000260
[   49.469024] omap3isp 480bc000.isp: ###PRV RGB_OFF1=0x00000000
[   49.475097] omap3isp 480bc000.isp: ###PRV RGB_OFF2=0x00000000
[   49.481140] omap3isp 480bc000.isp: ###PRV CSC0=0x01920442
[   49.486877] omap3isp 480bc000.isp: ###PRV CSC1=0x070ed7da
[   49.492553] omap3isp 480bc000.isp: ###PRV CSC2=0x3eee8870
[   49.498260] omap3isp 480bc000.isp: ###PRV CSC_OFFSET=0x00000000
[   49.504486] omap3isp 480bc000.isp: ###PRV CNT_BRT=0x00001000
[   49.510467] omap3isp 480bc000.isp: ###PRV CSUP=0x00000000
[   49.516174] omap3isp 480bc000.isp: ###PRV SETUP_YC=0xff00ff00
[   49.522247] omap3isp 480bc000.isp: ###PRV SET_TBL_ADDR=0x00001700
[   49.528686] omap3isp 480bc000.isp: ###PRV CDC_THR0=0x0000000e
[   49.534729] omap3isp 480bc000.isp: ###PRV CDC_THR1=0x0000000e
[   49.540802] omap3isp 480bc000.isp: ###PRV CDC_THR2=0x0000000e
[   49.546874] omap3isp 480bc000.isp: ###PRV CDC_THR3=0x0000000e
[   49.552917] omap3isp 480bc000.isp:
--------------------------------------------
[   49.560943] omap3isp 480bc000.isp: -------------CCDC Register
dump-------------
[   49.568695] omap3isp 480bc000.isp: ###CCDC PCR=0x00000000
[   49.574401] omap3isp 480bc000.isp: ###CCDC SYN_MODE=0x00010400
[   49.580566] omap3isp 480bc000.isp: ###CCDC HD_VD_WID=0x00000000
[   49.586822] omap3isp 480bc000.isp: ###CCDC PIX_LINES=0x00000000
[   49.593048] omap3isp 480bc000.isp: ###CCDC HORZ_INFO=0x0000050f
[   49.599304] omap3isp 480bc000.isp: ###CCDC VERT_START=0x00000000
[   49.605682] omap3isp 480bc000.isp: ###CCDC VERT_LINES=0x000003c9
[   49.611999] omap3isp 480bc000.isp: ###CCDC CULLING=0xffff00ff
[   49.618072] omap3isp 480bc000.isp: ###CCDC HSIZE_OFF=0x00000000
[   49.624298] omap3isp 480bc000.isp: ###CCDC SDOFST=0x00000000
[   49.630279] omap3isp 480bc000.isp: ###CCDC SDR_ADDR=0x00000000
[   49.636444] omap3isp 480bc000.isp: ###CCDC CLAMP=0x00000010
[   49.642303] omap3isp 480bc000.isp: ###CCDC DCSUB=0x00000000
[   49.648193] omap3isp 480bc000.isp: ###CCDC COLPTN=0xbb11bb11
[   49.654174] omap3isp 480bc000.isp: ###CCDC BLKCMP=0x00000000
[   49.660156] omap3isp 480bc000.isp: ###CCDC FPC=0x00000000
[   49.665863] omap3isp 480bc000.isp: ###CCDC FPC_ADDR=0x00000000
[   49.671997] omap3isp 480bc000.isp: ###CCDC VDINT=0x03c80286
[   49.677886] omap3isp 480bc000.isp: ###CCDC ALAW=0x00000004
[   49.683654] omap3isp 480bc000.isp: ###CCDC REC656IF=0x00000000
[   49.689819] omap3isp 480bc000.isp: ###CCDC CFG=0x00008000
[   49.695556] omap3isp 480bc000.isp: ###CCDC FMTCFG=0x0000c000
[   49.701507] omap3isp 480bc000.isp: ###CCDC FMT_HORZ=0x00000512
[   49.707672] omap3isp 480bc000.isp: ###CCDC FMT_VERT=0x000003ca
[   49.713806] omap3isp 480bc000.isp: ###CCDC PRGEVEN0=0x00000000
[   49.719970] omap3isp 480bc000.isp: ###CCDC PRGEVEN1=0x00000000
[   49.726135] omap3isp 480bc000.isp: ###CCDC PRGODD0=0x00000000
[   49.732177] omap3isp 480bc000.isp: ###CCDC PRGODD1=0x00000000
[   49.738250] omap3isp 480bc000.isp: ###CCDC VP_OUT=0x07925120
[   49.744232] omap3isp 480bc000.isp: ###CCDC LSC_CONFIG=0x00006600
[   49.750579] omap3isp 480bc000.isp: ###CCDC LSC_INITIAL=0x00000000
[   49.757019] omap3isp 480bc000.isp: ###CCDC LSC_TABLE_BASE=0x00000000
[   49.763702] omap3isp 480bc000.isp: ###CCDC LSC_TABLE_OFFSET=0x00000000
[   49.770599] omap3isp 480bc000.isp:
--------------------------------------------


libv4l2: error dequeuing buf: Resource temporarily unavailable
libv4l2: error dequeuing buf: Resource temporarily unavailable
... (repeated a lot)
libv4l2: error dequeuing buf: Resource temporarily unavailable

Input #0, video4linux2,v4l2, from '/dev/video6':
  Duration: N/A, start: 49.843309, bitrate: N/A
    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422,
480x272, 34 tbr, 1000k tbn, 1000k tbc
Output #0, fbdev, to '/dev/fb0':
  Metadata:
    encoder         : Lavf57.56.101
    Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le,
480x272, q=2-31, 200 kb/s, 30 fps, 30 tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.64.101 rawvideo
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
[   55.677276] random: crng init doneime=00:00:03.00 bitrate=N/A
speed=0.648x
frame=   96 fps= 19 q=-0.0 Lsize=N/A time=00:00:03.20 bitrate=N/A
speed=0.641x
video:24480kB audio:0kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown

I am not exactly sure what to examine here, I know there is a crap-ton
of data.  I have been fighting this for about 2 solid days, and I was
hoping someone might have some insight.

thanks

adam
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux