All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-04-17 10:15 ` Sandy Huang
  0 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-04-17 10:15 UTC (permalink / raw)
  To: dri-devel, Sandy Huang, Heiko Stübner, David Airlie
  Cc: linux-arm-kernel, linux-rockchip, linux-kernel

When video width is bigger than 3840 the linebuffer mode
should be LB_YUV_3840X5.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 56bbd2e..3e7501b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
 
 	if (width > 2560)
 		lb_mode = LB_RGB_3840X2;
-	else if (width > 1920)
+	else if (!is_yuv && width > 1920)
 		lb_mode = LB_RGB_2560X4;
 	else if (!is_yuv)
 		lb_mode = LB_RGB_1920X5;
-- 
2.7.4

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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-04-17 10:15 ` Sandy Huang
  0 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-04-17 10:15 UTC (permalink / raw)
  To: dri-devel, Sandy Huang, Heiko Stübner, David Airlie
  Cc: linux-rockchip, linux-kernel, linux-arm-kernel

When video width is bigger than 3840 the linebuffer mode
should be LB_YUV_3840X5.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 56bbd2e..3e7501b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
 
 	if (width > 2560)
 		lb_mode = LB_RGB_3840X2;
-	else if (width > 1920)
+	else if (!is_yuv && width > 1920)
 		lb_mode = LB_RGB_2560X4;
 	else if (!is_yuv)
 		lb_mode = LB_RGB_1920X5;
-- 
2.7.4


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

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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-04-17 10:15 ` Sandy Huang
  0 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-04-17 10:15 UTC (permalink / raw)
  To: linux-arm-kernel

When video width is bigger than 3840 the linebuffer mode
should be LB_YUV_3840X5.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 56bbd2e..3e7501b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
 
 	if (width > 2560)
 		lb_mode = LB_RGB_3840X2;
-	else if (width > 1920)
+	else if (!is_yuv && width > 1920)
 		lb_mode = LB_RGB_2560X4;
 	else if (!is_yuv)
 		lb_mode = LB_RGB_1920X5;
-- 
2.7.4

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

* Re: [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
  2018-04-17 10:15 ` Sandy Huang
  (?)
@ 2018-04-17 11:14   ` Heiko Stuebner
  -1 siblings, 0 replies; 18+ messages in thread
From: Heiko Stuebner @ 2018-04-17 11:14 UTC (permalink / raw)
  To: Sandy Huang
  Cc: dri-devel, David Airlie, linux-arm-kernel, linux-rockchip, linux-kernel

Hi Sandy,

Am Dienstag, 17. April 2018, 12:15:07 CEST schrieb Sandy Huang:
> When video width is bigger than 3840 the linebuffer mode
> should be LB_YUV_3840X5.

Can you explain that a bit better?

I.e. when looking at the code, the very first check is width > 2560.

So it seems your change targets some YUV mode with width > 3840
which should be mentioned in the commit message, so people like
me don't scratch their head in confusion ;-)

Similarly that check is actually width > 1280 to set LB_YUV_3840X5,
so I guess you're actually wanting any YUV mode bigger than
1280px should use LB_YUV_3840X5?


Heiko

> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> index 56bbd2e..3e7501b 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> @@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
>  
>  	if (width > 2560)
>  		lb_mode = LB_RGB_3840X2;
> -	else if (width > 1920)
> +	else if (!is_yuv && width > 1920)
>  		lb_mode = LB_RGB_2560X4;
>  	else if (!is_yuv)
>  		lb_mode = LB_RGB_1920X5;
> 

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

* Re: [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-04-17 11:14   ` Heiko Stuebner
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Stuebner @ 2018-04-17 11:14 UTC (permalink / raw)
  To: Sandy Huang
  Cc: David Airlie, linux-rockchip, linux-arm-kernel, dri-devel, linux-kernel

Hi Sandy,

Am Dienstag, 17. April 2018, 12:15:07 CEST schrieb Sandy Huang:
> When video width is bigger than 3840 the linebuffer mode
> should be LB_YUV_3840X5.

Can you explain that a bit better?

I.e. when looking at the code, the very first check is width > 2560.

So it seems your change targets some YUV mode with width > 3840
which should be mentioned in the commit message, so people like
me don't scratch their head in confusion ;-)

Similarly that check is actually width > 1280 to set LB_YUV_3840X5,
so I guess you're actually wanting any YUV mode bigger than
1280px should use LB_YUV_3840X5?


Heiko

> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> index 56bbd2e..3e7501b 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> @@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
>  
>  	if (width > 2560)
>  		lb_mode = LB_RGB_3840X2;
> -	else if (width > 1920)
> +	else if (!is_yuv && width > 1920)
>  		lb_mode = LB_RGB_2560X4;
>  	else if (!is_yuv)
>  		lb_mode = LB_RGB_1920X5;
> 


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

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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-04-17 11:14   ` Heiko Stuebner
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Stuebner @ 2018-04-17 11:14 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sandy,

Am Dienstag, 17. April 2018, 12:15:07 CEST schrieb Sandy Huang:
> When video width is bigger than 3840 the linebuffer mode
> should be LB_YUV_3840X5.

Can you explain that a bit better?

I.e. when looking at the code, the very first check is width > 2560.

So it seems your change targets some YUV mode with width > 3840
which should be mentioned in the commit message, so people like
me don't scratch their head in confusion ;-)

Similarly that check is actually width > 1280 to set LB_YUV_3840X5,
so I guess you're actually wanting any YUV mode bigger than
1280px should use LB_YUV_3840X5?


Heiko

> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
> ---
>  drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> index 56bbd2e..3e7501b 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
> @@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
>  
>  	if (width > 2560)
>  		lb_mode = LB_RGB_3840X2;
> -	else if (width > 1920)
> +	else if (!is_yuv && width > 1920)
>  		lb_mode = LB_RGB_2560X4;
>  	else if (!is_yuv)
>  		lb_mode = LB_RGB_1920X5;
> 

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

* Re: [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
  2018-04-17 11:14   ` Heiko Stuebner
  (?)
  (?)
@ 2018-04-19 12:03   ` Sandy Huang
  -1 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-04-19 12:03 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: David Airlie, linux-rockchip, linux-arm-kernel, dri-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1486 bytes --]



在 2018/4/17 19:14, Heiko Stuebner 写道:
> Hi Sandy,
>
> Am Dienstag, 17. April 2018, 12:15:07 CEST schrieb Sandy Huang:
>> When video width is bigger than 3840 the linebuffer mode
>> should be LB_YUV_3840X5.
> Can you explain that a bit better?
>
> I.e. when looking at the code, the very first check is width > 2560.
>
> So it seems your change targets some YUV mode with width > 3840
> which should be mentioned in the commit message, so people like
> me don't scratch their head in confusion ;-)
>
> Similarly that check is actually width > 1280 to set LB_YUV_3840X5,
> so I guess you're actually wanting any YUV mode bigger than
> 1280px should use LB_YUV_3840X5?
>
>
> Heiko
Thanks heiko,
I will make more description for this path at next version.
>
>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
>> ---
>>   drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> index 56bbd2e..3e7501b 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> @@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
>>   
>>   	if (width > 2560)
>>   		lb_mode = LB_RGB_3840X2;
>> -	else if (width > 1920)
>> +	else if (!is_yuv && width > 1920)
>>   		lb_mode = LB_RGB_2560X4;
>>   	else if (!is_yuv)
>>   		lb_mode = LB_RGB_1920X5;
>>
>
>
>
>


[-- Attachment #1.2: Type: text/html, Size: 2683 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
  2018-04-17 11:14   ` Heiko Stuebner
@ 2018-04-19 13:14     ` Sandy Huang
  -1 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-04-19 13:14 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: dri-devel, David Airlie, linux-arm-kernel, linux-rockchip, linux-kernel



在 2018/4/17 19:14, Heiko Stuebner 写道:
> Hi Sandy,
> 
> Am Dienstag, 17. April 2018, 12:15:07 CEST schrieb Sandy Huang:
>> When video width is bigger than 3840 the linebuffer mode
>> should be LB_YUV_3840X5.
> 
> Can you explain that a bit better?
> 
> I.e. when looking at the code, the very first check is width > 2560.
> 
> So it seems your change targets some YUV mode with width > 3840
> which should be mentioned in the commit message, so people like
> me don't scratch their head in confusion ;-)
> 
> Similarly that check is actually width > 1280 to set LB_YUV_3840X5,
> so I guess you're actually wanting any YUV mode bigger than
> 1280px should use LB_YUV_3840X5?
> 
> 
> Heiko
> 

Thanks heiko,
I will make more description for this path at next version.

>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
>> ---
>>   drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> index 56bbd2e..3e7501b 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> @@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
>>   
>>   	if (width > 2560)
>>   		lb_mode = LB_RGB_3840X2;
>> -	else if (width > 1920)
>> +	else if (!is_yuv && width > 1920)
>>   		lb_mode = LB_RGB_2560X4;
>>   	else if (!is_yuv)
>>   		lb_mode = LB_RGB_1920X5;
>>
> 
> 
> 
> 
> 

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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-04-19 13:14     ` Sandy Huang
  0 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-04-19 13:14 UTC (permalink / raw)
  To: linux-arm-kernel



? 2018/4/17 19:14, Heiko Stuebner ??:
> Hi Sandy,
> 
> Am Dienstag, 17. April 2018, 12:15:07 CEST schrieb Sandy Huang:
>> When video width is bigger than 3840 the linebuffer mode
>> should be LB_YUV_3840X5.
> 
> Can you explain that a bit better?
> 
> I.e. when looking at the code, the very first check is width > 2560.
> 
> So it seems your change targets some YUV mode with width > 3840
> which should be mentioned in the commit message, so people like
> me don't scratch their head in confusion ;-)
> 
> Similarly that check is actually width > 1280 to set LB_YUV_3840X5,
> so I guess you're actually wanting any YUV mode bigger than
> 1280px should use LB_YUV_3840X5?
> 
> 
> Heiko
> 

Thanks heiko,
I will make more description for this path at next version.

>> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
>> ---
>>   drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> index 56bbd2e..3e7501b 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
>> @@ -332,7 +332,7 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
>>   
>>   	if (width > 2560)
>>   		lb_mode = LB_RGB_3840X2;
>> -	else if (width > 1920)
>> +	else if (!is_yuv && width > 1920)
>>   		lb_mode = LB_RGB_2560X4;
>>   	else if (!is_yuv)
>>   		lb_mode = LB_RGB_1920X5;
>>
> 
> 
> 
> 
> 

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

* Re: [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
  2018-06-26  8:16 ` Sandy Huang
  (?)
@ 2018-06-27 13:10   ` Heiko Stuebner
  -1 siblings, 0 replies; 18+ messages in thread
From: Heiko Stuebner @ 2018-06-27 13:10 UTC (permalink / raw)
  To: Sandy Huang
  Cc: dri-devel, David Airlie, linux-arm-kernel, linux-rockchip, linux-kernel

Hi Sandy,

Am Dienstag, 26. Juni 2018, 10:16:44 CEST schrieb Sandy Huang:
> linebuffer mode should be LB_YUV_3840X5 when width is bigger
> than 1280 in yuv mode.
> seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
> is clearer.
> 
> Signed-off-by: Sandy Huang <hjc@rock-chips.com>

applied to drm-misc-next


Heiko



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

* Re: [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-06-27 13:10   ` Heiko Stuebner
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Stuebner @ 2018-06-27 13:10 UTC (permalink / raw)
  To: Sandy Huang
  Cc: David Airlie, linux-rockchip, linux-arm-kernel, dri-devel, linux-kernel

Hi Sandy,

Am Dienstag, 26. Juni 2018, 10:16:44 CEST schrieb Sandy Huang:
> linebuffer mode should be LB_YUV_3840X5 when width is bigger
> than 1280 in yuv mode.
> seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
> is clearer.
> 
> Signed-off-by: Sandy Huang <hjc@rock-chips.com>

applied to drm-misc-next


Heiko

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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-06-27 13:10   ` Heiko Stuebner
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Stuebner @ 2018-06-27 13:10 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sandy,

Am Dienstag, 26. Juni 2018, 10:16:44 CEST schrieb Sandy Huang:
> linebuffer mode should be LB_YUV_3840X5 when width is bigger
> than 1280 in yuv mode.
> seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
> is clearer.
> 
> Signed-off-by: Sandy Huang <hjc@rock-chips.com>

applied to drm-misc-next


Heiko

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

* Re: [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
  2018-06-26  8:16 ` Sandy Huang
  (?)
@ 2018-06-26  8:22   ` Heiko Stübner
  -1 siblings, 0 replies; 18+ messages in thread
From: Heiko Stübner @ 2018-06-26  8:22 UTC (permalink / raw)
  To: Sandy Huang
  Cc: dri-devel, David Airlie, linux-arm-kernel, linux-rockchip, linux-kernel

Am Dienstag, 26. Juni 2018, 10:16:44 CEST schrieb Sandy Huang:
> linebuffer mode should be LB_YUV_3840X5 when width is bigger
> than 1280 in yuv mode.
> seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
> is clearer.
> 
> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
> Link:
> https://patchwork.freedesktop.org/patch/msgid/1523960108-190541-1-git-send-> email-hjc@rock-chips.com

Missing the "v2" in the subject, but I remembered and found the v1 from april. 
And it looks great now.

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




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

* Re: [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-06-26  8:22   ` Heiko Stübner
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Stübner @ 2018-06-26  8:22 UTC (permalink / raw)
  To: Sandy Huang
  Cc: David Airlie, linux-rockchip, linux-arm-kernel, dri-devel, linux-kernel

Am Dienstag, 26. Juni 2018, 10:16:44 CEST schrieb Sandy Huang:
> linebuffer mode should be LB_YUV_3840X5 when width is bigger
> than 1280 in yuv mode.
> seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
> is clearer.
> 
> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
> Link:
> https://patchwork.freedesktop.org/patch/msgid/1523960108-190541-1-git-send-> email-hjc@rock-chips.com

Missing the "v2" in the subject, but I remembered and found the v1 from april. 
And it looks great now.

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



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

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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-06-26  8:22   ` Heiko Stübner
  0 siblings, 0 replies; 18+ messages in thread
From: Heiko Stübner @ 2018-06-26  8:22 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, 26. Juni 2018, 10:16:44 CEST schrieb Sandy Huang:
> linebuffer mode should be LB_YUV_3840X5 when width is bigger
> than 1280 in yuv mode.
> seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
> is clearer.
> 
> Signed-off-by: Sandy Huang <hjc@rock-chips.com>
> Link:
> https://patchwork.freedesktop.org/patch/msgid/1523960108-190541-1-git-send-> email-hjc at rock-chips.com

Missing the "v2" in the subject, but I remembered and found the v1 from april. 
And it looks great now.

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

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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-06-26  8:16 ` Sandy Huang
  0 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-06-26  8:16 UTC (permalink / raw)
  To: dri-devel, Sandy Huang, Heiko Stübner, David Airlie
  Cc: linux-arm-kernel, linux-rockchip, linux-kernel

linebuffer mode should be LB_YUV_3840X5 when width is bigger
than 1280 in yuv mode.
seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
is clearer.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1523960108-190541-1-git-send-email-hjc@rock-chips.com
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 084acdd..fcb9104 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -331,16 +331,19 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
 {
 	int lb_mode;
 
-	if (width > 2560)
-		lb_mode = LB_RGB_3840X2;
-	else if (width > 1920)
-		lb_mode = LB_RGB_2560X4;
-	else if (!is_yuv)
-		lb_mode = LB_RGB_1920X5;
-	else if (width > 1280)
-		lb_mode = LB_YUV_3840X5;
-	else
-		lb_mode = LB_YUV_2560X8;
+	if (is_yuv) {
+		if (width > 1280)
+			lb_mode = LB_YUV_3840X5;
+		else
+			lb_mode = LB_YUV_2560X8;
+	} else {
+		if (width > 2560)
+			lb_mode = LB_RGB_3840X2;
+		else if (width > 1920)
+			lb_mode = LB_RGB_2560X4;
+		else
+			lb_mode = LB_RGB_1920X5;
+	}
 
 	return lb_mode;
 }
-- 
2.7.4



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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-06-26  8:16 ` Sandy Huang
  0 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-06-26  8:16 UTC (permalink / raw)
  To: dri-devel, Sandy Huang, Heiko Stübner, David Airlie
  Cc: linux-rockchip, linux-kernel, linux-arm-kernel

linebuffer mode should be LB_YUV_3840X5 when width is bigger
than 1280 in yuv mode.
seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
is clearer.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1523960108-190541-1-git-send-email-hjc@rock-chips.com
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 084acdd..fcb9104 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -331,16 +331,19 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
 {
 	int lb_mode;
 
-	if (width > 2560)
-		lb_mode = LB_RGB_3840X2;
-	else if (width > 1920)
-		lb_mode = LB_RGB_2560X4;
-	else if (!is_yuv)
-		lb_mode = LB_RGB_1920X5;
-	else if (width > 1280)
-		lb_mode = LB_YUV_3840X5;
-	else
-		lb_mode = LB_YUV_2560X8;
+	if (is_yuv) {
+		if (width > 1280)
+			lb_mode = LB_YUV_3840X5;
+		else
+			lb_mode = LB_YUV_2560X8;
+	} else {
+		if (width > 2560)
+			lb_mode = LB_RGB_3840X2;
+		else if (width > 1920)
+			lb_mode = LB_RGB_2560X4;
+		else
+			lb_mode = LB_RGB_1920X5;
+	}
 
 	return lb_mode;
 }
-- 
2.7.4


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

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

* [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error
@ 2018-06-26  8:16 ` Sandy Huang
  0 siblings, 0 replies; 18+ messages in thread
From: Sandy Huang @ 2018-06-26  8:16 UTC (permalink / raw)
  To: linux-arm-kernel

linebuffer mode should be LB_YUV_3840X5 when width is bigger
than 1280 in yuv mode.
seperate yuv and rgb case make the scl_vop_cal_lb_mode() logic
is clearer.

Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1523960108-190541-1-git-send-email-hjc at rock-chips.com
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 084acdd..fcb9104 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -331,16 +331,19 @@ static inline int scl_vop_cal_lb_mode(int width, bool is_yuv)
 {
 	int lb_mode;
 
-	if (width > 2560)
-		lb_mode = LB_RGB_3840X2;
-	else if (width > 1920)
-		lb_mode = LB_RGB_2560X4;
-	else if (!is_yuv)
-		lb_mode = LB_RGB_1920X5;
-	else if (width > 1280)
-		lb_mode = LB_YUV_3840X5;
-	else
-		lb_mode = LB_YUV_2560X8;
+	if (is_yuv) {
+		if (width > 1280)
+			lb_mode = LB_YUV_3840X5;
+		else
+			lb_mode = LB_YUV_2560X8;
+	} else {
+		if (width > 2560)
+			lb_mode = LB_RGB_3840X2;
+		else if (width > 1920)
+			lb_mode = LB_RGB_2560X4;
+		else
+			lb_mode = LB_RGB_1920X5;
+	}
 
 	return lb_mode;
 }
-- 
2.7.4

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

end of thread, other threads:[~2018-06-27 13:35 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17 10:15 [PATCH] drm/rockchip: vop: fixup linebuffer mode calc error Sandy Huang
2018-04-17 10:15 ` Sandy Huang
2018-04-17 10:15 ` Sandy Huang
2018-04-17 11:14 ` Heiko Stuebner
2018-04-17 11:14   ` Heiko Stuebner
2018-04-17 11:14   ` Heiko Stuebner
2018-04-19 12:03   ` Sandy Huang
2018-04-19 13:14   ` Sandy Huang
2018-04-19 13:14     ` Sandy Huang
2018-06-26  8:16 Sandy Huang
2018-06-26  8:16 ` Sandy Huang
2018-06-26  8:16 ` Sandy Huang
2018-06-26  8:22 ` Heiko Stübner
2018-06-26  8:22   ` Heiko Stübner
2018-06-26  8:22   ` Heiko Stübner
2018-06-27 13:10 ` Heiko Stuebner
2018-06-27 13:10   ` Heiko Stuebner
2018-06-27 13:10   ` Heiko Stuebner

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.