All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
@ 2018-02-23  6:22 ` Jeffy Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffy Chen @ 2018-02-23  6:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: seanpaul, dcastagna, hoegsberg, heiko, tfiga, Jeffy Chen,
	Sandy Huang, dri-devel, linux-rockchip, David Airlie,
	linux-arm-kernel

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>
---

 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
@ 2018-02-23  6:22 ` Jeffy Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffy Chen @ 2018-02-23  6:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Airlie, Jeffy Chen, dri-devel, tfiga, linux-rockchip,
	hoegsberg, dcastagna, linux-arm-kernel

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>
---

 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


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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
@ 2018-02-23  6:22 ` Jeffy Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffy Chen @ 2018-02-23  6:22 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---

 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
  2018-02-23  6:22 ` Jeffy Chen
  (?)
@ 2018-02-23 14:09   ` Sean Paul
  -1 siblings, 0 replies; 9+ messages in thread
From: Sean Paul @ 2018-02-23 14:09 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, seanpaul, dcastagna, hoegsberg, heiko, tfiga,
	Sandy Huang, dri-devel, linux-rockchip, David Airlie,
	linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
@ 2018-02-23 14:09   ` Sean Paul
  0 siblings, 0 replies; 9+ messages in thread
From: Sean Paul @ 2018-02-23 14:09 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: David Airlie, linux-kernel, dri-devel, tfiga, linux-rockchip,
	hoegsberg, dcastagna, linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
@ 2018-02-23 14:09   ` Sean Paul
  0 siblings, 0 replies; 9+ messages in thread
From: Sean Paul @ 2018-02-23 14:09 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
  2018-02-23  6:22 ` Jeffy Chen
  (?)
@ 2018-03-01 13:33   ` Heiko Stübner
  -1 siblings, 0 replies; 9+ messages in thread
From: Heiko Stübner @ 2018-03-01 13:33 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: linux-kernel, seanpaul, dcastagna, hoegsberg, tfiga, Sandy Huang,
	dri-devel, linux-rockchip, David Airlie, linux-arm-kernel

Am Freitag, 23. Februar 2018, 07:22:50 CET schrieb Jeffy Chen:
> 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>

applied to drm-misc-next with Sean Paul's Ack


Heiko

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
@ 2018-03-01 13:33   ` Heiko Stübner
  0 siblings, 0 replies; 9+ messages in thread
From: Heiko Stübner @ 2018-03-01 13:33 UTC (permalink / raw)
  To: Jeffy Chen
  Cc: David Airlie, dri-devel, linux-kernel, linux-rockchip, hoegsberg,
	dcastagna, tfiga, linux-arm-kernel

Am Freitag, 23. Februar 2018, 07:22:50 CET schrieb Jeffy Chen:
> 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>

applied to drm-misc-next with Sean Paul's Ack


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] drm/rockchip: vop: Init vskiplines in scl_vop_cal_scale()
@ 2018-03-01 13:33   ` Heiko Stübner
  0 siblings, 0 replies; 9+ messages in thread
From: Heiko Stübner @ 2018-03-01 13:33 UTC (permalink / raw)
  To: linux-arm-kernel

Am Freitag, 23. Februar 2018, 07:22:50 CET schrieb Jeffy Chen:
> 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>

applied to drm-misc-next with Sean Paul's Ack


Heiko

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-03-01 13:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.