a0be2dcc9f
Kernel-only bump. Fixes the hard-reboot regression introduced by the daedalus-v4l2#7 split-completion design and observed on higgs (Pi CM5) during the first mpv vaapi-copy playback of 720p H.264: device_run now removes src + dst from m2m_ctx's rdy_queue at the moment it picks them up, not at buf_done time. Without this, a parked dst_buf (waiting for libavcodec's display-order release) stayed in the rdy_queue and got re-picked by the next device_run after SRC_CONSUMED's job_finish released the scheduler — two inflight entries on the same vb2_buffer, later HAS_PIXELS calls list_del on an already-detached list_head, panic. DAEDALUS_PROTO_VERSION stays at 1 — daemon (userspace daedalus-v4l2) need NOT bump in lockstep with this DKMS update. The existing daedalus-v4l2 0.1.0+r28+g79256dc is wire-compatible with daedalus-v4l2-dkms 0.1.0+r30+g6ffe92b. Refs: * reauktion/daedalus-v4l2#8
77 lines
3.0 KiB
Bash
77 lines
3.0 KiB
Bash
# Maintainer: Markus Fritsche <fritsche.markus@gmail.com>
|
|
#
|
|
# daedalus-v4l2-dkms — DKMS package for the daedalus_v4l2 out-of-tree
|
|
# kernel module (V4L2 stateless decoder shim for Pi 5 / CM5).
|
|
#
|
|
# Pair to daedalus-v4l2 (userspace daemon). When loaded, the module
|
|
# registers /dev/videoNN (V4L2 m2m) + /dev/mediaNN (media controller) +
|
|
# /dev/daedalus-v4l2 (chardev to the userspace daemon). Userspace
|
|
# clients drive the V4L2 m2m + request API path; the daemon does the
|
|
# actual FFmpeg-backed decode on /dev/daedalus-v4l2.
|
|
#
|
|
# Project: https://git.reauktion.de/reauktion/daedalus-v4l2
|
|
# Sibling userspace package: daedalus-v4l2
|
|
# Sibling consumer: libva-v4l2-request-fourier
|
|
|
|
pkgname=daedalus-v4l2-dkms
|
|
_module=daedalus_v4l2
|
|
|
|
# Kernel module-only bump to 6ffe92b — fixes the panic regression
|
|
# introduced by 79256dc's split-completion design (daedalus-v4l2#8):
|
|
# claim src/dst from m2m's rdy_queue at device_run time, not at
|
|
# buf_done; otherwise a parked dst_buf gets re-picked by the next
|
|
# device_run after SRC_CONSUMED's job_finish releases the scheduler.
|
|
# PROTO_VERSION stays at 1; daedalus-v4l2 (daemon) need NOT bump in
|
|
# lockstep — daemon ABI is unchanged.
|
|
_commit=6ffe92bcacccbf228c398a10c21a6818f07c67d2
|
|
|
|
pkgver=0.1.0.r30.6ffe92b
|
|
pkgrel=1 # reset for new upstream pin (6ffe92b — claim src/dst at device_run, fixes #8 panic)
|
|
pkgdesc="V4L2 stateless decoder shim kernel module (DKMS) — Pi 5 / CM5"
|
|
arch=('any')
|
|
url="https://git.reauktion.de/reauktion/daedalus-v4l2"
|
|
license=('GPL-2.0-or-later')
|
|
depends=('dkms')
|
|
makedepends=('git')
|
|
install="${pkgname}.install"
|
|
|
|
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}"
|
|
"dkms.conf"
|
|
"${pkgname}.install")
|
|
sha256sums=('SKIP'
|
|
'SKIP'
|
|
'SKIP')
|
|
|
|
pkgver() {
|
|
cd "${srcdir}/daedalus-v4l2"
|
|
printf '0.1.0.r%s.%s' \
|
|
"$(git rev-list --count HEAD)" \
|
|
"$(git rev-parse --short=7 HEAD)"
|
|
}
|
|
|
|
package() {
|
|
local _src="${pkgdir}/usr/src/${_module}-${pkgver}"
|
|
|
|
install -dm755 "${_src}"
|
|
|
|
# Install the kernel/ subdir and embed the shared proto header in
|
|
# the same tree. The in-tree Makefile uses
|
|
# `ccflags-y += -I$(src)/../include` (assuming the parent
|
|
# daedalus-v4l2 layout); for DKMS we flatten by copying the header
|
|
# into kernel/include/ and patching the Makefile to point there.
|
|
cp -r "${srcdir}/daedalus-v4l2/kernel/." "${_src}/"
|
|
install -Dm644 "${srcdir}/daedalus-v4l2/include/daedalus_v4l2_proto.h" \
|
|
"${_src}/include/daedalus_v4l2_proto.h"
|
|
sed -i 's|-I\$(src)/\.\./include|-I$(src)/include|' "${_src}/Makefile"
|
|
|
|
# dkms.conf at the root of the source tree (DKMS convention).
|
|
# Substitute #MODULE_VERSION# placeholder with the actual pkgver
|
|
# so dkms install/uninstall match what's on disk.
|
|
install -Dm644 "${srcdir}/dkms.conf" "${_src}/dkms.conf"
|
|
sed -i "s/#MODULE_VERSION#/${pkgver}/" "${_src}/dkms.conf"
|
|
|
|
# License
|
|
install -Dm644 "${srcdir}/daedalus-v4l2/kernel/daedalus_v4l2_main.c" \
|
|
"${pkgdir}/usr/share/licenses/${pkgname}/SPDX-HEADER"
|
|
}
|