AMD’s ISP4 image signal processing IP is so far just used by the HP ZBook Ultra G1a laptop but will presumably be used by more of the higher-end AMD Ryzen next-gen laptops. AMD engineers today posted their fifth iteration of their open-source Linux driver for enabling the ISP4 use.
This AMD ISP4 driver is the last remaining component needed for the web camera of the HP ZBook Ultra G1a to play nicely on Linux with an open-source driver stack — unlike the user-space binaries needed for Intel’s latest IPU tech if wanting to avoid using the software-based image signal processing. Sadly the ISP4 driver wasn’t ready in time for the Linux 6.18 merge window but out today is the v5 patches.
There are a variety of bug fixes and other code improvements to find with this AMD ISP4 v5 Linux driver:
Changes v4 -> v5:
– Transitioned VIDEOBUF2_V4L2 from ‘depends’ to ‘select’ within Kconfig.
– Standardized object file naming conventions in the Makefile and sorted entries alphabetically.
– Removed the unused macro definition to_isp4_device.
– Eliminated unused members mem_domain and mem_align from struct isp4if_gpu_mem_info.
– Deleted unused fields mc_addr and gpu_pkg from struct isp4if_cmd_element.
– Removed obsolete pltf_data, i2c_nb, and notifier elements from struct isp4_device.
– Updated platform_get_irq failure handling to return its actual result rather than -ENODEV.
– Refined inclusion of header files for clarity and efficiency.
– Appended comments following #endif statements in header files.
– Improved implementation of isp4if_gpu_mem_free and isp4if_dealloc_fw_gpumem.
– Removed isp4if_append_cmd_2_cmdq and revised isp4if_send_fw_cmd accordingly.
– Enhanced isp4if_clear_cmdq and isp4if_clear_bufq by eliminating unnecessary list_del operations.
– Adopted completion mechanism instead of wait queue and condition for command completion notifications.
– Employed memset to ensure proper zeroing of padding bits in structures shared between ISP driver and firmware.
– Streamlined IRQs, reducing total from four to two, retaining only essential ones.
– Optimized IRQ handler logic using a while loop for greater efficiency.
– Introduced dynamic IRQ enable/disable functionality based on camera status (open/close).
– Applied distinct identifiers to differentiate multiple threads and IRQs.
– Removed unnecessary initialization of local variables.
– Refined camera start/stop workflow to mitigate potential synchronization concerns.
– Replaced all remaining mutex with guard mutex.
– Enhanced command and buffer queue performance by substituting mutexes with spinlocks.
– Removed redundant isp4sd_init_meta_buf function and its references.
– Limited firmware logging activities to the stream1 thread.
– Relocated v4l2_device_unregister_subdev() and media_entity_cleanup() calls from isp4_capture_remove to isp4sd_deinit.
– Resolved media device registration sequence issues.
– Modified stream processing thread behavior to await IRQ without a timeout.
– Addressed cleanup procedures in video device initialization and deinitialization routines.
– Corrected typos and made other cosmetic improvements.
Those wanting to try out this latest AMD ISP4 driver code can find it on the Linux kernel mailing list.
Here’s to hoping the AMD ISP4 driver will be deemed ready for mainlining in time for the Linux v6.19 kernel cycle. Unfortunately I had to send back my HP ZBook Ultra G1a Ryzen AI Max+ PRO 395 review unit so I’m unable to test these latest patches.
