summaryrefslogtreecommitdiff
path: root/drivers/media/platform/exynos4-is/media-dev.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-05-31 18:37:19 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-06-13 04:55:14 +0400
commit4403106d5cfeb438b19e492e29537a00f9b5495a (patch)
treecab14e097a78495b4d21307dcf610ffe138bd1a2 /drivers/media/platform/exynos4-is/media-dev.c
parentbc7584b0b7a99326d31195f81f7494efe9fe0c0f (diff)
downloadlinux-4403106d5cfeb438b19e492e29537a00f9b5495a.tar.xz
[media] exynos4-is: Preserve state of controls between /dev/video open/close
This patch moves the code for inheriting subdev v4l2 controls on the FIMC video capture nodes from open()/close() fops to the link setup notification callback. This allows for the state of the FIMC controls to be always kept, in opposite to the current situation when it is lost when last process closes video device. There is no visible change for the original V4L2 compliant interface. For the MC aware applications (user_subdev_api == true) inheriting of the controls is dropped, since there can be same controls on the subdevs withing single pipeline, now when the ISP (FIMC-IS) is also used. This patch is a prerequisite to allow /dev/video device to be opened without errors even if there is no media links connecting it to an image source (sensor) subdev. This is required for a libv4l2 plugin to be initialized while a video node is opened and it also should be possible to always open the device to query the capabilities. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is/media-dev.c')
-rw-r--r--drivers/media/platform/exynos4-is/media-dev.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c
index c20b2728d55b..7a562d289977 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -1272,8 +1272,6 @@ static int fimc_md_link_notify(struct media_pad *source,
if (!(flags & MEDIA_LNK_FL_ENABLED)) {
if (ref_count > 0) {
ret = __fimc_pipeline_close(pipeline);
- if (!ret && fimc)
- fimc_ctrls_delete(fimc->vid_cap.ctx);
}
for (i = 0; i < IDX_MAX; i++)
pipeline->subdevs[i] = NULL;
@@ -1285,8 +1283,6 @@ static int fimc_md_link_notify(struct media_pad *source,
*/
ret = __fimc_pipeline_open(pipeline,
source->entity, true);
- if (!ret && fimc)
- ret = fimc_capture_ctrls_create(fimc);
}
mutex_unlock(lock);