media: venus: assign unique bus_info strings for encoder and decoder
Subsystems (4)
PATCH v2 1/1 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 <[email protected]>
Reviewed-by Bryan O'Donoghue <[email protected]>
--- drivers/media/platform/qcom/venus/vdec.c | 6 +++++- drivers/media/platform/qcom/venus/venc.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/media/platform/qcom/venus/vdec.c +5 -1
@@ -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 ; }
drivers/media/platform/qcom/venus/venc.c +5 -1
@@ -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 ; }
Signature · 1 line
2.43.0
Quoted 55 lines · Jorge Ramirez-Ortiz
The Venus encoder and decoder video devices currently report the same
bus_infostring ("platform:qcom-venus").Assign unique
bus_infoidentifiers by appending ":dec" and ":enc" to the parent device name. With this change v4l2-ctl will display two separate logical devicesSigned-off-by Jorge Ramirez-Ortiz <[email protected]>Reviewed-by Bryan O'Donoghue <[email protected]>--- drivers/media/platform/qcom/venus/vdec.c | 6 +++++- drivers/media/platform/qcom/venus/venc.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-)drivers/media/platform/qcom/venus/vdec.c +5
-1@@ -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 ; }drivers/media/platform/qcom/venus/venc.c +5
-1@@ -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 ; }Signature · 1 line
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