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>
This commit is contained in:
Jorge Ramirez-Ortiz 2025-11-26 15:00:24 +01:00 committed by Hans Verkuil
parent 63c072e293
commit 66c744e28b
2 changed files with 10 additions and 2 deletions

View 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;
}

View 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;
}