ecore-drm2: Update plane state values based on FB

Summary:
When we are trying to set an FB onto a plane, we need to update the
plane state values to reflect any changes in the FB. Failure to do
this will result in Atomic Commit failures as the plane state values
will not match what the FB is.

ref T7690

@fix

Depends on D8110

Reviewers: raster, cedric, zmike

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8111
This commit is contained in:
Christopher Michael 2019-03-22 12:41:08 -04:00
parent 9d301e4e03
commit 10474986cc
1 changed files with 7 additions and 0 deletions

View File

@ -181,6 +181,13 @@ ecore_drm2_plane_fb_set(Ecore_Drm2_Plane *plane, Ecore_Drm2_Fb *fb)
fallback_id = plane->state->fid.value;
plane->state->fid.value = fb->id;
/* Update plane state based on fb */
plane->state->sw.value = fb->w << 16;
plane->state->sh.value = fb->h << 16;
plane->state->cw.value = fb->w;
plane->state->ch.value = fb->h;
if (_fb_atomic_flip_test(plane->output))
{
_ecore_drm2_fb_ref(fb);