Re: HDMI input on i.MX6 using IPU

2015-02-23 Thread Carlos SanmartĂ­n Bustos
Hi JM,

I am trying the Philipp's code and I came to the same conclusion, it
is not possible to setup the last link. Did you do some progress on
this? Any idea?

Maybe, between us we can fix this problem.

Thanks for advice,

2015-01-14 18:11 GMT+01:00 Jean-Michel Hautbois
jean-michel.hautb...@vodalys.com:
 Hi,

 2015-01-08 17:53 GMT+01:00 Jean-Michel Hautbois
 jean-michel.hautb...@vodalys.com:
 Hi,

 I have modified both Steve's and Philipp's code, in order to get
 something able to get frames from an ADV7611.
 Right now, I am back to Philipp's base of code, rebased on top of
 media-tree, and everything works fine, except the very last link
 between SFMC and IDMAC (using media controller).
 Here is a status.

 The code is here :
 https://github.com/Vodalys/linux-2.6-imx/tree/media-tree-zabel

 Right now, I can go further. I added support for BT.1120 in order to
 get the correct video format, and I am able to start a streaming, but
 I can't get an interrupt on IDMAC.

 I am starting with setting DV timings on adv7611 input, and then, I am
 using 4l2-compliance in order to test streaming. It has shown several
 things, most of them are corrected, sometimes in a hacky way.

 Right now, I can do the following :
 $ media-ctl --set-dv 'adv7611 1-004c:1 [fmt:YUYV/1280x720]' 
 media-ctl --set-v4l2 'adv7611 1-004c:1 [fmt:YUYV/1280x720]'
 $ echo -n 'module imx_ipuv3_csi +p'  /sys/kernel/debug/dynamic_debug/control
 $ v4l2-compliance -v -s
 Driver Info:
 Driver name   : imx-ipuv3-csi
 Card type : imx-ipuv3-camera
 Bus info  : platform:imx-ipuv3-csi
 Driver version: 3.19.0
 Capabilities  : 0x8421
 Video Capture
 Streaming
 Extended Pix Format
 Device Capabilities
 Device Caps   : 0x0421
 Video Capture
 Streaming
 Extended Pix Format

 Compliance test for device /dev/video0 (not using libv4l2):

 Required ioctls:
 test VIDIOC_QUERYCAP: OK

 Allow for multiple opens:
 test second video open: OK
 test VIDIOC_QUERYCAP: OK
 test VIDIOC_G/S_PRIORITY: OK

 Debug ioctls:
 test VIDIOC_DBG_G/S_REGISTER: OK
 test VIDIOC_LOG_STATUS: OK

 Input ioctls:
 test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
 test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
 test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
 test VIDIOC_ENUMAUDIO: OK (Not Supported)
 test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
 test VIDIOC_G/S_AUDIO: OK (Not Supported)
 Inputs: 0 Audio Inputs: 0 Tuners: 0

 Output ioctls:
 test VIDIOC_G/S_MODULATOR: OK (Not Supported)
 test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
 test VIDIOC_ENUMAUDOUT: OK (Not Supported)
 test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
 test VIDIOC_G/S_AUDOUT: OK (Not Supported)
 Outputs: 0 Audio Outputs: 0 Modulators: 0

 Input/Output configuration ioctls:
 test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
 test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
 test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
 test VIDIOC_G/S_EDID: OK (Not Supported)

 Control ioctls:
 info: checking v4l2_queryctrl of control 'User Controls' (0x00980001)
 info: checking v4l2_queryctrl of control 'Brightness' (0x00980900)
 info: checking v4l2_queryctrl of control 'Contrast' (0x00980901)
 info: checking v4l2_queryctrl of control 'Saturation' (0x00980902)
 info: checking v4l2_queryctrl of control 'Hue' (0x00980903)
 info: checking v4l2_queryctrl of control 'Image Processing
 Controls' (0x009f0001)
 info: checking v4l2_queryctrl of control 'Test Pattern' (0x009f0903)
 info: checking v4l2_queryctrl of control 'Brightness' (0x00980900)
 info: checking v4l2_queryctrl of control 'Contrast' (0x00980901)
 info: checking v4l2_queryctrl of control 'Saturation' (0x00980902)
 info: checking v4l2_queryctrl of control 'Hue' (0x00980903)
 test VIDIOC_QUERYCTRL/MENU: OK
 info: checking control 'User Controls' (0x00980001)
 info: checking control 'Brightness' (0x00980900)
 info: checking control 'Contrast' (0x00980901)
 info: checking control 'Saturation' (0x00980902)
 info: checking control 'Hue' (0x00980903)
 info: checking control 'Image Processing Controls' (0x009f0001)
 info: checking control 'Test Pattern' (0x009f0903)
 test VIDIOC_G/S_CTRL: OK
 info: checking extended control 'User Controls' (0x00980001)
 info: checking extended control 'Brightness' (0x00980900)
 info: checking extended control 'Contrast' (0x00980901)
 info: checking extended control 'Saturation' (0x00980902)
 info: checking extended control 'Hue' (0x00980903)
 info: checking extended control 'Image Processing Controls' 
 (0x009f0001)
 info: checking extended control 'Test Pattern' (0x009f0903)
 test VIDIOC_G/S/TRY_EXT_CTRLS: OK
 info: 

Re: HDMI input on i.MX6 using IPU

2015-01-14 Thread Jean-Michel Hautbois
Hi,

2015-01-08 17:53 GMT+01:00 Jean-Michel Hautbois
jean-michel.hautb...@vodalys.com:
 Hi,

 I have modified both Steve's and Philipp's code, in order to get
 something able to get frames from an ADV7611.
 Right now, I am back to Philipp's base of code, rebased on top of
 media-tree, and everything works fine, except the very last link
 between SFMC and IDMAC (using media controller).
 Here is a status.

 The code is here :
 https://github.com/Vodalys/linux-2.6-imx/tree/media-tree-zabel

Right now, I can go further. I added support for BT.1120 in order to
get the correct video format, and I am able to start a streaming, but
I can't get an interrupt on IDMAC.

I am starting with setting DV timings on adv7611 input, and then, I am
using 4l2-compliance in order to test streaming. It has shown several
things, most of them are corrected, sometimes in a hacky way.

Right now, I can do the following :
$ media-ctl --set-dv 'adv7611 1-004c:1 [fmt:YUYV/1280x720]' 
media-ctl --set-v4l2 'adv7611 1-004c:1 [fmt:YUYV/1280x720]'
$ echo -n 'module imx_ipuv3_csi +p'  /sys/kernel/debug/dynamic_debug/control
$ v4l2-compliance -v -s
Driver Info:
Driver name   : imx-ipuv3-csi
Card type : imx-ipuv3-camera
Bus info  : platform:imx-ipuv3-csi
Driver version: 3.19.0
Capabilities  : 0x8421
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x0421
Video Capture
Streaming
Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK
test VIDIOC_LOG_STATUS: OK

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
info: checking v4l2_queryctrl of control 'User Controls' (0x00980001)
info: checking v4l2_queryctrl of control 'Brightness' (0x00980900)
info: checking v4l2_queryctrl of control 'Contrast' (0x00980901)
info: checking v4l2_queryctrl of control 'Saturation' (0x00980902)
info: checking v4l2_queryctrl of control 'Hue' (0x00980903)
info: checking v4l2_queryctrl of control 'Image Processing
Controls' (0x009f0001)
info: checking v4l2_queryctrl of control 'Test Pattern' (0x009f0903)
info: checking v4l2_queryctrl of control 'Brightness' (0x00980900)
info: checking v4l2_queryctrl of control 'Contrast' (0x00980901)
info: checking v4l2_queryctrl of control 'Saturation' (0x00980902)
info: checking v4l2_queryctrl of control 'Hue' (0x00980903)
test VIDIOC_QUERYCTRL/MENU: OK
info: checking control 'User Controls' (0x00980001)
info: checking control 'Brightness' (0x00980900)
info: checking control 'Contrast' (0x00980901)
info: checking control 'Saturation' (0x00980902)
info: checking control 'Hue' (0x00980903)
info: checking control 'Image Processing Controls' (0x009f0001)
info: checking control 'Test Pattern' (0x009f0903)
test VIDIOC_G/S_CTRL: OK
info: checking extended control 'User Controls' (0x00980001)
info: checking extended control 'Brightness' (0x00980900)
info: checking extended control 'Contrast' (0x00980901)
info: checking extended control 'Saturation' (0x00980902)
info: checking extended control 'Hue' (0x00980903)
info: checking extended control 'Image Processing Controls' (0x009f0001)
info: checking extended control 'Test Pattern' (0x009f0903)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
info: checking control event 'User Controls' (0x00980001)
fail: 
/run/media/jm/SSD_JM/Projets/vodabox3/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/v4l-utils/git-r0/git/utils/v4l2-compliance/v4l2-test-controls.cpp(721):
subscribe event for control 'User Controls' failed
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)

HDMI input on i.MX6 using IPU

2015-01-08 Thread Jean-Michel Hautbois
Hi,

I have modified both Steve's and Philipp's code, in order to get
something able to get frames from an ADV7611.
Right now, I am back to Philipp's base of code, rebased on top of
media-tree, and everything works fine, except the very last link
between SFMC and IDMAC (using media controller).
Here is a status.

The code is here :
https://github.com/Vodalys/linux-2.6-imx/tree/media-tree-zabel

I am using a DT with this simple connection between adv7611 and IPU :
ipu1_csi0 {
csi0_from_hdmi: endpoint {
remote-endpoint = hdmi0_out;
};
};

hdmiin1: adv7611@4c {
compatible = adi,adv7611;
pinctrl-names = default;
pinctrl-0 = pinctrl_csi0;
reset-gpios = gpio1 20 GPIO_ACTIVE_LOW;
reg = 0x4c 0x68 0x66 0x64 0x62
0x60 0x5e 0x5c 0x5a 0x58 0x56
0x54 0x52;
reg-names = main, avlink, cec, infoframe, esdp,
dpp, afe, rep, edid, hdmi, test,
cp, vdp;
ports {
#address-cells = 1;
#size-cells = 0;
port@0 {
reg = 0;
};
port@1 {
reg = 1;
hdmi0_out: endpoint@1 {
remote-endpoint = csi0_from_hdmi;
bus-width = 16;
};
};
};
};

It seems to be pretty good, I can configure mbus format, etc.
$ media-ctl -v --set-v4l2 'adv7611 1-004c:1 [fmt: YUYV/1280x720]
Opening media device /dev/media0
Enumerating entities
Found 33 entities
Enumerating pads and links
Setting up format YUYV 1280x720 on pad adv7611 1-004c/1
Format set: YUYV 1280x720
Setting up format YUYV 1280x720 on pad /soc/ipu@0240/port@0/0
Format set: YUYV 1280x720

Here is the complete topology right now.
Device topology
- entity 1: /soc/ipu@0240/port@0 (5 pads, 10 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
[fmt:YUYV/1280x720]
- adv7611 1-004c:1 [ENABLED,IMMUTABLE]
pad1: Source
[fmt:unknown/0x0]
- IPU0 SMFC0:0 [ENABLED]
- IPU0 SMFC1:0 []
- IPU0 SMFC2:0 []
- IPU0 SMFC3:0 []
- IPU0 IC PRP:0 []
- IPU0 VDIC:0 []
pad2: Source
[fmt:unknown/0x0]
- IPU0 SMFC0:0 []
pad3: Source
[fmt:unknown/0x0]
- IPU0 SMFC0:0 []
pad4: Source
[fmt:unknown/0x0]
- IPU0 SMFC0:0 []

- entity 2: imx-ipuv3-camera.2 (1 pad, 9 links)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
- IPU0 SMFC0:1 []
- IPU0 SMFC1:1 []
- IPU0 SMFC2:1 []
- IPU0 SMFC3:1 []
- IPU0 IC PRP:1 []
- IPU0 IC PRP ENC:1 []
- IPU0 IC PRP VF:1 []
- IPU0 IRT ENC:1 []
- IPU0 IRT VF:1 []

- entity 3: /soc/ipu@0240/port@1 (5 pads, 9 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
[fmt:unknown/0x0]
pad1: Source
[fmt:unknown/0x0]
- IPU0 SMFC0:0 []
- IPU0 SMFC1:0 []
- IPU0 SMFC2:0 [ENABLED]
- IPU0 SMFC3:0 []
- IPU0 IC PRP:0 []
- IPU0 VDIC:0 []
pad2: Source
[fmt:unknown/0x0]
- IPU0 SMFC0:0 []
pad3: Source
[fmt:unknown/0x0]
- IPU0 SMFC0:0 []
pad4: Source
[fmt:unknown/0x0]
- IPU0 SMFC0:0 []

- entity 4: imx-ipuv3-camera.3 (1 pad, 9 links)
type Node subtype V4L flags 0
device node name /dev/video1
pad0: Sink
- IPU0 SMFC0:1 []
- IPU0 SMFC1:1 []
- IPU0 SMFC2:1 []
- IPU0 SMFC3:1 []
- IPU0 IC PRP:1 []
- IPU0 IC PRP ENC:1 []
- IPU0 IC PRP VF:1 []
- IPU0 IRT ENC:1 []
- IPU0 IRT VF:1 []

- entity 5: IPU0 SMFC0 (2 pads, 15 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev2
pad0: Sink
- /soc/ipu@0240/port@0:1 [ENABLED]
- /soc/ipu@0240/port@0:2 []
- /soc/ipu@0240/port@0:3 []
- /soc/ipu@0240/port@0:4 []
- /soc/ipu@0240/port@1:1 []
- /soc/ipu@0240/port@1:2 []
- /soc/ipu@0240/port@1:3 []
- /soc/ipu@0240/port@1:4 []
pad1: Source
- IPU0 IC PRP:0 []
- IPU0 IC PP:0 []
- IPU0 IRT ENC:0 []
- IPU0 IRT VF:0 []
- IPU0 IRT PP:0 []
- imx-ipuv3-camera.3:0 []
- imx-ipuv3-camera.2:0 []

- entity 6: IPU0 SMFC1 (2 pads, 6 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev3
pad0: Sink
- /soc/ipu@0240/port@0:1 []
- /soc/ipu@0240/port@1:1 []
pad1: Source
- IPU0 IRT ENC:0 []
- IPU0 IRT VF:0 []
- imx-ipuv3-camera.3:0 []
- imx-ipuv3-camera.2:0 []

- entity 7: IPU0 SMFC2 (2 pads, 9 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev4
pad0: Sink
-