Skip to content

Commit 5a245d3

Browse files
ldtsgouravk-qualcomm
authored andcommitted
BACKPORT: media: venus: assign unique bus_info strings for encoder and decoder
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> Link: https://lore.kernel.org/all/20251126140041.754071-1-jorge.ramirez@oss.qualcomm.com/ (cherry picked from commit 66c744e)
1 parent 39ef4f7 commit 5a245d3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

drivers/media/platform/qcom/venus/vdec.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,13 @@ vdec_g_selection(struct file *file, void *fh, struct v4l2_selection *s)
435435
static int
436436
vdec_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
437437
{
438+
struct venus_inst *inst = to_inst(file);
439+
struct venus_core *core = inst->core;
440+
438441
strscpy(cap->driver, "qcom-venus", sizeof(cap->driver));
439442
strscpy(cap->card, "Qualcomm Venus video decoder", sizeof(cap->card));
440-
strscpy(cap->bus_info, "platform:qcom-venus", sizeof(cap->bus_info));
443+
snprintf(cap->bus_info, sizeof(cap->bus_info),
444+
"plat:%s:dec", dev_name(core->dev));
441445

442446
return 0;
443447
}

drivers/media/platform/qcom/venus/venc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,13 @@ static int venc_v4l2_to_hfi(int id, int value)
144144
static int
145145
venc_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
146146
{
147+
struct venus_inst *inst = to_inst(file);
148+
struct venus_core *core = inst->core;
149+
147150
strscpy(cap->driver, "qcom-venus", sizeof(cap->driver));
148151
strscpy(cap->card, "Qualcomm Venus video encoder", sizeof(cap->card));
149-
strscpy(cap->bus_info, "platform:qcom-venus", sizeof(cap->bus_info));
152+
snprintf(cap->bus_info, sizeof(cap->bus_info),
153+
"plat:%s:enc", dev_name(core->dev));
150154

151155
return 0;
152156
}

0 commit comments

Comments
 (0)