summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vsp1/vsp1_drv.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-08-02 18:37:01 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-19 09:29:32 -0200
commitf3af9572e85447102202c644c50c7460009d1cae (patch)
treeff998c288a0d395a20f9ad261c76f2a47abc77fb /drivers/media/platform/vsp1/vsp1_drv.c
parentbabca007e7c7943215052c95bebfdaac0ca0db7c (diff)
[media] v4l: vsp1: Add VSP+DU support
Implement internal control of the VSP pipeline to be used by the DU DRM/KMS driver when using the VSP as an internal composer handled through DRM/KMS only. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_drv.c')
-rw-r--r--drivers/media/platform/vsp1/vsp1_drv.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index 1e10fc4723c5..74b5920e516b 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -25,6 +25,7 @@
#include "vsp1.h"
#include "vsp1_bru.h"
+#include "vsp1_drm.h"
#include "vsp1_hsit.h"
#include "vsp1_lif.h"
#include "vsp1_lut.h"
@@ -120,7 +121,7 @@ static int vsp1_create_sink_links(struct vsp1_device *vsp1,
return 0;
}
-static int vsp1_create_links(struct vsp1_device *vsp1)
+static int vsp1_uapi_create_links(struct vsp1_device *vsp1)
{
struct vsp1_entity *entity;
unsigned int i;
@@ -145,9 +146,6 @@ static int vsp1_create_links(struct vsp1_device *vsp1)
return ret;
}
- if (!vsp1->pdata.uapi)
- return 0;
-
for (i = 0; i < vsp1->pdata.rpf_count; ++i) {
struct vsp1_rwpf *rpf = vsp1->rpf[i];
@@ -360,15 +358,22 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
}
/* Create links. */
- ret = vsp1_create_links(vsp1);
+ if (vsp1->pdata.uapi)
+ ret = vsp1_uapi_create_links(vsp1);
+ else
+ ret = vsp1_drm_create_links(vsp1);
if (ret < 0)
goto done;
- if (vsp1->pdata.uapi) {
+ /* Register subdev nodes if the userspace API is enabled or initialize
+ * the DRM pipeline otherwise.
+ */
+ if (vsp1->pdata.uapi)
ret = v4l2_device_register_subdev_nodes(&vsp1->v4l2_dev);
- if (ret < 0)
- goto done;
- }
+ else
+ ret = vsp1_drm_init(vsp1);
+ if (ret < 0)
+ goto done;
ret = media_device_register(mdev);