All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
	linux-samsung-soc@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, gustavo.padovan@collabora.co.uk,
	inki.dae@samsung.com
Subject: Re: [PATCH 2/2] drm/exynos: mixer: remove buffer count handling in vp_video_buffer()
Date: Mon, 27 Apr 2015 16:24:59 +0900	[thread overview]
Message-ID: <553DE44B.2090605@samsung.com> (raw)
In-Reply-To: <1429993914-2708-2-git-send-email-tjakobi@math.uni-bielefeld.de>

Hi Tobias,

On 04/26/2015 05:31 AM, Tobias Jakobi wrote:
> The video processor (VP) supports four formats: NV12, NV21 and its
> tiled variants. All these formats are bi-planar, so the buffer
> count in vp_video_buffer() is always 2.
> 
> While we're at it, also add support for NV21 and properly exit
> if we're called with an invalid (non-VP) pixelformat.
> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  drivers/gpu/drm/exynos/exynos_mixer.c | 20 +++++---------------
>  1 file changed, 5 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 534a594..6fb4faa 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -388,7 +388,6 @@ static void vp_video_buffer(struct mixer_context *ctx, int win)
>  	struct mixer_resources *res = &ctx->mixer_res;
>  	unsigned long flags;
>  	struct exynos_drm_plane *plane;
> -	unsigned int buf_num = 1;
>  	dma_addr_t luma_addr[2], chroma_addr[2];
>  	bool tiled_mode = false;
>  	bool crcb_mode = false;
> @@ -399,27 +398,18 @@ static void vp_video_buffer(struct mixer_context *ctx, int win)
>  	switch (plane->pixel_format) {
>  	case DRM_FORMAT_NV12:
>  		crcb_mode = false;
> -		buf_num = 2;
>  		break;
> -	/* TODO: single buffer format NV12, NV21 */
> +	case DRM_FORMAT_NV21:
> +		crcb_mode = true;
> +		break;

To support NV21, how about make to other patch? because this patch is to
fix buffer number.

>  	default:
> -		/* ignore pixel format at disable time */
> -		if (!plane->dma_addr[0])
> -			break;
> -
>  		DRM_ERROR("pixel format for vp is wrong [%d].\n",
>  				plane->pixel_format);
>  		return;
>  	}
>  
> -	if (buf_num == 2) {
> -		luma_addr[0] = plane->dma_addr[0];
> -		chroma_addr[0] = plane->dma_addr[1];
> -	} else {
> -		luma_addr[0] = plane->dma_addr[0];
> -		chroma_addr[0] = plane->dma_addr[0]
> -			+ (plane->pitch * plane->fb_height);
> -	}
> +	luma_addr[0] = plane->dma_addr[0];
> +	chroma_addr[0] = plane->dma_addr[1];

Hmm, dma_addr[0] and dma_addr[1] are same address if it uses just one
buffer for two planes, then need offset information of each plane.

Thanks.

>  
>  	if (plane->scan_flag & DRM_MODE_FLAG_INTERLACE) {
>  		ctx->interlace = true;
> 

  reply	other threads:[~2015-04-27  7:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-25 20:31 [PATCH 1/2] drm/exynos: fb: use drm_format_num_planes to get buffer count Tobias Jakobi
2015-04-25 20:31 ` [PATCH 2/2] drm/exynos: mixer: remove buffer count handling in vp_video_buffer() Tobias Jakobi
2015-04-27  7:24   ` Joonyoung Shim [this message]
2015-04-27 12:09     ` 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=553DE44B.2090605@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=inki.dae@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --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.