From: Philipp Zabel <p.zabel@pengutronix.de>
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
kernel@pengutronix.de, patchwork-lst@pengutronix.de,
Lucas Stach <l.stach@pengutronix.de>,
Philipp Zabel <p.zabel@pengutronix.de>
Subject: [PATCH v2 1/3] [media] coda: use correct offset for mvcol buffer
Date: Thu, 8 Jun 2017 10:55:11 +0200 [thread overview]
Message-ID: <20170608085513.26857-1-p.zabel@pengutronix.de> (raw)
From: Lucas Stach <l.stach@pengutronix.de>
The mvcol buffer needs to be placed behind the chroma plane(s), so
use the real offset including any required rounding.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
No changes since v1 [1].
[1] https://patchwork.linuxtv.org/patch/40604
---
drivers/media/platform/coda/coda-bit.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index 2ec41375a896f..325035bb0a777 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -427,14 +427,16 @@ static int coda_alloc_framebuffers(struct coda_ctx *ctx,
/* Register frame buffers in the parameter buffer */
for (i = 0; i < ctx->num_internal_frames; i++) {
- u32 y, cb, cr;
+ u32 y, cb, cr, mvcol;
/* Start addresses of Y, Cb, Cr planes */
y = ctx->internal_frames[i].paddr;
cb = y + ysize;
cr = y + ysize + ysize/4;
+ mvcol = y + ysize + ysize/4 + ysize/4;
if (ctx->tiled_map_type == GDI_TILED_FRAME_MB_RASTER_MAP) {
cb = round_up(cb, 4096);
+ mvcol = cb + ysize/2;
cr = 0;
/* Packed 20-bit MSB of base addresses */
/* YYYYYCCC, CCyyyyyc, cccc.... */
@@ -448,9 +450,7 @@ static int coda_alloc_framebuffers(struct coda_ctx *ctx,
/* mvcol buffer for h.264 */
if (ctx->codec->src_fourcc == V4L2_PIX_FMT_H264 &&
dev->devtype->product != CODA_DX6)
- coda_parabuf_write(ctx, 96 + i,
- ctx->internal_frames[i].paddr +
- ysize + ysize/4 + ysize/4);
+ coda_parabuf_write(ctx, 96 + i, mvcol);
}
/* mvcol buffer for mpeg4 */
--
2.11.0
next reply other threads:[~2017-06-08 8:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 8:55 Philipp Zabel [this message]
2017-06-08 8:55 ` [PATCH v2 2/3] [media] coda: first step at error recovery Philipp Zabel
2017-06-23 9:29 ` Hans Verkuil
2017-06-23 9:53 ` Philipp Zabel
2017-06-08 8:55 ` [PATCH v2 3/3] [media] coda/imx-vdoa: always wait for job completion Philipp Zabel
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=20170608085513.26857-1-p.zabel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=hverkuil@xs4all.nl \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=patchwork-lst@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).