summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_plane.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2_plane.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_plane.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c
index 2bf1917545..a75173bcfc 100644
--- a/src/lib/ecore_drm2/ecore_drm2_plane.c
+++ b/src/lib/ecore_drm2/ecore_drm2_plane.c
@@ -96,6 +96,7 @@ out:
96 pstate->in_use = EINA_TRUE; 96 pstate->in_use = EINA_TRUE;
97 pstate->cid.value = output->crtc_id; 97 pstate->cid.value = output->crtc_id;
98 pstate->fid.value = fb->id; 98 pstate->fid.value = fb->id;
99 pstate->fb = fb;
99 100
100 pstate->sx.value = 0; 101 pstate->sx.value = 0;
101 pstate->sy.value = 0; 102 pstate->sy.value = 0;
@@ -119,8 +120,7 @@ out:
119 return NULL; 120 return NULL;
120 } 121 }
121 122
122 fb->ref++; 123 _ecore_drm2_fb_ref(fb);
123
124 DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id); 124 DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id);
125 output->planes = eina_list_append(output->planes, plane); 125 output->planes = eina_list_append(output->planes, plane);
126 126
@@ -133,7 +133,10 @@ ecore_drm2_plane_release(Ecore_Drm2_Plane *plane)
133 EINA_SAFETY_ON_NULL_RETURN(plane); 133 EINA_SAFETY_ON_NULL_RETURN(plane);
134 EINA_SAFETY_ON_TRUE_RETURN(plane->dead); 134 EINA_SAFETY_ON_TRUE_RETURN(plane->dead);
135 135
136 plane->output->fbs = eina_list_append(plane->output->fbs,
137 plane->state->fb);
136 plane->dead = EINA_TRUE; 138 plane->dead = EINA_TRUE;
139 plane->state->fb = NULL;
137 plane->state->in_use = EINA_FALSE; 140 plane->state->in_use = EINA_FALSE;
138 _fb_atomic_flip_test(plane->output); 141 _fb_atomic_flip_test(plane->output);
139} 142}
@@ -163,8 +166,14 @@ ecore_drm2_plane_fb_set(Ecore_Drm2_Plane *plane, Ecore_Drm2_Fb *fb)
163 166
164 fallback_id = plane->state->fid.value; 167 fallback_id = plane->state->fid.value;
165 plane->state->fid.value = fb->id; 168 plane->state->fid.value = fb->id;
166 if (_fb_atomic_flip_test(plane->output)) return EINA_TRUE; 169 if (_fb_atomic_flip_test(plane->output))
167 170 {
171 _ecore_drm2_fb_ref(fb);
172 plane->output->fbs = eina_list_append(plane->output->fbs,
173 plane->state->fb);
174 plane->state->fb = fb;
175 return EINA_TRUE;
176 }
168 plane->state->fid.value = fallback_id; 177 plane->state->fid.value = fallback_id;
169 return EINA_FALSE; 178 return EINA_FALSE;
170} 179}