Summary: This fixes a minor oversight in ecore_drm_output_mode_add
which was not setting the mode->flag to preferred if this is a
preferred mode.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we unplug an output, we should still be sending this event
so that the compositor can remove any unplugged outputs
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: libdrm has support for Virtual and DSI connector types, so
add those to the connector types
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Move the Eeze udev watch to inside the ecore_drm_device. This
allows us to only create One watch to catch all output changes. No
need for more than one watch (one per output) as was done previously
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This adds a w & h field to the Ecore_Drm_Fb structure so it
can be used from within the Evas engine
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: By default, we should be creating dumb buffers using XRGB8888
that way it does not matter if we have an alpha channel or not in the
buffer.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: logind has a seperate function to get the vt number.
@fix
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2252
Some fields (eg. data) may not be properly initialized.
Use calloc() instead of malloc() will ensure proper initialization
even if we add more fields.
These fields (data) would even be passed down to Evas as
Evas_Event_Key_Down for instance.
Summary: As there are various DVI and HDMI output names, update the
output connector types area to be more accurate so we get better
output names
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: To support multi-seat, ecore_drm need to issue the event to notify compositor of seat is added.
Test Plan: N/A
Reviewers: zmike, raster, gwanglim, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2212
Summary: When setting up the Eeze_Udev_Watch for output hotplug
events, we should also be listening for the "change" event. As eeze
will now check the HOTPLUG property for drm events, we don't need to
check that here.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This is mainly just a build fix. This issue occurred due to
the function declaration being After a call to use it while not having
a function prototype. This just adds the function prototype
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This patch adds more information so we can debug output
hotplug events better. It fixes an issue where any new outputs
from _ecore_drm_update_outputs where not getting the eeze udev watch
event created, and also addresses the issue of disconnected outputs
not sending the ecore_drm_event (both minor fixes)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
when enlightenment is working as wayland display server, enlightenment
changes KDSETMODE to KD_GRAPHICS in _ecore_drm_tty_setup(). However,
when enlightenment is killed by SIGSEGV, it doesn't changes KDSETMODE
to KD_TEXT because englightenment process doesn't call ecore_drm_tty_close().
To make possible enlightenment call ecore_drm_tty_close(), drm devices
should be exposed.
When enlightenment is killed by SIGSEGV, it will get drm devices with
ecore_drm_device_get_list(), and will call ecore_drm_launcher_disconnect(),
and ecore_drm_launcher_disconnect will call ecore_drm_tty_close() internally.
@feature
Change-Id: I1c594739ec96660a09cee77b823ace6548ee5282
Reviewers: zmike, cedric, raster, gwanglim, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2159
Summary:
Fix issue of invalid memory read from
ecore_drm_output_create. We call ecore_drm_output_crtc_find to get the
Index of the crtc to use, however prior to this commit the index was
not being returned (the actual crtc was)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewers: zmike
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2140
Summary: This implements edid parsing to obtain output make and model
so we can get better output names. This also fixes a false FIXME
statement in ecore_drm_output_physical_size_get function. As it turns
out, we don't need to get these values from edid parsing as they are
already available in the drm connector.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This adds an edid substructure to Ecore_Drm_Output so that
when we parse out EDID information, we have a place to store it
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This adds a function (ecore_drm_device_pointer_xy_get) to we
can return the mouse position inside ecore_evas_pointer_xy_get calls.
This is going to be used for centering the mouse when E-Wl starts up.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Using can result in motion being completely discarded. Since we
only need integer data, we also only actually forward on an event
when the mouse moves more than a full unit.
Reviewers: zmike, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2062
when dealing with non-kbd devices, the seat can be iterated to locate a keyboard
this may or may not accurately set depressed, latched, locked, group values
Summary: When we raise an event for an output, also include the output
id in the event structure. This will allow us to better identify which
output the event occured on.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
This provides callbacks to any bound wl_output listeners when a
display is hotplugged.
NOTE: Currently we don't receive hotplug events
ANOTHER NOTE: We don't yet handle display removal
Reviewers: devilhorns, zmike
Reviewed By: devilhorns, zmike
Subscribers: cedric
Maniphest Tasks: T2131
Differential Revision: https://phab.enlightenment.org/D2006
Summary: When we try to ReleaseDevice of our evdev structure, the
'path' which was getting passed to our logind code was incorrect. This
was due to libinput not providing a function to get the full device
path. We fix this by making some eeze udev calls to find this device
and get the full device path.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
input is destroyed
Summary: This fixes an issue where if you VT switch away from a
running Enlightenment and VT switch back, then input would no longer
be working. This was because we never called ReleaseDevice (dbus call)
when we destroyed a device, so any calls to recreate the device would
fail in libinput due to control already being taken.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we already have the ecore_event_handlers for logind, then
do not recreate them on logind_connect.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When we send_and_block, we should be checking the 'reply' for
errors, not the original message which was sent.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
We check for libinput 06 or higher. In version 0.8 they got an API break
(hopefully the last one before 1.0) which we did not support so far. I have
seen libinput 0.9 used on gentoo and newer ubuntu systems so we should
definitely support them.
Adding a LIBINPUT_HIGHER_08 define to check for this. So far we have only one
location where we need it. Once there is a libinput 1.0 we should remove the
support for older versions.
http://lists.freedesktop.org/archives/wayland-devel/2015-January/019383.html
Summary: If we send a dbus blocking message, and it returns an error
then we should be printing out this error message
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Due to libinput processing events directly from evdev, we
need to disable/enable input events when we release/acquire the vt.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Due to libinput process events directly from evdev, when we
VT switch we should disable/enable inputs accordingly.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
invalid id. Fix T2086
Summary: In order to avoid getting returned an invalid id, we should
not be checking the currently active encoder and crtc combination
because outputs may have changed, encoders/crtc combinations could
have changed, etc, etc.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: If we fail to duplicate stdin, we should write out an error
and exit appropriately.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The functions to take or release a session no longer accept session
name as a parameter, so fix calls to those functions
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The session take/release functions no longer need the session name
paramater, so remove that.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The session take/release functions no longer require the name of the
session, so remove the function parameter
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: These functions have been moved to the private header file
now, and thus this file is no longer needed.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Ecore_Drm_Device
Summary: This moves storing the session name and VT fields inside the
device structure. This also adds a field so we can store the keyboard
mode of the tty, and restore it on close.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This moves the logind function prototypes to the private
header and thus removes the need for a separate logind header file.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This moves the VT switch handling code to the tty file, and
sets the proper flags on the VT when opened.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This fixes a few issues with the logind code such as: Getting
the VT from systemd (if available), Properly setup the VT using proper
'open' flags, adding a 'restore' function to reset the tty properly,
and handle take/release session.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This cleans up the tty code a bit, and makes it the
responsibility of the tty code to handle VT switching signals
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This sets the default session to NULL when a device is
created. Also a formatting fix
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
take/release session control inside dbus functions
Summary: These changes move the storage of session name to inside the
Ecore_Drm_Device structure and remove calls to take/release session
control to outside of the dbus code
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: It turns out we don't need to handle open & setup of the tty
unless we are Not using systemd. This fixes an issue during
enlightenment restart where we are unable to reopen the tty.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When we shutdown outputs, we should reset the hardware cursor
state and the saved crtc mode in order to reset things back to normal.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When we are shutting down a tty, restore the old keyboard
mode that we retain from tty_setup.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Now that things are shaping up, we can re-enable the K_OFF
tty mode which will help with buffering input, etc.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This patch adds support to limit the mouse from moving
outside the output dimensions, and fixes coordinate transformation
calls to use the Output from the Input device
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This just removes the call to the no longer used/needed
function to update the input device's view of the output.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Since we now have a reference to the actual output inside the
input device, we no longer need this function to update the Input
device's view of the output size.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This adds an actual Ecore_Drm_Output pointer to the
Ecore_Drm_Evdev structure so we can check the output size to limit
mouse corrdinates.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: The dbus calls to TakeControl and ReleaseControl of a session
are actual Methods that need to be setup and called in order to
operate properly. As such, this commit fixes that issue by using the
proper eldbus method calls, and fixes an issue where shutting down
Enlightenment would lead to "cannot release control" error messages.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: We need to clean tty handlers and close the tty Before we can
call logind_disconnect as that function ends up shuttting down our
dbus connection.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: need to restore vt to text mode, when failed to setup.
@fix
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1777
Summary: When destroying evdev devices, we make calls to
libinput_device_unref ... but we cannot Make that call if the libinput
context has been destroyed already (as happens when we free input). So
to fix, don't release the libinput context until all devices have been
released.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
some formatting.
Summary: This commit saves from declaring variable for
Ecore_Drm_Sprite unless we are going inactive and need to iterate
sprites. (and also fixes some formatting)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
this event is to notify session activation state to compositor.
thus compositor can change composite state by this event.
Reviewers: devilhorns
Subscribers: torori, cedric
Differential Revision: https://phab.enlightenment.org/D1767
Summary: This fixes the touch events to actually send button down/up
when the proper touch event occurs
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When the output size gets updated, it could end up changing
the device calibration (wrt input event transformation), so we should
update the device calibration also
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
device structure
Summary: This is used to update all input devices as to the new output
size so that input device events can get their coordinates transformed
into output coords
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
function for setting size
Summary: This is needed so that events for mouse, touch, etc can get
transformed into output coordinates
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: When we exit the backlight_init function, we should
stringshare_del the returned device strings from eeze properly
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This adds code to handle various touch events (up, down,
motion) so that touchscreen devices can work with ecore_drm.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This was causing crashes in libinput when trying to print out
via eina_log. Disable/Remove it. Let libinput print it's own logs.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: if ecore-drm failed to be run after changing tty mode, need to restore VT to text mode.
Test Plan:
- run enlightenment(drm backend) without systemd.
after changing tty graphics mode, if it's failed to be run by any reason,
you'll see black screen and coulnd't control session.
@fix
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1764
Summary: added code to free string of tty's name when failed to setup tty.
@fix
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1763
Summary: need to clean also dbus, when failed open VT as a connection progress of logind.
@fix
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1756
Summary: This ports the input code of ecore_drm to make use of
libinput for handling of devices, events, etc
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: We can only call _ecore_drm_logind_device_close if we have an
actual device string. It is possible that this Could get called with
NULL, and thus cause a crash.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: With the port to libinput, some fields in the input & evdev
structures are not needed anymore, so this commit cleans those up.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
- allow to launch drm backend without systemd-logind with root privilege.
- allow to open drm device node via logind, not directly open it, in case exist systemd-logind.
- fixes issue that couldn't switch session, because ecore-drm couldn't drop master to drm device with no permission. (allow to switch session appropriate.)
Reviewers: gwanglim, devilhorns
Subscribers: torori, cedric
Differential Revision: https://phab.enlightenment.org/D1704
Summary: it seems eldbus_message_arguments_get() should be received all arguments to return success.
@fix
Reviewers: devilhorns, gwanglim
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1703
Summary:
Resolved TODO to set Active and State property of login1.Session
Set Active = true and State = 'active' via eldbus_proxy_property_set
@fix
Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1696
Summary: setting flag of O_RDWR by F_SETFL is no effect. it's ignored.
@fix
Reviewers: gwanglim, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1695
Summary: the function return -1 if it's failed so checking for ! is
incorrect. We should check if the return is less than zero.
@fix
Reviewers: gwanglim, devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1682
Summary:
Added internal function _ecore_drm_update_outputs which will update the
outputs if the drm device is hotplug
@fix
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1565
Summary: These functions were never exposed via API/Header, and never
used internally. Since drm gbm stuff is handled inside the gl_drm evas
engine now, we don't need this code here.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: These functions were never exposed in the header, and were
also already commented out. This commit just removes the dead comments.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Cleaned up all unwanted code's in ecore_drm. This just
removes a bunch of already commented out code.
@fix
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1615
first.
Summary: If someone calls ecore_drm_shutdown without first calling
ecore_drm_init, then the init count is wrong. Warn the caller.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
If _ecore_drm_init_count goes below zero, then when next time ecore_drm_init is called, it won't do the initializations which it is supposed to do. So preventing this scenario by not making it go
below zero in _ecore_wl_shutdown function.
@fix
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Reviewed By: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1573
Summary:
Added code to cleanup backlight structure and to close the drm device and
delete it.
@fix
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1566
Summary: We cannot call drmModeFreeCrtc with an invalid crtc, so check
that it is set inside the output structure before trying to make this
call
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: There is no point in having different code in each output
free function (internal one and API exposed one), so let's unify the
code here.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Added _ecore_drm_output_device_is_hotplug API to check if the
drm device is hotplug device. It returns EINA_TRUE if device is
hotplug else returns EINA_FALSE
@feature
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1559
when we free the output.
Summary: This commit fixes an issue where a hotplug watch was Only
being added for One input, and also deletes any created watch during
output_free.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
after the device loop.
Summary: If there are no outputs created during the loop, we would end
up crashing here by checking output->watch. This fixes that situation
without leaking resources because we still end up doing our cleanup.
NB: Thanks Cedric for the report !! :)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Added watch to check if drm output device is hotplug and update the
outputs accordingly.
NB: This is only partially complete. The actual update of outputs
still needs to be implemented.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1552
Summary:
On some ARM platforms, the drivers do not list boot_vga as an
attribute, so we cannot do checks for that. This patch fixes finding
drm cards on those platforms by skipping the boot_vga check if we had
to use "platform" to find it.
Thanks to shiin for the report :)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
On some ARM platforms we were failing to find the drm device card.
This was due to those ARM platforms using SUBSYSTEM="platform" as a
udev attribute instead of "pci". This fixes that issue so that those
devices are found again.
Thanks to shiin for the report :)
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Apparently, it's better if we just let this fail rather than
trying to be proactive for the API user.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Because this is an exposed API function, we should be
checking that the name parameter is valid, and also verify it's
formatting before we use it. This patch fixes that by comparing the
passed in name and assembling a valid tty name to open
@fix
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1521
Summary:
Added _ecore_drm_output_backlight_shutdown function to clean up
the resources related to backlight structure and initialized backlight structure
in _ecore_drm_output_create.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1501
Summary:
Add condition to check if input is NULL in _device_add function
@fix
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1493
Summary: During a device remove event, we should check that Eeze has
returned us a devpath to remove else we segfault when trying to strcmp
the device path later during actual remove.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This is mainly for debugging, but lets print out a bit more
information if a device fails to open.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
from Eeze.
Summary: If we fail to get a devpath from Eeze for an input device,
then we need to error out gracefully and not add a failed input device.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This commit has no functional changes, just
cosmetic/formatting to make the code easier to read.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Added private internal functions to get various brightness levels
1) Added _ecore_drm_actual_brightness_get to get Actual brightness
2) Added _ecore_drm_max_brightness_get to get Max brightness
3) Added _ecore_drm_brightness_get to get Brightness
These functions will eventually be exposed with an API for ecore-drm
to get/set the backlight level for an output.
@feature
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1482
Summary: This commit just modifies the internal code to remove the
need for an extra variable. There really is no need to store the
device twice. We already have it in the list of returned devices.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This ports the current backlight_init code to use Eeze
library instead of udev functions directly.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This changes all of our internal ecore-drm input code to use
Eeze library instead of udev directly.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
for Ecore_Drm_Input
Summary: This commit removes all references to 'udev' in the private
header, and replaces udev_monitor (in Ecore_Drm_Input structure) with
an Eeze_Udev_Watch.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This converts the internal code of ecore_drm_device_find
function to use Eeze function calls instead of udev in order to locate
the drm card.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
startup
Summary: This removes the variable & function calls to udev and adds
code to initialize/shutdown Eeze.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Added initial support for backlight in drm by adding various structures
and provided api for initializing the backlight struct.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewers: devilhorns, stefan_schmidt
Subscribers: stefan_schmidt, cedric
Differential Revision: https://phab.enlightenment.org/D1448
Summary: This changes all of our internal dbus code for ecore-drm to
work with async Eldbus calls. This adds a potential delay to startup
in that input devices may not be immediately available for use, but is
unavoidable due to Eldbus not having a dbus function call to block for
a reply.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Eldbus runs async so we needed to rework the internal input
code to function with it. This commit changes the iternal code to
issue a device open, and then wait for Eldbus to return us a callback
from the proxy that the device open is finished. This Does add a delay
during startup (which means devices will not always be immediately
ready for use) but thus is the nature of Eldbus.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: In porting Ecore_Drm to use Eldbus, I had to change some
internal functions to work with the async nature of Eldbus. As a
result, I had to modify some private local functions.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit fixes VT switching in the ecore_drm library code to work
again. Previously we were not dup'ing the stdin fd which lead to
inappropriate ioctls for that fd. Fix that by adding the missing dup
call. This also adds more error messages during ioctl function calls,
and cleans up the switching handler code (for keyboard events).
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If we failed to create an evdev device for an input, we should also be
closing the fd before we return
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Because vt mode of tty is set to VT_PROCESS,
ecore-drm is responsible for managing switch-to or switch-from other vt.
For that, ecore-drm has to handshake with kernel(tty driver).
On switch-from side(A):
1. Listen key event to satisfy vt switch key binding.
2. ioctl(fd, VT_ACTIVE, switch-to-vt) for activating switch-to vt.
3. Receive SIGUSR1(relsig) from kernel.
4. Prepare releasing vt, and ioctl(fd, VT_RELDISP, 1).
On switch-to side(B):
0. Kernel receive VT_RELDISP with value 1(ok) from switch-from vt.
1. Receive SIGUSR2(acqsig) from kernel.
2. ioctl(fd, VT_RELDISP, VT_ACKACQ), and start to setup vt.
This revision added A-1 step on above.
Test Plan:
On booted PC with systemd.
1. launch enlightenment_start with drm and wayland
ex) ECORE_DRM_TTY=/dev/tty1 \
E_WL_FORCE=drm \
ELM_ENGINE=wayland_shm enlightenment_start
2. try to switch vt by pressing "Ctrl + Alt + (F1 ~ F8)"
Reviewers: gwanglim, stefan_schmidt, devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1280
This adds an API function that we can call to return the screen
geometry. This will be used from ecore_evas to get the screen_geometry.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
No need to check tty fd again as we just did that.
Remove this and adjust indent.
Test Plan: N/A
Reviewers: devilhorns, stefan_schmidt, raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1407
create, call it
Basically, this will fix a potential leak (and a potential case of a
false output getting added) IF during creation of outputs, something
fails.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
We use conn here for a global Dbus connection variable as well as sometimes
in a local scope. Better rename the global one to avoid confusion and
potential failures when the code would fallback to the global one even if
the local scope should be used and the var was simply forgotten.
switching
Summary:
When vt is released by SIGUSR1, drm_inputs have to be disabled.
For that this revision includes,
1. Unrefer udev monitor
2. Remove fd handler for udev monitor
3. Release dbus device
Reviewers: stefan_schmidt, devilhorns, gwanglim
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1268
If an error occurs during ecore_drm_init, we need to cleanup things in
the proper order. This fixes the case where ecore_event_shutdown and
ecore_shutdown May Not have been called (in previous revision) due to
the error conditions being out of order.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
SIGUSR1 is used here to catch VT switching and either acquire or
release the VT. The problem is that XWayland Also sends SIGUSR1 when
it has finished initializing. In order to not get confused about where
the SIGUSR1 came from we can check the pid inside the siginfo
structure and see if it matches.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As input is sorted out here (for now), we don't need to be so noisy
and printout extra debug stuff
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This removes calls to the ecore_drm slave binary, and makes use of our
new dbus function calls to open an input device
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we don't need to spawn the suid binary anymore, we can remove all
the old code that was doing socketpair, passing messages, etc, etc.
Replace with proper ecore_drm_dbus function calls.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This feature allows us to open input devices and receive events from
them as a normal user without the need for special input device
permissions, or the need for a slave suid binary.
NB: This will only wor with dbus & systemd support
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Since we have already called ecore_event_init prior to using any udev
functions, if udev fails for some reason or another, we should also
shutdown ecore_event subsystem.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If we have a CRTC already configured save the work to search for a new
crtc and encoder combination that works with this connector. Just use what
we have.
Also always check if the CRTC is already allocated for a different connection
before using it.