News: 0001595516

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

AMD ISP4 Linux Webcam Driver Updated For HP ZBook Ultra G1a & Future Ryzen Laptops

([AMD] 5 Hours Ago AMD ISP4 Driver)


We eagerly await to see if the [1]AMD ISP4 driver will be ready for mainlining in the imminent Linux v6.19 merge window but it's getting down to the wire and thus looking less likely it will make it unless action is taken in the coming days. Today though a sixth version of this AMD ISP4 image signal processor driver was posted for this last piece of the puzzle in enabling the web camera on the [2]HP ZBook Ultra G1a Strix Halo laptop as well as future Ryzen high-end laptops.

Getting this AMD ISP4 driver to the mainline kernel is all that's needed for getting the HP ZBook Ultra G1a laptop's web camera working nicely under Linux -- complete with working offloading unlike the latest Intel IPU-enabled web cameras relying on the CPU-based "Soft ISP" when relying on the open-source user-space software. For now the ISP4 IP is used by just the high-end HP ZBook Ultra G1a Ryzen AI Max+ PRO laptops but it's expected to be used by more next-generation AMD Ryzen laptops for a leading web camera experience. This is the last piece as well for making a nice well-rounded [3]Linux experience for the HP ZBook Ultra G1a with all of the other hardware support in great shape -- even LVFS/Fwupd support!

Posted this morning were the [4]v6 patches of this driver with a variety of small technical changes:

Changes v5 -> v6:

- Lowered FW mempool buffer size from 200M to 100M (actual usage).

- Added an irq_enabled member to the ISP subdev for proper IRQ disable handling in both normal and error cases.

- Removed unnecessary .owner assignment from isp4_capture_drv definition

- Updated IRQ handling to enable and disable interrupts via the ISP register for improved performance.

- Revised ring buffer management in isp4if_f2h_resp(), addressing safety checks to ensure the read pointer is validated before memcpy operations, reducing the risk of out-of-bounds access. The ring buffer logic was also streamlined significantly.

- Modified ring buffer handling in isp4if_is_cmdq_rb_full(), correcting an off-by-one error in safety checks that previously allowed rd_ptr to equal wr_ptr when the buffer was full.

- Refactored ring buffer handling in isp4if_insert_isp_fw_cmd(), simplifying overall logic.

- Resolved a regression from v4 to v5 where isp4if_dequeue_buffer() did not protect list_del with bufq_lock.

- Addressed a subtle use-after-free issue that could occur if a timeout on a synchronous command coincided with completion.

- Added missing pm_runtime_disable() calls to isp4_capture_remove() and to the error path in isp4_capture_probe().

- Removed stray semicolons following closing curly braces.

- Improved and clarified macro definitions in isp4_interface.h.

- Eliminated unnecessary (u8 *) casts.

- Added missing memset for firmware command structures in isp4sd_stop_stream().

- Excluded streams 2 and 3 from ISP4IF_FW_RESP_RB_IRQ_EN_MASK, preventing their activation in the interrupt enable register.

- Enhanced error handling to clean up kthreads in the event of startup failure.

- Corrected a race condition during kthread creation where waitqueue head initialization could be delayed, as it was performed by the kthread itself.

- Removed status checks in isp4sd_pwroff_and_deinit() that were always false.

- Ensured isp4sd_init_stream() is only invoked once per stream start and reordered corresponding status checks in isp4sd_start_stream().

- Improved error handling in isp4sd_start_stream() to propagate errors from failed functions.

- Relocated debugging messages in isp4sd_stop_stream() to execute under lock protection due to access to output_info->start_status.

- Eliminated redundant GET_REG_BASE() macros.

- Removed isp4sd_is_stream_running() function.

- Corrected error message in isp4sd_init_stream() caused by copy/paste.

- Refined struct isp4_interface to remove firmware ring buffer configurations.

- Removed obsolete isp4sd_is_stream_running function.

- Removed pdev member from struct isp4_device, as it is unnecessary.

- Fixed typo in 'isp_mmip' parameter name within isp4if_init().

- Removed gap in struct isp4_subdev definition.

- Performed extensive dead code removal and minor style improvements throughout the codebase.

Here's to hoping it's about ready to be merged. Sadly my HP ZBook Ultra G1a laptop with [5]AMD Ryzen AI Max+ PRO 395 "Strix Halo" review sample had to be returned back to HP thus unable to test these latest patches myself, but hopefully this open-source driver will be ready for the mainline kernel soon.

In somewhat related news, released yesterday is [6]libcamera 0.6 as the latest version for this open-source AMD library. The SoftISP is enhanced with this libcamera update, including for the Intel IPU7. Plus there are new tuning files for the Raspberry Pi and other hardware.



[1] https://www.phoronix.com/search/AMD+ISP4

[2] https://www.phoronix.com/search/HP+ZBook+Ultra+G1a

[3] https://www.phoronix.com/review/hp-zbook-ultra-g1a

[4] https://lore.kernel.org/lkml/20251128091929.165272-1-Bin.Du@amd.com/

[5] https://www.phoronix.com/review/amd-ryzen-ai-max-pro-395

[6] https://lists.libcamera.org/pipermail/libcamera-devel/2025-November/055244.html



<Midgar> From all the stereotypes about Aussies, I figure you guys are
really tough.
<Midgar> ;p
<krusto> we'll throw koala's at you