From: Magnus Damm <magnus.damm@gmail.com>
To: linux-media@vger.kernel.org
Cc: hverkuil@xs4all.nl, Magnus Damm <magnus.damm@gmail.com>,
m-karicheri2@ti.com, g.liakhovetski@gmx.de,
mchehab@infradead.org
Subject: [PATCH] sh_mobile_ceu_camera: Remove frame size page alignment
Date: Wed, 09 Dec 2009 22:16:24 +0900 [thread overview]
Message-ID: <20091209131624.8044.18187.sendpatchset@rxone.opensource.se> (raw)
From: Magnus Damm <damm@opensource.se>
This patch updates the SuperH Mobile CEU driver to
not page align the frame size. Useful in the case of
USERPTR with non-page aligned frame sizes and offsets.
Signed-off-by: Magnus Damm <damm@opensource.se>
---
drivers/media/video/sh_mobile_ceu_camera.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- 0010/drivers/media/video/sh_mobile_ceu_camera.c
+++ work/drivers/media/video/sh_mobile_ceu_camera.c 2009-12-09 17:54:37.000000000 +0900
@@ -199,14 +199,13 @@ static int sh_mobile_ceu_videobuf_setup(
struct sh_mobile_ceu_dev *pcdev = ici->priv;
int bytes_per_pixel = (icd->current_fmt->depth + 7) >> 3;
- *size = PAGE_ALIGN(icd->user_width * icd->user_height *
- bytes_per_pixel);
+ *size = icd->user_width * icd->user_height * bytes_per_pixel;
if (0 == *count)
*count = 2;
if (pcdev->video_limit) {
- while (*size * *count > pcdev->video_limit)
+ while (PAGE_ALIGN(*size) * *count > pcdev->video_limit)
(*count)--;
}
next reply other threads:[~2009-12-09 13:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-09 13:16 Magnus Damm [this message]
2009-12-10 13:06 ` [PATCH] sh_mobile_ceu_camera: Remove frame size page alignment Guennadi Liakhovetski
2009-12-11 3:26 ` Magnus Damm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091209131624.8044.18187.sendpatchset@rxone.opensource.se \
--to=magnus.damm@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox