Re: [PATCH 00/33] Qualcomm video decoder/encoder driver

From: Stanimir Varbanov
Date: Mon Aug 14 2023 - 08:59:06 EST


Hi Dmitry,

On 28.07.23 г. 17:01 ч., Dmitry Baryshkov wrote:
On 28/07/2023 16:23, Vikash Garodia wrote:
This patch series introduces support for Qualcomm new video acceleration
hardware architecture, used for video stream decoding/encoding. This driver
is based on new communication protocol between video hardware and application
processor.

This driver comes with below capabilities:
- V4L2 complaint video driver with M2M and STREAMING capability.
- Supports H264, H265, VP9 decoders.
- Supports H264, H265 encoders.

Please describe, why is it impossible to support this hardware in the venus driver. We do not usually add new drivers for the new generations of the hardware, unless it is fully incompatible with the previous generations. Let me point you to camss or drm/msm drivers. They have successfully solved the issue of supporting multiple generations of the hardware in the same driver.

Unless the "iris3" is completely different from all the previous generations, I strongly suggest spending time on restructuring existing venus driver and then adding support for the new hardware there instead of dumping out something completely new.

AFAIK the major differences are HW IP and firmware interface (by firmware interface I mean a protocol, API and API behavior). The firmware and its interface has been re-written to align closely with the current v4l2 specs for encoders/decoders state machines [1][2]. On the other side current mainline Venus driver firmware is following interface similar to OpenMAX.

There are incompatibilities between both firmware interfaces which cannot easily combined in a common driver. Even if there is a possibility to do that it will lead us to a unreadable driver source code and maintenance burden.

Vikash, could elaborate more on firmware interface differences.

[1] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/dev-decoder.html

[2] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/dev-encoder.html

--
regards,
Stan