All of lore.kernel.org
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
	linux-samsung-soc@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, m.szyprowski@samsung.com
Subject: Re: [PATCH 4/8] drm/exynos: mixer: remove src offset from mixer_graph_buffer()
Date: Fri, 11 Aug 2017 17:12:14 +0900	[thread overview]
Message-ID: <598D66DE.2090006@samsung.com> (raw)
In-Reply-To: <20170809114857.4945-5-tjakobi@math.uni-bielefeld.de>



2017년 08월 09일 20:48에 Tobias Jakobi 이(가) 쓴 글:
> We always translate the dma address such that the offsets of
> the source image are zero. Hence we can remove manipulation of
> the MXR_GRAPHIC_SXY(win) register.
> 
> We leave the register defines (in regs_mixer.h) in place, since
> they document the hardware.
> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  drivers/gpu/drm/exynos/exynos_mixer.c | 11 ++---------
>  1 file changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 8d68de85bada..28fbe79befff 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -584,7 +584,7 @@ static void mixer_graph_buffer(struct mixer_context *ctx,
>  	unsigned long flags;
>  	unsigned int win = plane->index;
>  	unsigned int x_ratio = 0, y_ratio = 0;
> -	unsigned int src_x_offset, src_y_offset, dst_x_offset, dst_y_offset;
> +	unsigned int dst_x_offset, dst_y_offset;
>  	dma_addr_t dma_addr;
>  	unsigned int fmt;
>  	u32 val;
> @@ -618,12 +618,10 @@ static void mixer_graph_buffer(struct mixer_context *ctx,
>  	dst_x_offset = state->crtc.x;
>  	dst_y_offset = state->crtc.y;
>  
> -	/* converting dma address base and source offset */
> +	/* translate dma address base s.t. the source image offset is zero */
>  	dma_addr = exynos_drm_fb_dma_addr(fb, 0)
>  		+ (state->src.x * fb->format->cpp[0])
>  		+ (state->src.y * fb->pitches[0]);
> -	src_x_offset = 0;
> -	src_y_offset = 0;
>  
>  	if (mode->flags & DRM_MODE_FLAG_INTERLACE)
>  		__set_bit(MXR_BIT_INTERLACE, &ctx->flags);
> @@ -654,11 +652,6 @@ static void mixer_graph_buffer(struct mixer_context *ctx,
>  	val |= MXR_GRP_WH_V_SCALE(y_ratio);
>  	mixer_reg_write(res, MXR_GRAPHIC_WH(win), val);
>  
> -	/* setup offsets in source image */
> -	val  = MXR_GRP_SXY_SX(src_x_offset);
> -	val |= MXR_GRP_SXY_SY(src_y_offset);
> -	mixer_reg_write(res, MXR_GRAPHIC_SXY(win), val);

The offset of source buffer can be set at bootloader so previous value can be keeped. I think MXR_GRAPHIC_SXY register should be cleared at mixer_win_reset function if you want to remove above lines.

> -
>  	/* setup offsets in display image */
>  	val  = MXR_GRP_DXY_DX(dst_x_offset);
>  	val |= MXR_GRP_DXY_DY(dst_y_offset);
> 

  reply	other threads:[~2017-08-11  8:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 11:48 [PATCH 0/8] drm/exynos: misc fixes and more Tobias Jakobi
2017-08-09 11:48 ` [PATCH 1/8] drm/exynos: mixer: fix chroma comment in vp_video_buffer() Tobias Jakobi
2017-08-09 11:48 ` [PATCH 2/8] drm/exynos: mixer: enable NV12MT support for the video plane Tobias Jakobi
2017-08-09 11:48 ` [PATCH 3/8] drm/exynos: mixer: simplify {vp_video, mixer_graph}_buffer() Tobias Jakobi
2017-08-11  8:04   ` [PATCH 3/8] drm/exynos: mixer: simplify {vp_video,mixer_graph}_buffer() Inki Dae
2017-08-11 11:43     ` Tobias Jakobi
2017-08-09 11:48 ` [PATCH 4/8] drm/exynos: mixer: remove src offset from mixer_graph_buffer() Tobias Jakobi
2017-08-11  8:12   ` Inki Dae [this message]
2017-08-11 11:43     ` Tobias Jakobi
2017-08-09 11:48 ` [PATCH 5/8] drm/exynos: introduce BYTE_PITCH capability Tobias Jakobi
2017-08-11  8:23   ` Inki Dae
2017-08-11 11:44     ` Tobias Jakobi
2017-08-09 11:48 ` [PATCH 6/8] drm/exynos: add BYTE_PITCH cap for all supported planes Tobias Jakobi
2017-08-09 11:48 ` [PATCH 7/8] drm/exynos: consistent use of cpp Tobias Jakobi
2017-08-09 11:48 ` [PATCH 8/8] drm/exynos: simplify set_pixfmt() in DECON and FIMD drivers Tobias Jakobi

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=598D66DE.2090006@samsung.com \
    --to=inki.dae@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=tjakobi@math.uni-bielefeld.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 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.