From: Philipp Zabel <p.zabel@pengutronix.de>
To: Steve Longerbeam <slongerbeam@gmail.com>, linux-media@vger.kernel.org
Cc: "open list:STAGING SUBSYSTEM" <devel@driverdev.osuosl.org>,
"open list:FRAMEBUFFER LAYER" <linux-fbdev@vger.kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:DRM DRIVERS FOR FREESCALE IMX"
<dri-devel@lists.freedesktop.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH v4 03/11] gpu: ipu-v3: Add planar support to interlaced scan
Date: Fri, 05 Oct 2018 09:48:57 +0000 [thread overview]
Message-ID: <1538732937.3545.8.camel@pengutronix.de> (raw)
In-Reply-To: <20181004185401.15751-4-slongerbeam@gmail.com>
On Thu, 2018-10-04 at 11:53 -0700, Steve Longerbeam wrote:
> To support interlaced scan with planar formats, cpmem SLUV must
> be programmed with the correct chroma line stride. For full and
> partial planar 4:2:2 (YUV422P, NV16), chroma line stride must
> be doubled. For full and partial planar 4:2:0 (YUV420, YVU420, NV12),
> chroma line stride must _not_ be doubled, since a single chroma line
> is shared by two luma lines.
>
> Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
> ---
> drivers/gpu/ipu-v3/ipu-cpmem.c | 26 +++++++++++++++++++--
> drivers/staging/media/imx/imx-ic-prpencvf.c | 3 ++-
> drivers/staging/media/imx/imx-media-csi.c | 3 ++-
> include/video/imx-ipu-v3.h | 3 ++-
> 4 files changed, 30 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
> index a9d2501500a1..d41df8034c5b 100644
> --- a/drivers/gpu/ipu-v3/ipu-cpmem.c
> +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
> @@ -273,9 +273,10 @@ void ipu_cpmem_set_uv_offset(struct ipuv3_channel *ch, u32 u_off, u32 v_off)
> }
> EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset);
>
> -void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride)
> +void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride,
> + u32 pixelformat)
> {
> - u32 ilo, sly;
> + u32 ilo, sly, sluv;
>
> if (stride < 0) {
> stride = -stride;
> @@ -286,9 +287,30 @@ void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride)
>
> sly = (stride * 2) - 1;
>
> + switch (pixelformat) {
> + case V4L2_PIX_FMT_YUV420:
> + case V4L2_PIX_FMT_YVU420:
> + sluv = stride / 2 - 1;
> + break;
> + case V4L2_PIX_FMT_NV12:
> + sluv = stride - 1;
> + break;
> + case V4L2_PIX_FMT_YUV422P:
> + sluv = stride - 1;
> + break;
> + case V4L2_PIX_FMT_NV16:
> + sluv = stride * 2 - 1;
> + break;
> + default:
> + sluv = 0;
> + break;
> + }
> +
> ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1);
> ipu_ch_param_write_field(ch, IPU_FIELD_ILO, ilo);
> ipu_ch_param_write_field(ch, IPU_FIELD_SLY, sly);
> + if (sluv)
> + ipu_ch_param_write_field(ch, IPU_FIELD_SLUV, sluv);
> };
> EXPORT_SYMBOL_GPL(ipu_cpmem_interlaced_scan);
[...]
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
and
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
to be merged with the rest of the series via the media tree. I'll take
care not to introduce nontrivial conflicts in imx-drm.
regards
Philipp
next prev parent reply other threads:[~2018-10-05 9:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20181004185401.15751-1-slongerbeam@gmail.com>
2018-10-04 18:53 ` [PATCH v4 02/11] gpu: ipu-csi: Swap fields according to input/output field types Steve Longerbeam
2018-10-05 9:44 ` Philipp Zabel
2018-10-08 21:59 ` Steve Longerbeam
2018-10-04 18:53 ` [PATCH v4 03/11] gpu: ipu-v3: Add planar support to interlaced scan Steve Longerbeam
2018-10-05 9:48 ` Philipp Zabel [this message]
2018-10-09 0:09 ` Steve Longerbeam
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=1538732937.3545.8.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=b.zolnierkie@samsung.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=slongerbeam@gmail.com \
/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).