* [PATCH v2] media: venus: assign unique bus_info strings for encoder and decoder
@ 2025-11-26 14:00 Jorge Ramirez-Ortiz
2026-01-01 19:47 ` Jorge Ramirez
0 siblings, 1 reply; 2+ messages in thread
From: Jorge Ramirez-Ortiz @ 2025-11-26 14:00 UTC (permalink / raw)
To: jorge.ramirez, vikash.garodia, dikshita.agarwal, bod, mchehab
Cc: linux-media, linux-arm-msm, linux-kernel
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>
---
drivers/media/platform/qcom/venus/vdec.c | 6 +++++-
drivers/media/platform/qcom/venus/venc.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 4a6641fdffcf..16587767e597 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -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;
}
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index b478b982a80d..0b5843ba536f 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -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;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] media: venus: assign unique bus_info strings for encoder and decoder
2025-11-26 14:00 [PATCH v2] media: venus: assign unique bus_info strings for encoder and decoder Jorge Ramirez-Ortiz
@ 2026-01-01 19:47 ` Jorge Ramirez
0 siblings, 0 replies; 2+ messages in thread
From: Jorge Ramirez @ 2026-01-01 19:47 UTC (permalink / raw)
To: Jorge Ramirez-Ortiz
Cc: vikash.garodia, dikshita.agarwal, bod, mchehab, linux-media,
linux-arm-msm, linux-kernel
On 26/11/25 15:00:24, Jorge Ramirez-Ortiz wrote:
> 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>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 6 +++++-
> drivers/media/platform/qcom/venus/venc.c | 6 +++++-
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 4a6641fdffcf..16587767e597 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -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;
> }
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index b478b982a80d..0b5843ba536f 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -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;
> }
> --
> 2.43.0
>
just following up in case this one fell through the cracks (cant find it in media-commiters).
happy to resend if needed
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-01 19:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-26 14:00 [PATCH v2] media: venus: assign unique bus_info strings for encoder and decoder Jorge Ramirez-Ortiz
2026-01-01 19:47 ` Jorge Ramirez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox