summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2_plane.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-04-27 15:44:22 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-05-05 12:53:21 -0500
commit308a11cfd680dd86005c9007cd92a7e930a2e323 (patch)
treeab99c923a373081eb15b437260e2f7e2d11edc1e /src/lib/ecore_drm2/ecore_drm2_plane.c
parent7dd8d6d163f98d6dc706636e8ae62b29480c4201 (diff)
ecore_drm2: Assign planes in ecore_drm2_plane_assign
Don't just test, allocate the resource, and then prevent further assignments from trying to use it as well.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_plane.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_plane.c b/src/lib/ecore_drm2/ecore_drm2_plane.c
index 044fd57d49..e02943904e 100644
--- a/src/lib/ecore_drm2/ecore_drm2_plane.c
+++ b/src/lib/ecore_drm2/ecore_drm2_plane.c
@@ -50,6 +50,9 @@ ecore_drm2_plane_assign(Ecore_Drm2_Output *output, Ecore_Drm2_Fb *fb)
50 /* use algo based on format, size, etc to find a plane this FB can go in */ 50 /* use algo based on format, size, etc to find a plane this FB can go in */
51 EINA_LIST_FOREACH(output->plane_states, l, pstate) 51 EINA_LIST_FOREACH(output->plane_states, l, pstate)
52 { 52 {
53 if (pstate->in_use)
54 continue;
55
53 /* test if this plane supports the given format */ 56 /* test if this plane supports the given format */
54 if (!_plane_format_supported(pstate, fb->format)) 57 if (!_plane_format_supported(pstate, fb->format))
55 continue; 58 continue;
@@ -90,6 +93,7 @@ out:
90 plane = calloc(1, sizeof(Ecore_Drm2_Plane)); 93 plane = calloc(1, sizeof(Ecore_Drm2_Plane));
91 if (!plane) return NULL; 94 if (!plane) return NULL;
92 95
96 pstate->in_use = EINA_TRUE;
93 pstate->cid.value = output->crtc_id; 97 pstate->cid.value = output->crtc_id;
94 pstate->fid.value = fb->id; 98 pstate->fid.value = fb->id;
95 99