Commit 74747315 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: align sizes returned by g_fmt

Repeat the same round logic used inside s_fmt here, for the sake
of sanity.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent fcb10617
...@@ -892,8 +892,8 @@ static int atomisp_g_fmt_cap(struct file *file, void *fh, ...@@ -892,8 +892,8 @@ static int atomisp_g_fmt_cap(struct file *file, void *fh,
} }
depth = atomisp_get_pixel_depth(f->fmt.pix.pixelformat); depth = atomisp_get_pixel_depth(f->fmt.pix.pixelformat);
f->fmt.pix.bytesperline = (f->fmt.pix.width * depth) >> 3; f->fmt.pix.bytesperline = DIV_ROUND_UP(f->fmt.pix.width * depth, 8);
f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline; f->fmt.pix.sizeimage = PAGE_ALIGN(f->fmt.pix.height * f->fmt.pix.bytesperline);
/* /*
* FIXME: do we need to setup this differently, depending on the * FIXME: do we need to setup this differently, depending on the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment