]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: venus: assign unique bus_info strings for encoder and decoder
authorJorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Wed, 26 Nov 2025 14:00:24 +0000 (15:00 +0100)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Tue, 20 Jan 2026 12:19:32 +0000 (13:19 +0100)
The Venus encoder and decoder video devices currently report the same
bus_info string ("platform:qcom-venus").

Assign unique bus_info identifiers by appending ":dec" and ":enc" to the
parent device name. With this change v4l2-ctl will display two separate
logical devices

Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Bryan O'Donoghue <bod@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/qcom/venus/vdec.c
drivers/media/platform/qcom/venus/venc.c

index 4cd69440e87532bb4f992f439a428105235de223..21ca4947a8491a5b1d2db704668fc86b1cc590b7 100644 (file)
@@ -433,9 +433,13 @@ vdec_g_selection(struct file *file, void *fh, struct v4l2_selection *s)
 static int
 vdec_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
 {
+       struct venus_inst *inst = to_inst(file);
+       struct venus_core *core = inst->core;
+
        strscpy(cap->driver, "qcom-venus", sizeof(cap->driver));
        strscpy(cap->card, "Qualcomm Venus video decoder", sizeof(cap->card));
-       strscpy(cap->bus_info, "platform:qcom-venus", sizeof(cap->bus_info));
+       snprintf(cap->bus_info, sizeof(cap->bus_info),
+                "plat:%s:dec", dev_name(core->dev));
 
        return 0;
 }
index b478b982a80daec54554e46f7c582a6f9b68e352..0b5843ba536f1f67e05bd5376a430c3118c61c08 100644 (file)
@@ -144,9 +144,13 @@ static int venc_v4l2_to_hfi(int id, int value)
 static int
 venc_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
 {
+       struct venus_inst *inst = to_inst(file);
+       struct venus_core *core = inst->core;
+
        strscpy(cap->driver, "qcom-venus", sizeof(cap->driver));
        strscpy(cap->card, "Qualcomm Venus video encoder", sizeof(cap->card));
-       strscpy(cap->bus_info, "platform:qcom-venus", sizeof(cap->bus_info));
+       snprintf(cap->bus_info, sizeof(cap->bus_info),
+                "plat:%s:enc", dev_name(core->dev));
 
        return 0;
 }