dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/rockchip: vop2: Register Esmart0-win0 as primary plane
@ 2022-09-26  8:16 Sascha Hauer
  2022-09-26 12:58 ` Chris Morgan
  2022-10-29 22:08 ` Heiko Stuebner
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2022-09-26  8:16 UTC (permalink / raw)
  To: dri-devel
  Cc: Sascha Hauer, Chris Morgan, Sandy Huang, linux-rockchip,
	Michael Riesch, kernel, linux-arm-kernel

Esmart0-win0 could serve as primary plane, so mark it as such. On
RK3568 this window will never be used as primary plane, because the
three windows at the beginning of the rk3568_vop_win_data[] array
will be used. On RK3566 however, two of the windows at the beginning
of the rk3568_vop_win_data[] array cannot not be used due to hardware
limitations, so without this patch we end up with CRTCs without primary
planes when multiple VPs are active.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
index 9bf0637bf8e26..9d30aa73b5422 100644
--- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
+++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
@@ -188,7 +188,7 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
 		.base = 0x1800,
 		.layer_sel_id = 2,
 		.supported_rotations = DRM_MODE_REFLECT_Y,
-		.type = DRM_PLANE_TYPE_OVERLAY,
+		.type = DRM_PLANE_TYPE_PRIMARY,
 		.max_upscale_factor = 8,
 		.max_downscale_factor = 8,
 		.dly = { 20, 47, 41 },
-- 
2.30.2


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

* Re: [PATCH] drm/rockchip: vop2: Register Esmart0-win0 as primary plane
  2022-09-26  8:16 [PATCH] drm/rockchip: vop2: Register Esmart0-win0 as primary plane Sascha Hauer
@ 2022-09-26 12:58 ` Chris Morgan
  2022-10-29 22:08 ` Heiko Stuebner
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Morgan @ 2022-09-26 12:58 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Sandy Huang, dri-devel, linux-rockchip, Michael Riesch, kernel,
	linux-arm-kernel

On Mon, Sep 26, 2022 at 10:16:43AM +0200, Sascha Hauer wrote:
> Esmart0-win0 could serve as primary plane, so mark it as such. On
> RK3568 this window will never be used as primary plane, because the
> three windows at the beginning of the rk3568_vop_win_data[] array
> will be used. On RK3566 however, two of the windows at the beginning
> of the rk3568_vop_win_data[] array cannot not be used due to hardware
> limitations, so without this patch we end up with CRTCs without primary
> planes when multiple VPs are active.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

I have been testing this for a few days and it works well for me on 2
distinct rk3566 based devices (Anbernic RG353P and Anbernic RG503).

Tested-by: Chris Morgan <macromorgan@hotmail.com>

> ---
>  drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> index 9bf0637bf8e26..9d30aa73b5422 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
> @@ -188,7 +188,7 @@ static const struct vop2_win_data rk3568_vop_win_data[] = {
>  		.base = 0x1800,
>  		.layer_sel_id = 2,
>  		.supported_rotations = DRM_MODE_REFLECT_Y,
> -		.type = DRM_PLANE_TYPE_OVERLAY,
> +		.type = DRM_PLANE_TYPE_PRIMARY,
>  		.max_upscale_factor = 8,
>  		.max_downscale_factor = 8,
>  		.dly = { 20, 47, 41 },
> -- 
> 2.30.2
> 

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

* Re: [PATCH] drm/rockchip: vop2: Register Esmart0-win0 as primary plane
  2022-09-26  8:16 [PATCH] drm/rockchip: vop2: Register Esmart0-win0 as primary plane Sascha Hauer
  2022-09-26 12:58 ` Chris Morgan
@ 2022-10-29 22:08 ` Heiko Stuebner
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2022-10-29 22:08 UTC (permalink / raw)
  To: Sascha Hauer, dri-devel
  Cc: Chris Morgan, Sandy Huang, linux-rockchip, Michael Riesch,
	kernel, linux-arm-kernel

On Mon, 26 Sep 2022 10:16:43 +0200, Sascha Hauer wrote:
> Esmart0-win0 could serve as primary plane, so mark it as such. On
> RK3568 this window will never be used as primary plane, because the
> three windows at the beginning of the rk3568_vop_win_data[] array
> will be used. On RK3566 however, two of the windows at the beginning
> of the rk3568_vop_win_data[] array cannot not be used due to hardware
> limitations, so without this patch we end up with CRTCs without primary
> planes when multiple VPs are active.
> 
> [...]

Applied, thanks!

[1/1] drm/rockchip: vop2: Register Esmart0-win0 as primary plane
      commit: de4a4c8f64021b02aaa8ab21a82fe1f11a17b975

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

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

end of thread, other threads:[~2022-10-29 22:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26  8:16 [PATCH] drm/rockchip: vop2: Register Esmart0-win0 as primary plane Sascha Hauer
2022-09-26 12:58 ` Chris Morgan
2022-10-29 22:08 ` Heiko Stuebner

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