All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: linux-kernel@vger.kernel.org, seanpaul@chromium.org,
	dcastagna@google.com, hoegsberg@google.com, heiko@sntech.de,
	tfiga@chromium.org, Sandy Huang <hjc@rock-chips.com>,
	dri-devel@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org,
	David Airlie <airlied@linux.ie>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
Date: Fri, 23 Feb 2018 09:09:39 -0500	[thread overview]
Message-ID: <20180223140939.GI223881@art_vandelay> (raw)
In-Reply-To: <20180223062250.10470-1-jeffy.chen@rock-chips.com>

On Fri, Feb 23, 2018 at 02:22:50PM +0800, Jeffy Chen wrote:
> Currently we are calling scl_vop_cal_scale() to get vskiplines for yrgb
> and cbcr. So the cbcr's vskiplines might be an unexpected value if the
> second scl_vop_cal_scale() didn't update it.
> 
> Init vskiplines in scl_vop_cal_scale() to avoid that.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
> 
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 7715853ef90a..9b03c51903ab 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -259,6 +259,9 @@ static uint16_t scl_vop_cal_scale(enum scale_mode mode, uint32_t src,
>  {
>  	uint16_t val = 1 << SCL_FT_DEFAULT_FIXPOINT_SHIFT;
>  
> +	if (vskiplines)
> +		*vskiplines = 0;
> +
>  	if (is_horizontal) {
>  		if (mode == SCALE_UP)
>  			val = GET_SCL_FT_BIC(src, dst);
> @@ -299,7 +302,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
>  	uint16_t vsu_mode;
>  	uint16_t lb_mode;
>  	uint32_t val;
> -	int vskiplines = 0;
> +	int vskiplines;
>  
>  	if (dst_w > 3840) {
>  		DRM_DEV_ERROR(vop->dev, "Maximum dst width (3840) exceeded\n");
> -- 
> 2.11.0
> 
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS

WARNING: multiple messages have this Message-ID (diff)
From: Sean Paul <seanpaul@chromium.org>
To: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: David Airlie <airlied@linux.ie>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	tfiga@chromium.org, linux-rockchip@lists.infradead.org,
	hoegsberg@google.com, dcastagna@google.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
Date: Fri, 23 Feb 2018 09:09:39 -0500	[thread overview]
Message-ID: <20180223140939.GI223881@art_vandelay> (raw)
In-Reply-To: <20180223062250.10470-1-jeffy.chen@rock-chips.com>

On Fri, Feb 23, 2018 at 02:22:50PM +0800, Jeffy Chen wrote:
> Currently we are calling scl_vop_cal_scale() to get vskiplines for yrgb
> and cbcr. So the cbcr's vskiplines might be an unexpected value if the
> second scl_vop_cal_scale() didn't update it.
> 
> Init vskiplines in scl_vop_cal_scale() to avoid that.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
> 
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 7715853ef90a..9b03c51903ab 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -259,6 +259,9 @@ static uint16_t scl_vop_cal_scale(enum scale_mode mode, uint32_t src,
>  {
>  	uint16_t val = 1 << SCL_FT_DEFAULT_FIXPOINT_SHIFT;
>  
> +	if (vskiplines)
> +		*vskiplines = 0;
> +
>  	if (is_horizontal) {
>  		if (mode == SCALE_UP)
>  			val = GET_SCL_FT_BIC(src, dst);
> @@ -299,7 +302,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
>  	uint16_t vsu_mode;
>  	uint16_t lb_mode;
>  	uint32_t val;
> -	int vskiplines = 0;
> +	int vskiplines;
>  
>  	if (dst_w > 3840) {
>  		DRM_DEV_ERROR(vop->dev, "Maximum dst width (3840) exceeded\n");
> -- 
> 2.11.0
> 
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
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: seanpaul@chromium.org (Sean Paul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
Date: Fri, 23 Feb 2018 09:09:39 -0500	[thread overview]
Message-ID: <20180223140939.GI223881@art_vandelay> (raw)
In-Reply-To: <20180223062250.10470-1-jeffy.chen@rock-chips.com>

On Fri, Feb 23, 2018 at 02:22:50PM +0800, Jeffy Chen wrote:
> Currently we are calling scl_vop_cal_scale() to get vskiplines for yrgb
> and cbcr. So the cbcr's vskiplines might be an unexpected value if the
> second scl_vop_cal_scale() didn't update it.
> 
> Init vskiplines in scl_vop_cal_scale() to avoid that.
> 
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
> 
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 7715853ef90a..9b03c51903ab 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -259,6 +259,9 @@ static uint16_t scl_vop_cal_scale(enum scale_mode mode, uint32_t src,
>  {
>  	uint16_t val = 1 << SCL_FT_DEFAULT_FIXPOINT_SHIFT;
>  
> +	if (vskiplines)
> +		*vskiplines = 0;
> +
>  	if (is_horizontal) {
>  		if (mode == SCALE_UP)
>  			val = GET_SCL_FT_BIC(src, dst);
> @@ -299,7 +302,7 @@ static void scl_vop_cal_scl_fac(struct vop *vop, const struct vop_win_data *win,
>  	uint16_t vsu_mode;
>  	uint16_t lb_mode;
>  	uint32_t val;
> -	int vskiplines = 0;
> +	int vskiplines;
>  
>  	if (dst_w > 3840) {
>  		DRM_DEV_ERROR(vop->dev, "Maximum dst width (3840) exceeded\n");
> -- 
> 2.11.0
> 
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS

  reply	other threads:[~2018-02-23 14:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-23  6:22 [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale() Jeffy Chen
2018-02-23  6:22 ` Jeffy Chen
2018-02-23  6:22 ` Jeffy Chen
2018-02-23 14:09 ` Sean Paul [this message]
2018-02-23 14:09   ` Sean Paul
2018-02-23 14:09   ` Sean Paul
2018-03-01 13:33 ` Heiko Stübner
2018-03-01 13:33   ` Heiko Stübner
2018-03-01 13:33   ` Heiko Stübner

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=20180223140939.GI223881@art_vandelay \
    --to=seanpaul@chromium.org \
    --cc=airlied@linux.ie \
    --cc=dcastagna@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=hoegsberg@google.com \
    --cc=jeffy.chen@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=tfiga@chromium.org \
    /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.