Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271770
b: refs/heads/master
c: e9e2108
h: refs/heads/master
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Sep 6, 2011
1 parent 26516c7 commit 270b7fd
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 81 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd323e28bd82dfd4b72c50ddc4d5fc24e3678b99
refs/heads/master: e9e21083ef9361f89e19bb709eac441edc24ba02
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ config VIDEO_MX2

config VIDEO_SAMSUNG_S5P_FIMC
tristate "Samsung S5P and EXYNOS4 camera host interface driver"
depends on VIDEO_DEV && VIDEO_V4L2 && PLAT_S5P
depends on VIDEO_V4L2 && PLAT_S5P && PM_RUNTIME
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
---help---
Expand Down
18 changes: 18 additions & 0 deletions trunk/drivers/media/video/s5p-fimc/fimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/clk.h>
Expand Down Expand Up @@ -271,6 +272,16 @@ static int stop_streaming(struct vb2_queue *q)
return fimc_stop_capture(fimc);
}

int fimc_capture_suspend(struct fimc_dev *fimc)
{
return -EBUSY;
}

int fimc_capture_resume(struct fimc_dev *fimc)
{
return 0;
}

static unsigned int get_plane_size(struct fimc_frame *fr, unsigned int plane)
{
if (!fr || plane >= fr->fmt->memplanes)
Expand Down Expand Up @@ -396,9 +407,14 @@ static int fimc_capture_open(struct file *file)
if (fimc_m2m_active(fimc))
return -EBUSY;

ret = pm_runtime_get_sync(&fimc->pdev->dev);
if (ret)
return ret;

if (++fimc->vid_cap.refcnt == 1) {
ret = fimc_isp_subdev_init(fimc, 0);
if (ret) {
pm_runtime_put_sync(&fimc->pdev->dev);
fimc->vid_cap.refcnt--;
return -EIO;
}
Expand Down Expand Up @@ -426,6 +442,8 @@ static int fimc_capture_close(struct file *file)
fimc_subdev_unregister(fimc);
}

pm_runtime_put(&fimc->pdev->dev);

return 0;
}

Expand Down
Loading

0 comments on commit 270b7fd

Please sign in to comment.