path: root/src/lib/ecore_drm/ecore_drm_tty.c (follow)
AgeCommit message (Collapse)Author
2016-03-09ecore-drm: Update copyright noticeChris Michael
As portions of this code have been derived from existing code in Weston, we should also be including their copyright/licence text to give credit. NB: Fixes T3286 @fix Signed-off-by: Chris Michael <>
2016-01-21ecore-drm: Unify and cleanup tty codeChris Michael
This patch brings the tty code more inline with what the logind code Was doing. It also fixes the return value from the vt_signal handler, and opens the tty in non-blocking mode now. @fix Signed-off-by: Chris Michael <>
2016-01-14ecore_drm/ecore_wl2: logging: remove errant usage of %mDerek Foreman
Summary: printf %m stringifies and prints errno. I've tried to remove its use anywhere that the immediately preceding function might not set errno or is a complicated function for which knowing errno doesn't really give any useful information. I've left a few of the drmMode calls because they're just wrappers around ioctl, which legitimately sets errno. @fix Reviewers: zmike, devilhorns Reviewed By: zmike, devilhorns Subscribers: cedric, jpeg Differential Revision:
2016-01-07ecore-drm: Fix formattingChris Michael
NB: No functional changes Signed-off-by: Chris Michael <>
2015-10-30ecore-drm: Don't exit tty setup if tty is already in graphics modeChris Michael
Summary: If we go to setup a tty and it is already in graphics mode, then there is no need to exit with a failed setup here. Instead, we can actually continue to setup the tty. @fix Signed-off-by: Chris Michael <>
2015-10-14ecore-drm: Add missing field initializers for vt_modeChris Michael
Summary: clang reports missing field initializers for usage of vt_mode structure, so add the missing initializers @fix Signed-off-by: Chris Michael <>
2015-04-24ecore-drm: fix improper conditional syntax in _ecore_drm_tty_switch()Mike Blumenkrantz
2015-04-24ecore-drm: add safety checks to all EAPI functionsMike Blumenkrantz
2015-04-10ecore-drm: Move doxygen documentation to main Ecore_Drm headerChris Michael
Summary: This moves all doxygen to the main Ecore_Drm header to match rest of efl. @fix Signed-off-by: Chris Michael <>
2015-02-11ecore-drm: Disable/Enable inputs if we release/acquire the VTChris Michael
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 <>
2015-02-02ecore-drm: Trap for failure to dup stdinChris Michael
Summary: If we fail to duplicate stdin, we should write out an error and exit appropriately. @fix Signed-off-by: Chris Michael <>
2015-01-26ecore-drm: Cleanup tty code and handle vt signal trappingChris Michael
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 <>
2015-01-19ecore-drm: Restore tty keyboard mode on restore of ttyChris Michael
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 <>
2015-01-13ecore-drm: Re-enable setting K_OFF keyboard modeChris Michael
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 <>
2015-01-05ecore-drm: remove duplicated code from logind and tty.Seunghun Lee
Summary: integrates the code used in common. Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision:
2014-12-16ecore-drm: add error handling, when fail to setup tty.Seunghun Lee
Summary: need to restore vt to text mode, when failed to setup. @fix Reviewers: devilhorns Subscribers: cedric Differential Revision:
2014-12-10ecore-drm: Add event to notify session activation state.Seunghun Lee
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:
2014-12-10ecore-drm: restore VT to text mode when close tty.Seunghun Lee
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:
2014-12-10ecore-drm: cleanup data when failed to setup tty.Seunghun Lee
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:
2014-11-26ecore-drm: close fd handle if _ecore_drm_tty_setup() is failed in ↵Seunghun Lee
ecore_drm_tty_open(). Summary: added code to close fd handle and clear data. @fix Test Plan: N/A Reviewers: gwanglim, devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision:
2014-10-06ecore-drm: Remove the FIXME noteChris Michael
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 <>
2014-10-06Revert verifying anything passed in to the API.Chris Michael
Revert "ecore_drm: Verifying if name format is /dev/xyz before assigning to tty." This reverts commit 5ebc31908e7ac81a8f6ce0979a40ba7865a5bf48.
2014-10-06Revert "ecore-drm: Fix formatting"Chris Michael
This reverts commit d4e4038e52696d965b9107be5f5f9cdfff6c32ee.
2014-10-06ecore-drm: Fix formattingChris Michael
Signed-off-by: Chris Michael <>
2014-10-06ecore_drm: Verifying if name format is /dev/xyz before assigning to tty.Srivardhan Hebbar
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 <> Reviewers: devilhorns Subscribers: cedric Differential Revision:
2014-09-15ecore-drm: Fix drm VT switching to work againChris Michael
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 <>
2014-09-15ecore-drm: added vt switch key event handlerMinJeong Kim
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:
2014-09-04ecore-drm: Remove duplicated tty fd checkGwanglim Lee
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:
2014-07-17ecore-drm: Fix trapping of SIGUSR1 for VT switching signalsChris Michael
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 <>
2014-07-15ecore-drm: Reenable setting the VT to graphics modeChris Michael
Signed-off-by: Chris Michael <>
2014-03-10ecore-drm: Add API function to return the vt fdChris Michael
@feature: Added API function to return the file descriptor from the opened virtual terminal. This is needed for use in ecore_evas. When it sets up the canvas, we pass this fd to the canvas for use in setting up the vt framebuffers Signed-off-by: Chris Michael <>
2014-03-06ecore-drm: Add Ecore_Drm codeChris Michael
@feature: Add Ecore_Drm library code for setting up drm card, outputs, virtual terminals, framebuffers, and input for use with ecore_evas drm code. Signed-off-by: Chris Michael <>