All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Steve Longerbeam <slongerbeam@gmail.com>, linux-media@vger.kernel.org
Cc: Steve Longerbeam <steve_longerbeam@mentor.com>,
	"open list:DRM DRIVERS FOR FREESCALE IMX" 
	<dri-devel@lists.freedesktop.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 05/14] gpu: ipu-v3: Allow negative offsets for interlaced scanning
Date: Thu, 02 Aug 2018 11:46:22 +0200	[thread overview]
Message-ID: <1533203182.3516.12.camel@pengutronix.de> (raw)
In-Reply-To: <1533150747-30677-6-git-send-email-steve_longerbeam@mentor.com>

On Wed, 2018-08-01 at 12:12 -0700, Steve Longerbeam wrote:
> From: Philipp Zabel <p.zabel@pengutronix.de>
> 
> The IPU also supports interlaced buffers that start with the bottom field.
> To achieve this, the the base address EBA has to be increased by a stride
> length and the interlace offset ILO has to be set to the negative stride.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
> ---
>  drivers/gpu/ipu-v3/ipu-cpmem.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
> index e68e473..8cd9e37 100644
> --- a/drivers/gpu/ipu-v3/ipu-cpmem.c
> +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
> @@ -269,9 +269,20 @@ EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset);
>  
>  void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride)
>  {
> +	u32 ilo, sly;
> +
> +	if (stride < 0) {
> +		stride = -stride;
> +		ilo = 0x100000 - (stride / 8);
> +	} else {
> +		ilo = stride / 8;
> +	}
> +
> +	sly = (stride * 2) - 1;
> +
>  	ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1);
> -	ipu_ch_param_write_field(ch, IPU_FIELD_ILO, stride / 8);
> -	ipu_ch_param_write_field(ch, IPU_FIELD_SLY, (stride * 2) - 1);
> +	ipu_ch_param_write_field(ch, IPU_FIELD_ILO, ilo);
> +	ipu_ch_param_write_field(ch, IPU_FIELD_SLY, sly);
>  };
>  EXPORT_SYMBOL_GPL(ipu_cpmem_interlaced_scan);

This patch is merged in drm-next: 4e3c5d7e05be ("gpu: ipu-v3: Allow
negative offsets for interlaced scanning")

regards
Philipp

WARNING: multiple messages have this Message-ID (diff)
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Steve Longerbeam <slongerbeam@gmail.com>, linux-media@vger.kernel.org
Cc: Steve Longerbeam <steve_longerbeam@mentor.com>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM DRIVERS FOR FREESCALE IMX"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v3 05/14] gpu: ipu-v3: Allow negative offsets for interlaced scanning
Date: Thu, 02 Aug 2018 11:46:22 +0200	[thread overview]
Message-ID: <1533203182.3516.12.camel@pengutronix.de> (raw)
In-Reply-To: <1533150747-30677-6-git-send-email-steve_longerbeam@mentor.com>

On Wed, 2018-08-01 at 12:12 -0700, Steve Longerbeam wrote:
> From: Philipp Zabel <p.zabel@pengutronix.de>
> 
> The IPU also supports interlaced buffers that start with the bottom field.
> To achieve this, the the base address EBA has to be increased by a stride
> length and the interlace offset ILO has to be set to the negative stride.
> 
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
> ---
>  drivers/gpu/ipu-v3/ipu-cpmem.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
> index e68e473..8cd9e37 100644
> --- a/drivers/gpu/ipu-v3/ipu-cpmem.c
> +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
> @@ -269,9 +269,20 @@ EXPORT_SYMBOL_GPL(ipu_cpmem_set_uv_offset);
>  
>  void ipu_cpmem_interlaced_scan(struct ipuv3_channel *ch, int stride)
>  {
> +	u32 ilo, sly;
> +
> +	if (stride < 0) {
> +		stride = -stride;
> +		ilo = 0x100000 - (stride / 8);
> +	} else {
> +		ilo = stride / 8;
> +	}
> +
> +	sly = (stride * 2) - 1;
> +
>  	ipu_ch_param_write_field(ch, IPU_FIELD_SO, 1);
> -	ipu_ch_param_write_field(ch, IPU_FIELD_ILO, stride / 8);
> -	ipu_ch_param_write_field(ch, IPU_FIELD_SLY, (stride * 2) - 1);
> +	ipu_ch_param_write_field(ch, IPU_FIELD_ILO, ilo);
> +	ipu_ch_param_write_field(ch, IPU_FIELD_SLY, sly);
>  };
>  EXPORT_SYMBOL_GPL(ipu_cpmem_interlaced_scan);

This patch is merged in drm-next: 4e3c5d7e05be ("gpu: ipu-v3: Allow
negative offsets for interlaced scanning")

regards
Philipp
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-08-02  9:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 19:12 [PATCH v3 00/14] imx-media: Fixes for interlaced capture Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 01/14] media: videodev2.h: Add more field helper macros Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 02/14] gpu: ipu-csi: Check for field type alternate Steve Longerbeam
2018-08-01 19:12   ` Steve Longerbeam
2018-08-02  9:42   ` Philipp Zabel
2018-08-02  9:42     ` Philipp Zabel
2018-08-02  9:42     ` Philipp Zabel
2018-08-04 19:08     ` Steve Longerbeam
2018-08-04 19:08       ` Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 03/14] gpu: ipu-csi: Swap fields according to input/output field types Steve Longerbeam
2018-08-01 19:12   ` Steve Longerbeam
2018-08-01 19:12   ` Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 04/14] gpu: ipu-v3: Fix U/V offset macros for planar 4:2:0 Steve Longerbeam
2018-08-01 19:12   ` Steve Longerbeam
2018-08-02  9:51   ` Philipp Zabel
2018-08-02  9:51     ` Philipp Zabel
2018-08-02  9:51     ` Philipp Zabel
2018-08-01 19:12 ` [PATCH v3 05/14] gpu: ipu-v3: Allow negative offsets for interlaced scanning Steve Longerbeam
2018-08-01 19:12   ` Steve Longerbeam
2018-08-02  9:46   ` Philipp Zabel [this message]
2018-08-02  9:46     ` Philipp Zabel
2018-08-02  9:46     ` Philipp Zabel
2018-08-04 19:25     ` Steve Longerbeam
2018-08-04 19:25       ` Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 06/14] gpu: ipu-v3: Add planar support to interlaced scan Steve Longerbeam
2018-08-01 19:12   ` Steve Longerbeam
2018-08-01 19:12   ` Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 07/14] media: imx: Fix field negotiation Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 08/14] media: imx-csi: Double crop height for alternate fields at sink Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 09/14] media: imx: interweave and odd-chroma-row skip are incompatible Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 10/14] media: imx-csi: Allow skipping odd chroma rows for YVU420 Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 11/14] media: imx: vdic: rely on VDIC for correct field order Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 12/14] media: imx-csi: Move crop/compose reset after filling default mbus fields Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 13/14] media: imx: Allow interweave with top/bottom lines swapped Steve Longerbeam
2018-08-01 19:12 ` [PATCH v3 14/14] media: imx.rst: Update doc to reflect fixes to interlaced capture Steve Longerbeam
2018-10-01 10:07 ` [PATCH v3 00/14] imx-media: Fixes for " Hans Verkuil
2018-10-03 23:21   ` Steve Longerbeam
2018-10-04 13:41     ` Hans Verkuil
2018-10-04 18:26       ` 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=1533203182.3516.12.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=slongerbeam@gmail.com \
    --cc=steve_longerbeam@mentor.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.