ecore-drm2: Don't assign plane to output list if test fails

There is little point in assigning a plane to the output list if the
atomic flip test fails.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-05-03 09:22:45 -04:00 committed by Derek Foreman
parent 0aac2db93a
commit 373e4b0684
1 changed files with 4 additions and 4 deletions

View File

@ -106,17 +106,17 @@ out:
plane->type = pstate->type.value;
plane->output = output;
DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id);
output->planes = eina_list_append(output->planes, plane);
if (!_fb_atomic_flip_test(output))
{
output->planes = eina_list_remove(output->planes, plane);
plane->state->in_use = EINA_FALSE;
free(plane);
return NULL;
}
DBG("FB %d assigned to Plane %d", fb->id, pstate->obj_id);
output->planes = eina_list_append(output->planes, plane);
return plane;
}