linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: vop: fix window origin calculation
@ 2015-11-10  9:59 Mark Yao
  2015-11-10 10:07 ` Yakir Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mark Yao @ 2015-11-10  9:59 UTC (permalink / raw)
  To: linux-arm-kernel

From: Dominik Behr <dbehr@chromium.org>

VOP_WINx_DSP_ST does not require subtracting 1 from the values written to
it. It actually causes the screen to be shifted by one pixel.

Signed-off-by: Mark Yao <mark.yao@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 48719df..4730ae4 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -959,8 +959,8 @@ static int vop_update_plane_event(struct drm_plane *plane,
 	val = (dest.y2 - dest.y1 - 1) << 16;
 	val |= (dest.x2 - dest.x1 - 1) & 0xffff;
 	VOP_WIN_SET(vop, win, dsp_info, val);
-	val = (dsp_sty - 1) << 16;
-	val |= (dsp_stx - 1) & 0xffff;
+	val = dsp_sty << 16;
+	val |= dsp_stx & 0xffff;
 	VOP_WIN_SET(vop, win, dsp_st, val);
 	VOP_WIN_SET(vop, win, rb_swap, rb_swap);
 
-- 
1.7.9.5

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

* [PATCH] drm/rockchip: vop: fix window origin calculation
  2015-11-10  9:59 [PATCH] drm/rockchip: vop: fix window origin calculation Mark Yao
@ 2015-11-10 10:07 ` Yakir Yang
  2015-11-10 11:42 ` Heiko Stuebner
  2015-11-10 14:57 ` Heiko Stuebner
  2 siblings, 0 replies; 5+ messages in thread
From: Yakir Yang @ 2015-11-10 10:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Mark,

On 11/10/2015 05:59 PM, Mark Yao wrote:
> From: Dominik Behr <dbehr@chromium.org>
>
> VOP_WINx_DSP_ST does not require subtracting 1 from the values written to
> it. It actually causes the screen to be shifted by one pixel.
>
> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>

I have meet the screen shift problem on RK3036 SDK board, and this
could fix my problem, so

Tested-by: Yakir Yang <ykk@rock-chips.com>

- Yakir

> ---
>   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 48719df..4730ae4 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -959,8 +959,8 @@ static int vop_update_plane_event(struct drm_plane *plane,
>   	val = (dest.y2 - dest.y1 - 1) << 16;
>   	val |= (dest.x2 - dest.x1 - 1) & 0xffff;
>   	VOP_WIN_SET(vop, win, dsp_info, val);
> -	val = (dsp_sty - 1) << 16;
> -	val |= (dsp_stx - 1) & 0xffff;
> +	val = dsp_sty << 16;
> +	val |= dsp_stx & 0xffff;
>   	VOP_WIN_SET(vop, win, dsp_st, val);
>   	VOP_WIN_SET(vop, win, rb_swap, rb_swap);
>   

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

* [PATCH] drm/rockchip: vop: fix window origin calculation
  2015-11-10  9:59 [PATCH] drm/rockchip: vop: fix window origin calculation Mark Yao
  2015-11-10 10:07 ` Yakir Yang
@ 2015-11-10 11:42 ` Heiko Stuebner
  2015-11-10 14:57 ` Heiko Stuebner
  2 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2015-11-10 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, 10. November 2015, 17:59:10 schrieb Mark Yao:
> From: Dominik Behr <dbehr@chromium.org>
> 
> VOP_WINx_DSP_ST does not require subtracting 1 from the values written to
> it. It actually causes the screen to be shifted by one pixel.
> 
> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>

funny I never noticed that shift, but now that you mention it, I see it too
on my Chromebook and the patch fixes this. I've also looked up the
matching data in the TRM, so

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Heiko Stuebner <heiko@sntech.de>


Heiko

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

* [PATCH] drm/rockchip: vop: fix window origin calculation
  2015-11-10  9:59 [PATCH] drm/rockchip: vop: fix window origin calculation Mark Yao
  2015-11-10 10:07 ` Yakir Yang
  2015-11-10 11:42 ` Heiko Stuebner
@ 2015-11-10 14:57 ` Heiko Stuebner
  2015-11-11  0:30   ` Mark yao
  2 siblings, 1 reply; 5+ messages in thread
From: Heiko Stuebner @ 2015-11-10 14:57 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, 10. November 2015, 17:59:10 schrieb Mark Yao:
> From: Dominik Behr <dbehr@chromium.org>
> 
> VOP_WINx_DSP_ST does not require subtracting 1 from the values written to
> it. It actually causes the screen to be shifted by one pixel.
> 
> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>

One thing I noticed, the original patch [0] had a Signed-off from
Dominik already and you should keep that as he is the author, and then
add your Signed-off below that, as you are the submitter,

So it would look like:

Signed-off-by: Dominik Behr <dbehr@chromium.org>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>


That may not need a repost, but should probably be corrected when applying
the patch.

Heiko

[0] https://chromium-review.googlesource.com/#/c/233251/


> ---
>  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 48719df..4730ae4 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -959,8 +959,8 @@ static int vop_update_plane_event(struct drm_plane *plane,
>  	val = (dest.y2 - dest.y1 - 1) << 16;
>  	val |= (dest.x2 - dest.x1 - 1) & 0xffff;
>  	VOP_WIN_SET(vop, win, dsp_info, val);
> -	val = (dsp_sty - 1) << 16;
> -	val |= (dsp_stx - 1) & 0xffff;
> +	val = dsp_sty << 16;
> +	val |= dsp_stx & 0xffff;
>  	VOP_WIN_SET(vop, win, dsp_st, val);
>  	VOP_WIN_SET(vop, win, rb_swap, rb_swap);
>  
> 

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

* [PATCH] drm/rockchip: vop: fix window origin calculation
  2015-11-10 14:57 ` Heiko Stuebner
@ 2015-11-11  0:30   ` Mark yao
  0 siblings, 0 replies; 5+ messages in thread
From: Mark yao @ 2015-11-11  0:30 UTC (permalink / raw)
  To: linux-arm-kernel

On 2015?11?10? 22:57, Heiko Stuebner wrote:
> Am Dienstag, 10. November 2015, 17:59:10 schrieb Mark Yao:
>> From: Dominik Behr <dbehr@chromium.org>
>>
>> VOP_WINx_DSP_ST does not require subtracting 1 from the values written to
>> it. It actually causes the screen to be shifted by one pixel.
>>
>> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
> One thing I noticed, the original patch [0] had a Signed-off from
> Dominik already and you should keep that as he is the author, and then
> add your Signed-off below that, as you are the submitter,
>
> So it would look like:
>
> Signed-off-by: Dominik Behr <dbehr@chromium.org>
> Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
>
>
> That may not need a repost, but should probably be corrected when applying
> the patch.
>
> Heiko
>
> [0] https://chromium-review.googlesource.com/#/c/233251/
>
Got it, thanks.
>> ---
>>   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 48719df..4730ae4 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
>> @@ -959,8 +959,8 @@ static int vop_update_plane_event(struct drm_plane *plane,
>>   	val = (dest.y2 - dest.y1 - 1) << 16;
>>   	val |= (dest.x2 - dest.x1 - 1) & 0xffff;
>>   	VOP_WIN_SET(vop, win, dsp_info, val);
>> -	val = (dsp_sty - 1) << 16;
>> -	val |= (dsp_stx - 1) & 0xffff;
>> +	val = dsp_sty << 16;
>> +	val |= dsp_stx & 0xffff;
>>   	VOP_WIN_SET(vop, win, dsp_st, val);
>>   	VOP_WIN_SET(vop, win, rb_swap, rb_swap);
>>   
>>
>
>
>


-- 
?ark Yao

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

end of thread, other threads:[~2015-11-11  0:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-10  9:59 [PATCH] drm/rockchip: vop: fix window origin calculation Mark Yao
2015-11-10 10:07 ` Yakir Yang
2015-11-10 11:42 ` Heiko Stuebner
2015-11-10 14:57 ` Heiko Stuebner
2015-11-11  0:30   ` Mark yao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).