Re: [PATCH v4 5/5] media: qcom: jpeg: Add Qualcomm JPEG V4L2 encoder

From: Atanas Filipov

Date: Mon Jul 13 2026 - 04:31:36 EST


On 7/6/2026 3:19 PM, Krzysztof Kozlowski wrote:
On 06/07/2026 09:11, Atanas Filipov wrote:
Add a Qualcomm JPEG encoder driver implemented on top of the
V4L2 mem2mem framework.

The driver wires vb2 queue handling, format negotiation, JPEG header
handling, interrupt-driven job completion, and runtime PM/clock/ICC
integration for the standalone JPEG encode hardware block.

This series targets SM8250 (Kona) platforms.

The jpeg-encoder node is described as a child node of the CAMSS block
and is probed automatically via of_platform_populate() in camss_probe().

Usage examples:

- Check of related video node: v4l2-ctl --list-devices
The expected result:
qcom-jpeg-enc (platform:qcom-jpeg-enc):
/dev/videoX

V4L2 Examples:

v4l2-ctl -d /dev/video14 \
--set-fmt-video-out=width=1920,height=1080,pixelformat=NM12 \
--stream-mmap --stream-out-mmap

v4l2-ctl -d /dev/video14 \
-c compression_quality=100 \
--set-fmt-video-out=width=1920,height=1080,pixelformat=NM12 \
--stream-mmap --stream-out-mmap \
--stream-count=100

v4l2-ctl -d /dev/video14 \
--set-fmt-video-out=width=1920,height=1080,pixelformat=NM12 \
--stream-mmap --stream-out-mmap \
--set-ctrl=perf_level_auto=1 \
--set-ctrl=fps_target=30 \
--stream-count=100

v4l2-ctl -d /dev/video14 \
--set-fmt-video-out=width=8192,height=8192,pixelformat=NM12 \
--stream-mmap --stream-out-mmap \
--stream-count=1 \
--stream-to=8192x8192_NM12.jpg

v4l2-ctl -d /dev/video14 \
--set-fmt-video-out=width=8192,height=8192,pixelformat=GREY \
--stream-mmap --stream-out-mmap \
--stream-count=1 \
--stream-to=OUT_8192x8192.jpg

v4l2-ctl -d /dev/video14 \
-c compression_quality=100 \
--set-fmt-video-out=width=1920,height=1088,pixelformat=NM12 \
--stream-mmap=4 --stream-out-mmap=4 \
--stream-count=100 \
--stream-out-pattern=21 \
--stream-to=OUT_1920x1088_100F.mjpg

GStreamer examples:

gst-launch-1.0 videotestsrc \
is-live=false pattern=ball num-buffers=50 ! \
video/x-raw,format=NV12,width=1920,height=1080 ! \
videoscale ! videoconvert ! \
video/x-raw,format=NV12,width=1920,height=1088 ! \
v4l2jpegenc ! \
fakesink sync=false

gst-launch-1.0 videotestsrc is-live=true pattern=smpte ! \
video/x-raw,format=NV12,width=1920,height=1088 ! \
v4l2jpegenc extra-controls="controls,compression_quality=85" ! \
fpsdisplaysink -v sync=false

Performance measurements on SM8250
(NV12, quality=100, GStreamer v4l2jpegenc vs jpegenc):

+------------+-----------------------------+-------------------+
| Resolution | HW v4l2jpegenc (q100) | SW jpegenc (q100) |
| | Execution | avrFPS | maxFPS | Execution | FPS |
+------------+-----------+--------+--------+-----------+-------+
| 512x512 | 2.2332 | 1139.1 | 1195.4 | 7.1055 | 358.0 |
| 1280x720 | 1.7300 | 418.5 | 457.2 | 5.0585 | 143.1 |
| 1024x1024 | 1.6991 | 374.3 | 397.4 | 4.7304 | 134.4 |
| 1920x1088 | 1.6596 | 192.8 | 193.8 | 3.7913 | 84.4 |
| 2048x2048 | 1.7277 | 92.0 | 91.6 | 3.6343 | 43.7 |
| 4096x4096 | 1.5887 | 25.2 | 25.3 | 4.2163 | 9.5 |
| 8192x8192 | 1.3104 | 7.6 | 8.0 | 2.9987 | 3.3 |
+------------+-----------+--------+--------+-----------+-------+

Signed-off-by: Atanas Filipov <atanas.filipov@xxxxxxxxxxxxxxxx>
---
.../bindings/media/qcom,jpeg-encoder.yaml | 143 +-


NAK


...


diff --git a/drivers/media/platform/qcom/Kconfig b/drivers/media/platform/qcom/Kconfig
index 4f4d3a68e6e5..f33d53a754a0 100644
--- a/drivers/media/platform/qcom/Kconfig
+++ b/drivers/media/platform/qcom/Kconfig
@@ -5,3 +5,4 @@ comment "Qualcomm media platform drivers"
source "drivers/media/platform/qcom/camss/Kconfig"
source "drivers/media/platform/qcom/iris/Kconfig"
source "drivers/media/platform/qcom/venus/Kconfig"
+source "drivers/media/platform/qcom/jpeg/Kconfig"

Just like for other patch, you ignored reviewers' feedback.

I already asked you to go through previous comments around v3. I do not
see improvements, so I assume you do it deliberately.

NAK

Best regards,
Krzysztof

Acknowledged. Inline replies to all previous comments have been sent.
v5 will address all outstanding items.

Best regards,
Atanas