From 11cd98e119901f1e06da491b0c8791850150dfe5 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 13 Feb 2024 14:28:57 +0000 Subject: [PATCH] ecore drm2 - use last plane found not first. makes it work on rk3588 this is a temporary hack until things change a bit... --- src/lib/ecore_drm2/ecore_drm2_plane.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c index 6dfa0bcb85..dd7a6691b4 100644 --- a/src/lib/ecore_drm2/ecore_drm2_plane.c +++ b/src/lib/ecore_drm2/ecore_drm2_plane.c @@ -43,7 +43,7 @@ ecore_drm2_plane_assign(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb, int x, int { Eina_List *l; Ecore_Drm2_Plane *plane; - Ecore_Drm2_Plane_State *pstate; + Ecore_Drm2_Plane_State *pstate, *pstate_chosen = NULL; if (!_ecore_drm2_use_atomic) return NULL; @@ -68,12 +68,12 @@ ecore_drm2_plane_assign(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb, int x, int continue; /* if we reach here, this FB can go on the cursor plane */ - goto out; + pstate_chosen = pstate; } else if (pstate->type.value == DRM_PLANE_TYPE_OVERLAY) { /* there are no size checks for an overlay plane */ - goto out; + pstate_chosen = pstate; } else if (pstate->type.value == DRM_PLANE_TYPE_PRIMARY) { @@ -82,10 +82,15 @@ ecore_drm2_plane_assign(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb, int x, int continue; /* if we reach here, this FB can go on the primary plane */ - goto out; + pstate_chosen = pstate; } } + if (pstate_chosen) + { + pstate = pstate_chosen; + goto out; + } return NULL; out: