All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark yao <mark.yao@rock-chips.com>
To: Yakir Yang <ykk@rock-chips.com>, Mark Yao <yzq@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>
Cc: linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org, tfiga@chromium.org
Subject: Re: [PATCH 2/2] drm/rockchip: vop: correct the source size of uv scale factor setting
Date: Tue, 7 Jun 2016 08:57:48 +0800	[thread overview]
Message-ID: <57561C0C.2040507@rock-chips.com> (raw)
In-Reply-To: <1465199926-20991-1-git-send-email-ykk@rock-chips.com>

On 2016年06月06日 15:58, Yakir Yang wrote:
> From: Mark Yao <mark.yao@rock-chips.com>
>
> When the input color format is YUV, we need to do some external scale
> for CBCR. Like,
>   * In YUV420 data format:
>       cbcr_xscale = dst_w / src_w * 2;
>       cbcr_yscale = dst_h / src_h * 2;
>   * In YUV422 data format:
>       cbcr_xscale = dst_w / src_w * 2;
>       cbcr_yscale = dst_h / src_h;
>   * In YUV444 data format
>       cbcr_xscale = dst_w / src_w;
>       cbcr_yscale = dst_h / src_h;
>
> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
> ---
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 1c4d5b5..b28cda7 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -324,9 +324,9 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
>   			    scl_cal_scale2(src_h, dst_h));
>   		if (is_yuv) {
>   			VOP_SCL_SET(vop, win, scale_cbcr_x,
> -				    scl_cal_scale2(src_w, dst_w));
> +				    scl_cal_scale2(cbcr_src_w, dst_w));
>   			VOP_SCL_SET(vop, win, scale_cbcr_y,
> -				    scl_cal_scale2(src_h, dst_h));
> +				    scl_cal_scale2(cbcr_src_h, dst_h));
>   		}
>   		return;
>   	}
Thanks for this fix, Applied to my drm-fixes.

-- 
Mark Yao


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

WARNING: multiple messages have this Message-ID (diff)
From: mark.yao@rock-chips.com (Mark yao)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] drm/rockchip: vop: correct the source size of uv scale factor setting
Date: Tue, 7 Jun 2016 08:57:48 +0800	[thread overview]
Message-ID: <57561C0C.2040507@rock-chips.com> (raw)
In-Reply-To: <1465199926-20991-1-git-send-email-ykk@rock-chips.com>

On 2016?06?06? 15:58, Yakir Yang wrote:
> From: Mark Yao <mark.yao@rock-chips.com>
>
> When the input color format is YUV, we need to do some external scale
> for CBCR. Like,
>   * In YUV420 data format:
>       cbcr_xscale = dst_w / src_w * 2;
>       cbcr_yscale = dst_h / src_h * 2;
>   * In YUV422 data format:
>       cbcr_xscale = dst_w / src_w * 2;
>       cbcr_yscale = dst_h / src_h;
>   * In YUV444 data format
>       cbcr_xscale = dst_w / src_w;
>       cbcr_yscale = dst_h / src_h;
>
> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
> ---
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 1c4d5b5..b28cda7 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -324,9 +324,9 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
>   			    scl_cal_scale2(src_h, dst_h));
>   		if (is_yuv) {
>   			VOP_SCL_SET(vop, win, scale_cbcr_x,
> -				    scl_cal_scale2(src_w, dst_w));
> +				    scl_cal_scale2(cbcr_src_w, dst_w));
>   			VOP_SCL_SET(vop, win, scale_cbcr_y,
> -				    scl_cal_scale2(src_h, dst_h));
> +				    scl_cal_scale2(cbcr_src_h, dst_h));
>   		}
>   		return;
>   	}
Thanks for this fix, Applied to my drm-fixes.

-- 
?ark Yao

WARNING: multiple messages have this Message-ID (diff)
From: Mark yao <mark.yao@rock-chips.com>
To: Yakir Yang <ykk@rock-chips.com>, Mark Yao <yzq@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>, David Airlie <airlied@linux.ie>
Cc: tfiga@chromium.org, dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] drm/rockchip: vop: correct the source size of uv scale factor setting
Date: Tue, 7 Jun 2016 08:57:48 +0800	[thread overview]
Message-ID: <57561C0C.2040507@rock-chips.com> (raw)
In-Reply-To: <1465199926-20991-1-git-send-email-ykk@rock-chips.com>

On 2016年06月06日 15:58, Yakir Yang wrote:
> From: Mark Yao <mark.yao@rock-chips.com>
>
> When the input color format is YUV, we need to do some external scale
> for CBCR. Like,
>   * In YUV420 data format:
>       cbcr_xscale = dst_w / src_w * 2;
>       cbcr_yscale = dst_h / src_h * 2;
>   * In YUV422 data format:
>       cbcr_xscale = dst_w / src_w * 2;
>       cbcr_yscale = dst_h / src_h;
>   * In YUV444 data format
>       cbcr_xscale = dst_w / src_w;
>       cbcr_yscale = dst_h / src_h;
>
> Signed-off-by: Yakir Yang <ykk@rock-chips.com>
> ---
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 1c4d5b5..b28cda7 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -324,9 +324,9 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
>   			    scl_cal_scale2(src_h, dst_h));
>   		if (is_yuv) {
>   			VOP_SCL_SET(vop, win, scale_cbcr_x,
> -				    scl_cal_scale2(src_w, dst_w));
> +				    scl_cal_scale2(cbcr_src_w, dst_w));
>   			VOP_SCL_SET(vop, win, scale_cbcr_y,
> -				    scl_cal_scale2(src_h, dst_h));
> +				    scl_cal_scale2(cbcr_src_h, dst_h));
>   		}
>   		return;
>   	}
Thanks for this fix, Applied to my drm-fixes.

-- 
Mark Yao

  reply	other threads:[~2016-06-07  0:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06  7:58 [PATCH 1/2] drm/rockchip: vop: add uv_vir register field for RK3036 VOP Yakir Yang
2016-06-06  7:58 ` Yakir Yang
2016-06-06  7:58 ` Yakir Yang
2016-06-06  7:58 ` [PATCH 2/2] drm/rockchip: vop: correct the source size of uv scale factor setting Yakir Yang
2016-06-06  7:58   ` Yakir Yang
2016-06-06  7:58   ` Yakir Yang
2016-06-07  0:57   ` Mark yao [this message]
2016-06-07  0:57     ` Mark yao
2016-06-07  0:57     ` Mark yao
2016-06-07  0:57 ` [PATCH 1/2] drm/rockchip: vop: add uv_vir register field for RK3036 VOP Mark yao
2016-06-07  0:57   ` Mark yao
2016-06-07  0:57   ` Mark yao

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=57561C0C.2040507@rock-chips.com \
    --to=mark.yao@rock-chips.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=tfiga@chromium.org \
    --cc=ykk@rock-chips.com \
    --cc=yzq@rock-chips.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.