We keep planes on the plane list to ensure a released plane is removed
from display - however this means that if a caller starts messing with
a plane after release, that it could potentially reposition a plane it
doesn't own anymore.
Use EINA_SAFETY macros to prevent this.
The release flag is actually less useful than the existing in_use flag
for determining if a plane is unused. If a new plane is assigned before
the next flip cleans up released planes, then it can point to a released
plane state, and both it and the previous user will be freed on the next
commit, leaking a plane.
Putting the flag in the plane structure fixes this while still allowing us
to keep released planes around to ensure a recently released plane is
cleared from atomic state.
If we don't do a flip test, the atomic state isn't updated. This fixes
a potential problem where the last operation in state preparation is
a release - the following commit wouldn't include state from the release.
This patch fixes plane_state values during atomic flip test for any
planes marked for release. When the fb_flip actually completes, we
will remove the marked plane(s) from the output.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we cannot immediately remove a plane from an output, due to needing
an atomic commit to actually remove the plane from screen, we can use
a 'release' flag to indicate that a given plane needs removal from the
screen during our next atomic commit.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we need to be able to commit a new plane state for any released
planes, we should not be removing them from the output list just yet.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Unfortunately the plane sized returned from the cursor plane query isn't
a limit, it's an exact size. Sometimes you can use a different size,
but that's completely hardware dependent - so stick to the advertised
size.
I think we're now at the point where the two paths are merged.
Still no atomic functionality because nothing assigned the primary plane,
so we have no atomic state to commit. The machinery should be in place
though.
We'll be doing tests as we build up plane state assignment. it's too late
to do anything about it if we fail here - failed tests will block plane
assignment in the first place so the scene graph knows it still has to
render those visual elements.
This will simplify a bunch of API that would otherwise have to pass in
both output and plane - and in some cases we might not have the output
handy anyway.
In cases where output monitors have different frequencies, we need to
be doing atomic commits on a per-output basis. This patch modifies the
ecore_drm2_fb_flip function to support doing atomic commits per output.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we need to do atomic commits on a per-output basis, these 2 newly
added API functions can go because these functions did one atomic
commit for all outputs
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As there is nothing inside this function which requires any Atomic API
calls, this #ifdef can be removed and the function can then still be
used to assign Primary planes for non-atomic use cases.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit fills in various output 'state' structures during creation
so that those state structures can be reused for pageflip handling
even if Atomic support is not enabled.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit enables the ability to fill our state structures even if
atomic support is not enabled. This will allow us to reuse those state
structures for dealing with pageflip in both the atomic & non-atomic
use cases.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As there is nothing 'atomic' specific in these structures, we can move
them outside the atomic ifdef and make use of them for handling
pageflip for both atomic and non-atomic use cases.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
There have been cases where the logic of _event_callback_call break'ed
too early in the event submission.
Reason for that was the line ((const unsigned char *) desc -
(const unsigned char *) it->desc) producing a overflow.
This means the if statement
if (!legacy_compare &&
((const unsigned char *) desc - (const unsigned char *) it->desc) < 0)
was true while the pointer desc was smaller than it->desc, which means
the event subscription got aborted, even if it should not.
This turned out on two 32 bit maschines. And led to not rendering apps
anymore.
It was introduced by commit in 605fec91ee.
@fix