When we destroy outputs, we should be freeing the Output's Modes also
as that was previously allocated memory.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
What we've always wanted when getting the "current" FB is to get
the most recently submit one - this may be current, next, or pending.
Replace ecore_drm2_output_current_fb_get() with a function that gets the
most recent one - ecore_drm2_output_latest_fb_get(). Now callers don't
have to check the next buffer themselves first, and we don't have to
add an API for pending.
Instead of passing the user data for the page flip callback every time,
set it just once.
This will make it easier to push tick logic into ecore_evas_drm, as there
will be a transitional period where page flips are driven in two places
that don't have access to the same pointers.
If the first output we test is disconnected but has the crtc of
the primary display assigned then we'll fail to assign the crtc
to the connector it's really connected to later.
This is a quick hack as trying to sort this out properly may be
too invasive for the upcoming 1.18 and isn't really important until
1.19 supports multihead anyway.
As it turns out, when we vt-switch Back to a running Enlightenment,
it ends up processing all outputs and causes Evas to create a giant
canvas to cover all outputs. This new canvas causes a blank screen as
the pageflipping fails (due to fb being too large). As we do not yet
support output on more an one screen anyway, temporarily disable any
output which is not marked as primary.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Previously a drm event could create a new output or disconnect an output,
but could not re-enable an existing output.
This results in failure to properly wake from screen blanker.
Coverity reports that we end up leaking the return from
_output_name_get as the storage is never freed.
Fixes Coverity CID1357161
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
When we vt-switch away from a running session, we need to disable
rendering to an output and re-enable when we switch back. This patch
set essentially makes vt-switching work again in Enlightenment Wayland.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds 2 new API functions which are required by Ecore_Evas
in order for it to function with drm. These API functions allow for
restricting pointer movement, and for setting the window id which will
be used when sending input events
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds support for creating, deleting, and manipulating
framebuffer objects via exposed API.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds support for creating, destroying, and otherwise
working with outputs via exposed API functions.
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>