提交 aa0bad33 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

[media] v4l: vsp1: Don't register media device when userspace API is disabled

The media device doesn't need to be exposed to userspace when the VSP is
fully controlled by the DU driver. Don't register it in that case.
Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 078e0499
...@@ -206,6 +206,7 @@ static void vsp1_destroy_entities(struct vsp1_device *vsp1) ...@@ -206,6 +206,7 @@ static void vsp1_destroy_entities(struct vsp1_device *vsp1)
} }
v4l2_device_unregister(&vsp1->v4l2_dev); v4l2_device_unregister(&vsp1->v4l2_dev);
if (vsp1->info->uapi)
media_device_unregister(&vsp1->media_dev); media_device_unregister(&vsp1->media_dev);
media_device_cleanup(&vsp1->media_dev); media_device_cleanup(&vsp1->media_dev);
...@@ -381,14 +382,15 @@ static int vsp1_create_entities(struct vsp1_device *vsp1) ...@@ -381,14 +382,15 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
/* Register subdev nodes if the userspace API is enabled or initialize /* Register subdev nodes if the userspace API is enabled or initialize
* the DRM pipeline otherwise. * the DRM pipeline otherwise.
*/ */
if (vsp1->info->uapi) if (vsp1->info->uapi) {
ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev); ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev);
else
ret = vsp1_drm_init(vsp1);
if (ret < 0) if (ret < 0)
goto done; goto done;
ret = media_device_register(mdev); ret = media_device_register(mdev);
} else {
ret = vsp1_drm_init(vsp1);
}
done: done:
if (ret < 0) if (ret < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册