Skip to content

Add IPU8 GMSL support for AR0234, ISX031 60fps modes, external frame sync and doc improvements - #42

Merged
khaiwenng merged 9 commits into
intel:mainfrom
vunnyso:vs-external-port-20260824
Aug 27, 2026
Merged

Add IPU8 GMSL support for AR0234, ISX031 60fps modes, external frame sync and doc improvements#42
khaiwenng merged 9 commits into
intel:mainfrom
vunnyso:vs-external-port-20260824

Conversation

@vunnyso

@vunnyso vunnyso commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Description of changes

IPU8 AR0234 GMSL support

  • Add IPU8 ACPI SSDT overlay for D3 AR0234 GMSL camera topology (1 MAX96724 C-PHY deserializer, 2 AR0234 sensors via MAX9295A serializers)
  • Introduce shared ASL includes (_cam_common_ar0234.asl, _des_ch_common_ar0234.asl) and top-level max96724_d3_ar0234.asl
  • Add AR0234 sensor config (ar0234.json) with MediaCtl routing and register in libcamhal_configs.json
  • Document IPU8 GMSL setup instructions (SSDT config, config deployment, tuning file notes) in the AR0234 userspace-gmsl guide
  • Update README sensor support matrix to include IPU8 for AR0234 GMSL

ISX031 60fps modes

  • Add 1920x1536@60 and 1920x1080@60 (UYVY, 4-lane) entries to supported_modes[]
  • Reuse existing register lists; frame rate is controlled via the 4-lane drive-mode register (0x8A00)
  • Implement enum_mbus_code, enum_frame_size, enum_frame_interval, get_frame_interval, and set_frame_interval subdev ops
  • Follow vendor mode-change sequence: unlock MODE_SET_F, enter standby, wait 50ms, program mode, transition to streaming
  • Fix stale pre_mode across suspend/resume by recording it in isx031_resume()
  • Set CSI-2 link frequency to 288 MHz DDR (576 Mbps/lane) for 4-lane configuration
  • Consolidate mode lookup into isx031_find_mode() helper; update cur_mode only via isx031_set_cur_mode()
  • Preserve selected fps in set_fmt when resolution is unchanged
  • Skip frame rates the current lane count cannot drive in enum/set ops
  • Return -EBUSY from set_frame_interval while streaming
  • Drop unnecessary LINUX_VERSION_CODE guards (header available since v5.18, well below 6.12 minimum)
  • Validated on IPU7 direct MIPI and GMSL dual-camera at 30 and 60 fps with zero dropped frames

Doc cleanup

  • Move shared MAX9296/MAX96724 link-port and C-PHY/D-PHY adapter images into images
  • Update all markdown references across ar0233, ar0234, ar0820, ar0830, d4xx, isx031, and ov13b10 docs
  • Remove per-sensor duplicate image copies
  • Add psys_freq environment setup section to the IMX415 guide documenting the IPU6-only psys_freq_override=575 modprobe option

External frame sync enablement

  • Add external frame sync support (disabled by default); selectable via different ASL files
  • When enabled, camera capture fps follows the external pulse frequency
  • Support enabling/disabling frame sync per individual channel
  • Add serializer receive ID configuration to specify the frame sync pulse source
  • Rework serializer codes to support the new frame sync routing

sudhirehl and others added 9 commits August 24, 2026 14:12
Add 4-lane 60fps support to ISX031 - 1920x1536@60 and 1920x1080@60
(UYVY) - and the frame-interval controls to select the frame rate at
runtime.

 - Add the 1920x1536@60 and 1920x1080@60 supported_modes[] entries. The
   60fps entries reuse the existing register lists; the rate is applied
   via the 4-lane drive-mode register (0x8A00), so no separate 60fps
   register list is needed.
 - Follow the sensor vendor mode-change sequence when the mode actually
   changes: unlock MODE_SET_F, enter standby, wait 50ms, then program
   the mode and transit to streaming. A stream start that does not
   change the mode skips this entirely.
 - Record pre_mode in isx031_resume() after the mode registers are
   reapplied, as probe() does. Without this pre_mode is stale across a
   suspend, and isx031_start_streaming() reprograms registers that
   isx031_resume() wrote one call earlier.
 - Set the CSI-2 link frequency to the vendor-specified 288 MHz DDR
   clock (576 Mbps/lane) for the 4-lane configuration. On IPU7 this is
   the value that programs the CSI PHY rate.
 - Implement enum_mbus_code, enum_frame_size, enum_frame_interval,
   get_frame_interval and set_frame_interval so userspace can enumerate
   and select the frame rate. enum/set skip frame rates the current lane
   count cannot drive, and set_frame_interval returns -EBUSY while
   streaming.
 - Keep the currently selected fps in set_fmt when the resolution is
   unchanged, so re-applying the same format does not drop 60fps to 30.
 - Pick the mode through a common isx031_find_mode() helper and update
   cur_mode only via isx031_set_cur_mode(), so set_fmt and
   set_frame_interval share one lookup instead of duplicating it. Add
   dev_dbg traces to the enum_* ops and to every cur_mode change.

 - Drop the LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0) guards around
   the <media/mipi-csi2.h> include, the isx031_mode.datatype field and
   the five supported_modes[] .datatype initialisers. The header and
   MIPI_CSI2_DT_YUV422_8B have been in the kernel since v5.18 (commit
   5cadbd897221 "media: Define MIPI CSI-2 data types in a shared header
   file"), well below the 6.12 minimum this tree documents in README.md,
   so the include does not need a guard. The pre-6.10 branch of
   isx031_get_frame_desc() never reads .datatype, so the field is simply
   unused there; the 6.10 guard on isx031_get_frame_desc() itself is
   kept, as it gates the frame-desc API rather than the header. This
   also clears the checkpatch LINUX_VERSION_CODE and CONSTANT_COMPARISON
   warnings that the two new mode entries would add.

Validated on IPU7 (direct MIPI, 4-lane): 1920x1536@30, 1920x1536@60,
1920x1080@30, 1920x1080@60 and 1280x720@30 all stream at their exact
measured rates (30, 60, 30, 60 and 30 fps) via v4l2-ctl --stream-mmap
and gst-launch (fpsdisplaysink, 0 dropped frames).

Validation commands (1920x1536@60). Device node numbers are
platform-specific; confirm them with 'media-ctl -d /dev/media0 -p':

  (1) media pipeline (link + routes + formats)
  media-ctl -d /dev/media0 \
    -l '"Intel IPU7 CSI2 0":1 -> "Intel IPU7 ISYS Capture 0":0 [1]'
  media-ctl -d /dev/media0 -R '"Intel IPU7 CSI2 0" [0/0 -> 1/0[1]]'
  media-ctl -d /dev/media0 \
    -V '"isx031 1-001a":0 [fmt:UYVY8_1X16/1920x1536]'
  media-ctl -d /dev/media0 \
    -V '"Intel IPU7 CSI2 0":0/0 [fmt:UYVY8_1X16/1920x1536]'
  media-ctl -d /dev/media0 \
    -V '"Intel IPU7 CSI2 0":1/0 [fmt:UYVY8_1X16/1920x1536]'

  The -l step is required: -R sets the route-active flag, it does not
  enable the pad link. Without it VIDIOC_STREAMON fails with
  not-negotiated (-4) on a freshly booted system.

  (2) capture-node format + sensor fps (format first, then fps)
  v4l2-ctl -d /dev/video0 \
    --set-fmt-video=width=1920,height=1536,pixelformat=UYVY
  v4l2-ctl -d /dev/v4l-subdev4 --set-subdev-fps pad=0,fps=60
  v4l2-ctl -d /dev/v4l-subdev4 --get-subdev-fps pad=0  # expect 60.000

  (3a) measure with v4l2-ctl
  v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=300
  # expect ~60.00 fps
  or
  (3b) measure with gst-launch
  gst-launch-1.0 -v v4l2src device=/dev/video0 io-mode=mmap \
    ! 'video/x-raw,format=UYVY,width=1920,height=1536,framerate=60/1' \
    ! fpsdisplaysink video-sink=fakesink sync=false text-overlay=false

Also validated on a GMSL setup with two ISX031 cameras, both streaming
at 30 and 60fps. mc-setup.sh programs the whole media graph from the
ACPI enumeration, so the media-ctl steps above are not needed there:

  (1) program the graph for both links
  ./script/acpi/mc-setup.sh des=0,link=0,stream=yuv des=0,link=1,stream=yuv

  mc-setup prints the capture node for each link as
  'Stream [yuv] --> /dev/videoN'; use those numbers below. The stream
  size defaults to 1920x1536, so export STREAM_SIZE_yuv=1920x1080
  before the call for the other resolution.

  (2) select the frame rate on each sensor subdev
  v4l2-ctl -d /dev/v4l-subdevX --set-subdev-fps pad=0,fps=60
  v4l2-ctl -d /dev/v4l-subdevY --set-subdev-fps pad=0,fps=60
  # confirm each with --get-subdev-fps pad=0

  mc-setup does not set the frame rate. The subdev for each link is the
  'isx031 <bus>-<addr>' entity in 'media-ctl -d /dev/media0 -p'. The
  rate has to be selected before streaming starts, since
  set_frame_interval returns -EBUSY once the sensor is streaming.

  (3) stream both cameras, one command per link
  v4l2-ctl -d /dev/videoN --stream-mmap --stream-count=300
  or
  gst-launch-1.0 icamerasrc num-buffers=-1 num-vc=1 scene-mode=normal \
    device-name=acpi-1 printfps=true io-mode=dma_mode \
    ! 'video/x-raw(memory:DMABuf),drm-format=UYVY,width=1920,height=1536' \
    ! glimagesink sync=false

  device-name is acpi-1 for link 0 and acpi-2 for link 1.

Signed-off-by: Sudhir Sharma <sudhir.sharma@intel.com>
Add IPU8 ACPI SSDT overlay support for the D3 AR0234 GMSL camera
topology: 1 MAX96724 deserializers (CPHY) each fronting 2 AR0234
cameras over GMSL via MAX9295A serializers. Introduces
_cam_common_ar0234.asl and _des_ch_common_ar0234.asl shared includes
alongside the max96724_d3_ar0234.asl top-level SSDT.

Signed-off-by: Goh, Wei Khang1 <wei.khang1.goh@intel.com>
Add sensor config for the D3 AR0234 GMSL camera (ar0234.json) with
its MediaCtl routing, and register ar0234 in libcamhal_configs.json
availableSensors alongside the existing ar0234-a/b entries.

Signed-off-by: Goh, Wei Khang1 <wei.khang1.goh@intel.com>
Document the IPU8 GMSL sensor setup alongside the existing
IPU6EPMTL and IPU75XA instructions: SSDT ACPI camera configuration, config
file deployment steps for x2 sensors, and a tuning file placeholder
(N/A, no external tuning file needed).

Signed-off-by: Goh, Wei Khang1 <wei.khang1.goh@intel.com>
Update the sensor support matrix to reflect that AR0234 over GMSL
now supports IPU8 in addition to IPU6EPMTL and IPU75XA.

Signed-off-by: Goh, Wei Khang1 <wei.khang1.goh@intel.com>
Several sensor doc folders (ar0233, ar0234, ar0820, ar0830, d4xx,
isx031, ov13b10) each shipped their own copies of the same
MAX9296/MAX96724 link-port and C-PHY/D-PHY adapter images. Move the
shared images into doc/images/ and update all markdown references to
point there, removing the now-redundant per-sensor duplicates.

Signed-off-by: Goh, Wei Khang1 <wei.khang1.goh@intel.com>
Add an Environment Setup section documenting the IPU6-only
psys_freq_override=575 modprobe option, required before running the
sample userspace commands

Signed-off-by: Izzul Irfan <muhammadx.izzul.irfan.bin.che.iswanizam@intel.com>
By using different asl files, able to enable or disable external
frame sycn.
When external frame sync is enable, camera capture fps will
follow external pulse frequency. Also able to enable or
disable frame sync for individual channel.

Signed-off-by: Seng Guan, Chng <seng.guan.chng@intel.com>
Add in serializer receive id, which let user to configure
where is the frame sync pulse source come from.
Also rework on serializer codes.

Signed-off-by: Seng Guan, Chng <seng.guan.chng@intel.com>
@vunnyso vunnyso changed the title Add IPU8 GMSL support for AR0234, ISX031 60fps modes, and doc image consolidation Add IPU8 GMSL support for AR0234, ISX031 60fps modes, external frame sync and doc improvements Aug 24, 2026
@khaiwenng
khaiwenng merged commit 35d5374 into intel:main Aug 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants