ecore-drm2: Cleanup list of output planes on output_destroy

Small patch to make sure we free memory previously allocated for
hardware planes when we destroy an output

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-03-27 11:53:54 -04:00
parent 9dbf54e2f6
commit f1525ecf35
2 changed files with 6 additions and 1 deletions

View File

@ -906,11 +906,15 @@ _output_destroy(Ecore_Drm2_Device *dev, Ecore_Drm2_Output *output)
#ifdef HAVE_ATOMIC_DRM
if (_ecore_drm2_use_atomic)
{
Ecore_Drm2_Plane *plane;
Ecore_Drm2_Plane_State *pstate;
EINA_LIST_FREE(output->plane_states, pstate)
free(pstate);
EINA_LIST_FREE(output->planes, plane)
free(plane);
free(output->conn_state);
free(output->crtc_state);
}

View File

@ -711,7 +711,7 @@ struct _Ecore_Drm2_Plane
Ecore_Drm2_Fb *fb; // current fbo
Ecore_Drm2_Fb *qfb; // queued fbo
# ifdef HAVE_ATOMIC_DRM
Ecore_Drm2_Plane_State *plane_state;
Ecore_Drm2_Plane_State *state;
# endif
};
@ -775,6 +775,7 @@ struct _Ecore_Drm2_Output
Ecore_Drm2_Crtc_State *crtc_state;
Ecore_Drm2_Connector_State *conn_state;
Eina_List *plane_states;
Eina_List *planes;
# endif
Eina_Bool connected : 1;