diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2011-04-08 09:11:43 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-04-19 16:01:53 -0300 |
commit | 045030fa16648449b416d4fc8dcc54bfefd6f4aa (patch) | |
tree | 293ee918e8b1a754906b8122756ababc5a5756e6 /drivers/media/video/s5p-fimc/fimc-capture.c | |
parent | c4a627333f0d952c5e10c02609493fa63b5c7b28 (diff) | |
download | lwn-045030fa16648449b416d4fc8dcc54bfefd6f4aa.tar.gz lwn-045030fa16648449b416d4fc8dcc54bfefd6f4aa.zip |
[media] s5p-fimc: Fix bytesperline and plane payload setup
Make sure the sizeimage for 3-planar color formats is
width * height * 3/2 and the bytesperline is same for each
plane in case of a multi-planar format.
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/video/s5p-fimc/fimc-capture.c')
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 00c561ca3870..d142b40ea64e 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c @@ -539,8 +539,10 @@ static int fimc_cap_s_fmt_mplane(struct file *file, void *priv, return -EINVAL; } - for (i = 0; i < frame->fmt->colplanes; i++) - frame->payload[i] = pix->plane_fmt[i].bytesperline * pix->height; + for (i = 0; i < frame->fmt->colplanes; i++) { + frame->payload[i] = + (pix->width * pix->height * frame->fmt->depth[i]) >> 3; + } /* Output DMA frame pixel size and offsets. */ frame->f_width = pix->plane_fmt[0].bytesperline * 8 |