From 649a62bd595f439b9d4c4ae10cf8c324ff0c7b3b Mon Sep 17 00:00:00 2001 From: Sylwester Nawrocki Date: Mon, 23 May 2011 09:15:05 -0300 Subject: [PATCH] --- yaml --- r: 254619 b: refs/heads/master c: a629f86b4aa1669ddf2afaa3ded66d5a59d60b77 h: refs/heads/master i: 254617: 4b926b132f0a83f4fb2c56d58a2b81a5709f7922 254615: a431ad578cd5cb534cbf69efb29d89583b970806 v: v3 --- [refs] | 2 +- trunk/drivers/media/video/s5p-fimc/fimc-core.c | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index a0492daee516..b7e5a3f87741 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3495dcefeb3b5ab825788206d5b696be14f4de19 +refs/heads/master: a629f86b4aa1669ddf2afaa3ded66d5a59d60b77 diff --git a/trunk/drivers/media/video/s5p-fimc/fimc-core.c b/trunk/drivers/media/video/s5p-fimc/fimc-core.c index c427edd3cd5e..85b47a328a5d 100644 --- a/trunk/drivers/media/video/s5p-fimc/fimc-core.c +++ b/trunk/drivers/media/video/s5p-fimc/fimc-core.c @@ -704,22 +704,18 @@ static int fimc_queue_setup(struct vb2_queue *vq, unsigned int *num_buffers, f = ctx_get_frame(ctx, vq->type); if (IS_ERR(f)) return PTR_ERR(f); - /* * Return number of non-contigous planes (plane buffers) * depending on the configured color format. */ - if (f->fmt) - *num_planes = f->fmt->memplanes; + if (!f->fmt) + return -EINVAL; + *num_planes = f->fmt->memplanes; for (i = 0; i < f->fmt->memplanes; i++) { - sizes[i] = (f->width * f->height * f->fmt->depth[i]) >> 3; + sizes[i] = (f->f_width * f->f_height * f->fmt->depth[i]) / 8; allocators[i] = ctx->fimc_dev->alloc_ctx; } - - if (*num_buffers == 0) - *num_buffers = 1; - return 0; }