intel-ipu7-camera

This commit is contained in:
Ryan Hughes committed 2026-05-08 01:04:51 -04:00
1 parent 9a8279baba
commit 7fc3fbe34b
19 files changed
+3

No files matched your search

@@ -1,30 +0,0 @@
From 8d49375eff603615323a6144e287ffd6a8429b1b Mon Sep 17 00:00:00 2001
From: Intel <intel@local>
Date: Tue, 3 Mar 2026 15:30:43 -0800
Subject: [PATCH] icvs: set rgbcamera_pwrup_host=0 for Panther Lake
On Panther Lake, sensor power goes through USBIO GPIO which is managed
by CVS firmware, not the host. With the default rgbcamera_pwrup_host=1,
the sensor never powers up and I2C reads time out with -ETIMEDOUT.
Setting this to 0 tells CVS firmware to handle sensor power sequencing
via USBIO GPIO, which is the correct path on PTL.
---
drivers/misc/icvs/intel_cvs_update.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/icvs/intel_cvs_update.c b/drivers/misc/icvs/intel_cvs_update.c
index 5f069aa..5dc4c85 100644
--- a/drivers/misc/icvs/intel_cvs_update.c
+++ b/drivers/misc/icvs/intel_cvs_update.c
@@ -54,7 +54,7 @@ int cvs_write_i2c(u16 cmd, u8 *data, u32 len)
host_identifiers.field.vision_sensing = 0;
host_identifiers.field.device_power_setting = 0;
host_identifiers.field.privacy_led_host = 0;
- host_identifiers.field.rgbcamera_pwrup_host = 1;
+ host_identifiers.field.rgbcamera_pwrup_host = 0;
memcpy(&out_buff[2], &host_identifiers.value,
cv_host_identifier_size);
--
2.53.0
@@ -1,8 +0,0 @@
# Hide raw IPU7 ISYS capture devices from ALL applications.
# These are internal ISP nodes that output raw 12-bit Bayer data and cannot produce usable frames.
# Camera is provided via v4l2loopback (/dev/video50) through v4l2-relayd instead.
#
# This rule MUST run after 70-uaccess.rules (which adds TAG="uaccess" to video4linux)
# but BEFORE 73-seat-late.rules (which applies per-user ACLs based on that tag).
# MODE=0600 + GROUP=root blocks even users in the 'video' group.
SUBSYSTEM=="video4linux", ATTR{name}=="Intel IPU7 ISYS Capture *", TAG-="uaccess", TAG-="seat", MODE="0600", GROUP="root"
@@ -1 +0,0 @@
KERNEL=="ipu7-psys0", MODE="0666", SYMLINK+="ipu-psys0"
-230
View File
@@ -1,230 +0,0 @@
# Maintainer: Omarchy <packages@omarchy.org>
pkgname=intel-ipu7-camera
pkgver=1.0.3
pkgrel=2
pkgdesc="Intel IPU7 MIPI camera stack for Hurrican/Performance (OV08X40 + hardware ISP)"
arch=('x86_64')
url="https://github.com/TsaiGaggery/hurrican_omarchy_enabling"
license=('GPL-2.0-or-later')
depends=(
'dkms'
'linux-headers'
'v4l2loopback-dkms'
'v4l2-relayd'
'gstreamer'
'gst-plugins-base'
'gst-plugins-good'
'gst-plugins-bad'
'jsoncpp'
'libdrm'
)
makedepends=(
'git'
'base-devel'
'cmake'
'autoconf'
'automake'
'libtool'
'pkgconf'
)
install=intel-ipu7-camera.install
options=('!strip')
_ipu7_drivers_commit="a88b19096a738d0708742a78d6540d6d4a3021ff"
_vision_drivers_commit="a8d772f261bc90376944956b7bfd49b325ffa2f2"
_ipu7_camera_bins_commit="403c67db6b279dd02752f11db6a34552f31a3ac5"
_ipu7_camera_hal_commit="b1f6ebef12111fb5da0133b144d69dd9b001836c"
_icamerasrc_commit="4fb31db76b618aae72184c59314b839dedb42689"
source=(
"ipu7-drivers::git+https://github.com/intel/ipu7-drivers.git#commit=${_ipu7_drivers_commit}"
"vision-drivers::git+https://github.com/intel/vision-drivers.git#commit=${_vision_drivers_commit}"
"ipu7-camera-bins::git+https://github.com/intel/ipu7-camera-bins.git#commit=${_ipu7_camera_bins_commit}"
"ipu7-camera-hal::git+https://github.com/intel/ipu7-camera-hal.git#commit=${_ipu7_camera_hal_commit}"
"icamerasrc::git+https://github.com/intel/icamerasrc.git#commit=${_icamerasrc_commit}"
"0003-icvs-set-rgbcamera_pwrup_host-0-for-Panther-Lake.patch"
"dkms-ipu7-drivers.conf"
"dkms-vision-drivers.conf"
"camera-deps.conf"
"v4l2loopback-modprobe.conf"
"camera-init.service"
"intel-ipu7-camera.service"
"hide-ipu7-v4l2.conf"
"disable-libcamera.conf"
"71-ipu7-hide-isys.rules"
"90-ipu7-psys.rules"
"camera-tmpfiles.conf"
"ov08x40.yaml"
"camera-sleep-hook"
"v4l2-relayd-ipu7.conf"
"v4l2-relayd-ipu7-override.conf"
)
sha256sums=(
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP'
'SKIP' 'SKIP' 'SKIP'
)
prepare() {
cd "${srcdir}/vision-drivers"
git config user.email "build@localhost"
git config user.name "Build"
if ! git log --oneline -1 | grep -q "rgbcamera_pwrup_host"; then
git am "${srcdir}/0003-icvs-set-rgbcamera_pwrup_host-0-for-Panther-Lake.patch"
fi
# Stage proprietary libs/headers for build-time use
local staging="${srcdir}/staging"
rm -rf "${staging}"
mkdir -p "${staging}/usr/lib" "${staging}/usr/include" "${staging}/usr/lib/pkgconfig"
cd "${srcdir}/ipu7-camera-bins"
cp -P lib/lib* "${staging}/usr/lib/"
cp -r include/* "${staging}/usr/include/"
cp -r lib/pkgconfig/* "${staging}/usr/lib/pkgconfig/"
for pc in "${staging}"/usr/lib/pkgconfig/*.pc; do
sed -i "s|^prefix=.*|prefix=${staging}/usr|" "$pc"
done
if [[ -d /usr/include/json ]] && [[ ! -e /usr/include/jsoncpp/json ]]; then
mkdir -p "${staging}/usr/include/jsoncpp"
ln -sf /usr/include/json "${staging}/usr/include/jsoncpp/json"
fi
}
build() {
local staging="${srcdir}/staging"
export PKG_CONFIG_PATH="${staging}/usr/lib/pkgconfig:${PKG_CONFIG_PATH:-}"
export LIBRARY_PATH="${staging}/usr/lib:${LIBRARY_PATH:-}"
export LD_LIBRARY_PATH="${staging}/usr/lib:${LD_LIBRARY_PATH:-}"
export CPATH="${staging}/usr/include:${CPATH:-}"
cd "${srcdir}/ipu7-camera-hal"
rm -rf build && mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_CAMHAL_ADAPTOR=ON \
-DBUILD_CAMHAL_PLUGIN=ON \
-DIPU_VERSIONS="ipu75xa" \
-DUSE_STATIC_GRAPH=ON \
-DUSE_STATIC_GRAPH_AUTOGEN=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_PREFIX_PATH="${staging}/usr" \
-DCMAKE_LIBRARY_PATH="${staging}/usr/lib" \
-DCMAKE_INCLUDE_PATH="${staging}/usr/include" \
..
make -j"$(nproc)"
make DESTDIR="${staging}" install
install -Dm644 "${srcdir}/ipu7-camera-hal/libcamhal.pc" \
"${staging}/usr/lib/pkgconfig/libcamhal.pc"
sed -i "s|^prefix=.*|prefix=${staging}/usr|" "${staging}/usr/lib/pkgconfig/libcamhal.pc"
cd "${srcdir}/icamerasrc"
export CHROME_SLIM_CAMHAL=ON
[[ ! -f configure ]] && ./autogen.sh
./configure --prefix=/usr
make -j"$(nproc)"
}
package() {
# DKMS: IPU7 drivers (ISYS + PSYS + ACPI)
local ipu7_dkms_dir="${pkgdir}/usr/src/ipu7-drivers-${pkgver}"
install -dm755 "${ipu7_dkms_dir}"
cp -r "${srcdir}/ipu7-drivers/"* "${ipu7_dkms_dir}/"
rm -rf "${ipu7_dkms_dir}/.git"
install -Dm644 "${srcdir}/dkms-ipu7-drivers.conf" "${ipu7_dkms_dir}/dkms.conf"
sed -i "s/@PKGVER@/${pkgver}/" "${ipu7_dkms_dir}/dkms.conf"
# DKMS: Vision drivers (CVS)
local cvs_dkms_dir="${pkgdir}/usr/src/vision-drivers-${pkgver}"
install -dm755 "${cvs_dkms_dir}"
cp -r "${srcdir}/vision-drivers/"* "${cvs_dkms_dir}/"
install -Dm644 "${srcdir}/dkms-vision-drivers.conf" "${cvs_dkms_dir}/dkms.conf"
sed -i "s/@PKGVER@/${pkgver}/" "${cvs_dkms_dir}/dkms.conf"
# Firmware
install -dm755 "${pkgdir}/usr/lib/firmware/intel/ipu"
install -Dm644 "${srcdir}/ipu7-camera-bins/lib/firmware/intel/ipu/"*.bin \
-t "${pkgdir}/usr/lib/firmware/intel/ipu/"
# Proprietary libraries + headers from ipu7-camera-bins
cd "${srcdir}/ipu7-camera-bins"
install -dm755 "${pkgdir}/usr/lib"
cp -P lib/lib* "${pkgdir}/usr/lib/"
install -dm755 "${pkgdir}/usr/include"
cp -r include/* "${pkgdir}/usr/include/"
install -dm755 "${pkgdir}/usr/lib/pkgconfig"
cp -r lib/pkgconfig/* "${pkgdir}/usr/lib/pkgconfig/"
# Camera HAL + config
cd "${srcdir}/ipu7-camera-hal/build"
make DESTDIR="${pkgdir}" install
cd "${srcdir}/ipu7-camera-hal"
install -dm755 "${pkgdir}/usr/share/defaults/etc/camera"
install -Dm644 config/linux/ipu75xa/libcamhal_configs.json \
"${pkgdir}/usr/share/defaults/etc/camera/"
install -Dm644 config/linux/ipu75xa/*.aiqb \
-t "${pkgdir}/usr/share/defaults/etc/camera/"
install -dm755 "${pkgdir}/etc/camera/ipu75xa/gcss"
install -Dm644 config/linux/ipu75xa/gcss/*.bin \
-t "${pkgdir}/etc/camera/ipu75xa/gcss/"
install -dm755 "${pkgdir}/etc/camera/ipu75xa/sensors"
install -Dm644 config/linux/ipu75xa/sensors/*.json \
-t "${pkgdir}/etc/camera/ipu75xa/sensors/"
install -Dm644 config/linux/ipu75xa/pipe_scheduler_profiles.json \
"${pkgdir}/etc/camera/ipu75xa/"
install -Dm644 config/linux/ipu75xa/pnp_profiles.json \
"${pkgdir}/etc/camera/ipu75xa/"
# icamerasrc GStreamer plugin
cd "${srcdir}/icamerasrc"
make DESTDIR="${pkgdir}" install
# modprobe / modules-load
install -Dm644 "${srcdir}/camera-deps.conf" \
"${pkgdir}/usr/lib/modprobe.d/camera-deps.conf"
install -Dm644 "${srcdir}/v4l2loopback-modprobe.conf" \
"${pkgdir}/usr/lib/modprobe.d/v4l2loopback-camera.conf"
# systemd
install -Dm644 "${srcdir}/camera-init.service" \
"${pkgdir}/usr/lib/systemd/system/camera-init.service"
install -Dm644 "${srcdir}/intel-ipu7-camera.service" \
"${pkgdir}/usr/lib/systemd/system/intel-ipu7-camera.service"
# WirePlumber
install -Dm644 "${srcdir}/hide-ipu7-v4l2.conf" \
"${pkgdir}/usr/share/wireplumber/wireplumber.conf.d/hide-ipu7-v4l2.conf"
install -Dm644 "${srcdir}/disable-libcamera.conf" \
"${pkgdir}/usr/share/wireplumber/wireplumber.conf.d/disable-libcamera.conf"
# udev rules
install -Dm644 "${srcdir}/71-ipu7-hide-isys.rules" \
"${pkgdir}/usr/lib/udev/rules.d/71-ipu7-hide-isys.rules"
install -Dm644 "${srcdir}/90-ipu7-psys.rules" \
"${pkgdir}/usr/lib/udev/rules.d/90-ipu7-psys.rules"
# v4l2-relayd config for IPU7 camera
install -Dm644 "${srcdir}/v4l2-relayd-ipu7.conf" \
"${pkgdir}/etc/v4l2-relayd.d/ipu7.conf"
install -Dm644 "${srcdir}/v4l2-relayd-ipu7-override.conf" \
"${pkgdir}/etc/systemd/system/v4l2-relayd@ipu7.service.d/override.conf"
install -Dm644 "${srcdir}/camera-tmpfiles.conf" \
"${pkgdir}/usr/lib/tmpfiles.d/camera.conf"
install -Dm644 "${srcdir}/ov08x40.yaml" \
"${pkgdir}/usr/share/libcamera/ipa/simple/ov08x40.yaml"
# Sleep hook — staged here, installed to system-sleep by the .install scriptlet
install -Dm755 "${srcdir}/camera-sleep-hook" \
"${pkgdir}/usr/share/intel-ipu7-camera/camera-sleep-hook"
}
@@ -1,5 +0,0 @@
# Blacklist ov08x40 - it must load AFTER intel_cvs acquires camera ownership
blacklist ov08x40
# Soft dependency: if ov08x40 is loaded, ensure intel_cvs loads first
softdep ov08x40 pre: intel_cvs
@@ -1,12 +0,0 @@
[Unit]
Description=Initialize camera (CVS ownership, sensor driver, v4l2loopback)
After=systemd-modules-load.service
Before=graphical.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c "modprobe intel_cvs && sleep 2 && modprobe ov08x40 && modprobe v4l2loopback"
[Install]
WantedBy=multi-user.target
@@ -1,23 +0,0 @@
#!/bin/bash
# Handle camera service around suspend/resume.
#
# v4l2-relayd must be stopped before suspend to avoid GStreamer crashes,
# then restarted after resume once the camera hardware is ready.
#
# The post-resume restart uses systemd-run to avoid blocking the
# password prompt while waiting for the camera to initialize.
case "$1" in
pre)
systemctl stop v4l2-relayd@ipu7.service 2>/dev/null || true
;;
post)
systemd-run --no-block --unit=camera-resume bash -c '
systemctl restart camera-init.service 2>/dev/null
systemctl reset-failed v4l2-relayd@ipu7.service 2>/dev/null || true
systemctl start v4l2-relayd@ipu7.service 2>/dev/null || true
'
;;
esac
exit 0
@@ -1 +0,0 @@
d /run/camera 0777 root root -
@@ -1,6 +0,0 @@
# Disable libcamera monitor - camera is provided via v4l2loopback + icamerasrc instead
wireplumber.profiles = {
main = {
"monitor.libcamera" = disabled
}
}
@@ -1,30 +0,0 @@
PACKAGE_NAME="ipu7-drivers"
PACKAGE_VERSION="@PKGVER@"
AUTOINSTALL="yes"
BUILT_MODULE_NAME[0]="intel-ipu7"
BUILT_MODULE_LOCATION[0]="drivers/media/pci/intel/ipu7/"
DEST_MODULE_LOCATION[0]="/updates"
BUILT_MODULE_NAME[1]="intel-ipu7-isys"
BUILT_MODULE_LOCATION[1]="drivers/media/pci/intel/ipu7/"
DEST_MODULE_LOCATION[1]="/updates"
BUILT_MODULE_NAME[2]="intel-ipu7-psys"
BUILT_MODULE_LOCATION[2]="drivers/media/pci/intel/ipu7/psys/"
DEST_MODULE_LOCATION[2]="/updates"
BUILT_MODULE_NAME[3]="ipu-acpi"
BUILT_MODULE_LOCATION[3]="drivers/media/platform/intel/"
DEST_MODULE_LOCATION[3]="/updates"
BUILT_MODULE_NAME[4]="ipu-acpi-pdata"
BUILT_MODULE_LOCATION[4]="drivers/media/platform/intel/"
DEST_MODULE_LOCATION[4]="/updates"
BUILT_MODULE_NAME[5]="ipu-acpi-common"
BUILT_MODULE_LOCATION[5]="drivers/media/platform/intel/"
DEST_MODULE_LOCATION[5]="/updates"
MAKE[0]="make BUILD_INTEL_IPU_ACPI=1 KERNEL_SRC=${kernel_source_dir}"
CLEAN="make KERNEL_SRC=${kernel_source_dir} clean"
@@ -1,10 +0,0 @@
PACKAGE_NAME="vision-drivers"
PACKAGE_VERSION="@PKGVER@"
AUTOINSTALL="yes"
BUILT_MODULE_NAME[0]="intel_cvs"
BUILT_MODULE_LOCATION[0]=""
DEST_MODULE_LOCATION[0]="/updates"
MAKE[0]="make KERNEL_SRC=${kernel_source_dir}"
CLEAN="make KERNEL_SRC=${kernel_source_dir} clean"
@@ -1,16 +0,0 @@
# Hide raw IPU7 V4L2 devices from PipeWire - they are internal ISP nodes
# Camera is provided via v4l2loopback + icamerasrc instead
monitor.v4l2.rules = [
{
matches = [
{
device.bus-path = "pci-0000:00:05.0"
}
]
actions = {
update-props = {
device.disabled = true
}
}
}
]
@@ -1,73 +0,0 @@
_add_pipewire_camera() {
local conf="$1"
if [ -f "$conf" ] && ! grep -q 'PipeWireCamera' "$conf"; then
if grep -q 'enable-features=' "$conf"; then
sed -i 's/--enable-features=\([^ ]*\)/--enable-features=\1,PipeWireCamera/' "$conf"
else
echo '--enable-features=PipeWireCamera' >> "$conf"
fi
fi
}
_remove_pipewire_camera() {
local conf="$1"
[ -f "$conf" ] && sed -i 's/,PipeWireCamera//g' "$conf"
}
_install_sleep_hook() {
cp /usr/share/intel-ipu7-camera/camera-sleep-hook /usr/lib/systemd/system-sleep/camera-sleep-hook
chmod 755 /usr/lib/systemd/system-sleep/camera-sleep-hook
}
post_install() {
_install_sleep_hook
systemctl daemon-reload
systemctl disable camera-init.service v4l2-relayd@ipu7.service 2>/dev/null || true
systemctl enable intel-ipu7-camera.service
udevadm control --reload-rules 2>/dev/null || true
if [ -n "$SUDO_USER" ]; then
usermod -aG video "$SUDO_USER" 2>/dev/null || true
_add_pipewire_camera "/home/$SUDO_USER/.config/chromium-flags.conf"
_add_pipewire_camera "/home/$SUDO_USER/.config/brave-flags.conf"
_add_pipewire_camera "/home/$SUDO_USER/.config/chrome-flags.conf"
fi
}
post_upgrade() {
_install_sleep_hook
systemctl daemon-reload
systemctl disable camera-init.service v4l2-relayd@ipu7.service 2>/dev/null || true
systemctl enable intel-ipu7-camera.service
# Disable old camera-feed-watch (replaced by v4l2-relayd)
systemctl --global disable camera-feed-watch.service 2>/dev/null || true
udevadm control --reload-rules 2>/dev/null || true
if [ -n "$SUDO_USER" ]; then
_add_pipewire_camera "/home/$SUDO_USER/.config/chromium-flags.conf"
_add_pipewire_camera "/home/$SUDO_USER/.config/brave-flags.conf"
_add_pipewire_camera "/home/$SUDO_USER/.config/chrome-flags.conf"
fi
}
pre_remove() {
systemctl disable v4l2-relayd@ipu7.service 2>/dev/null || true
systemctl stop v4l2-relayd@ipu7.service 2>/dev/null || true
systemctl disable intel-ipu7-camera.service 2>/dev/null || true
systemctl --global disable camera-feed-watch.service 2>/dev/null || true
systemctl disable camera-init.service 2>/dev/null || true
systemctl stop camera-init.service 2>/dev/null || true
if [ -n "$SUDO_USER" ]; then
_remove_pipewire_camera "/home/$SUDO_USER/.config/chromium-flags.conf"
_remove_pipewire_camera "/home/$SUDO_USER/.config/brave-flags.conf"
_remove_pipewire_camera "/home/$SUDO_USER/.config/chrome-flags.conf"
fi
}
post_remove() {
rm -f /usr/lib/systemd/system-sleep/camera-sleep-hook
systemctl daemon-reload
udevadm control --reload-rules 2>/dev/null || true
}
@@ -1,11 +0,0 @@
[Unit]
Description=Start Intel IPU7 camera stack after graphical boot
After=graphical.target
ConditionPathExists=/usr/lib/systemd/system/camera-init.service
[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl start --no-block camera-init.service v4l2-relayd@ipu7.service
[Install]
WantedBy=graphical.target
@@ -1,16 +0,0 @@
# SPDX-License-Identifier: CC0-1.0
# Tuning file for OmniVision OV08X40
# Used by libcamera simple pipeline handler software ISP
%YAML 1.1
---
version: 1
algorithms:
- BlackLevel:
r: 16
gr: 16
gb: 16
b: 16
- Awb:
- Adjust:
- Agc:
...
@@ -1,13 +0,0 @@
[Unit]
After=camera-init.service
[Service]
Environment=GST_PLUGIN_PATH=/usr/lib/gstreamer-1.0
# Relax sandboxing for icamerasrc hardware access
PrivateNetwork=no
InaccessibleDirectories=
ReadOnlyDirectories=
DevicePolicy=auto
# Give v4l2-relayd time to initialize, then restart WirePlumber
# so PipeWire re-probes the device with the correct format
ExecStartPost=/bin/bash -c 'sleep 2 && systemctl --user -M 1000@ restart wireplumber.service 2>/dev/null || true'
@@ -1,6 +0,0 @@
VIDEOSRC="icamerasrc device-name=ov08x40-uf sharpness=80 ev=-1 saturation=10 ! videoflip method=rotate-180"
FORMAT=NV12
WIDTH=1920
HEIGHT=1080
FRAMERATE=30/1
CARD_LABEL="Hardware ISP Camera"
@@ -1 +0,0 @@
options v4l2loopback video_nr=50 card_label="Hardware ISP Camera" exclusive_caps=1 max_buffers=16