Commit Graph

68 Commits

Author SHA1 Message Date
JengHyun Kang b3dc27345a ecore-drm: Add a new API for keymap cache
Summary:
Originally, each keyboard devices could have their own keymap.
The one keyboard's keymap could different with others.
But for this, Ecore_Drm compile a new keymap when a keyboard is connected.
But this is a burden for some people who doesn't manage keymap for each keyboard.
They want to maintain only one keymap for system.
So, I added cached context/keymap and just ref/unref for each keyboard device.
People who want to different keymap for each keyboard just do not set cached
context/keymap. Then Ecore_Drm maintain keymaps about each keyboard devices.

Test Plan:
Connect a keyboard device and watch flow of ioctl.
Originally Ecore_Drm opened xkb data and compile keymap,
but after patch, that ioctl is disppeared.

@feature

Reviewers: raster, devilhorns, ManMower

Reviewed By: devilhorns, ManMower

Subscribers: cedric, input.hacker, ohduna, jpeg

Differential Revision: https://phab.enlightenment.org/D3503
2016-01-04 08:47:58 -05:00
JengHyun Kang eb9b894167 Add a new Ecore_Drm API for setting left-handed mouse
Summary:
Add a new Ecore_Drm API named ecore_drm_device_left_handed_set().
Libinput support various input options. Left handed mode is one of options.
Right-handed people and left-handed people use a mouse
using different button mapping.
So if a left handed option is enabled, libinput change right mouse button and
left mouse button.
So support this option, I added this api using libinput's left handed option.

@feature

Test Plan:
After set left handed mode, left mouse button generate button numbered 3,
and right mouse button generate button numbered 1.

Reviewers: raster, ManMower, devilhorns

Subscribers: ohduna, cedric, jpeg, input.hacker

Differential Revision: https://phab.enlightenment.org/D3431
2015-12-29 09:04:16 -05:00
Sung-Jin Park 936350d37f ecore-drm: Add APIs to support key remap functionality
Summary:
This adds two new APIs to enable/set key remap functionality and
a number of keys to be remapped to the other keys. As of now there is no
api to do this therefore we need to remap using linux utility such as
'setkeycodes'. By adding/calling these apis, each Ecore_Drm_Evdev device
will have its specific key remap hash and we can apply each remapping keys
for each key/keyboard device.

Test Plan:
(1) Enable key remap and set remapping of a key on a specific keyboard device
(2) Plug in the keyboard device and check the key is being remapped or not
(3) Check the other keys are coming normally
(4) Check the the remapping key on a specific keyboard doesn't affect to any other devices

Signed-off-by: Sung-Jin Park <input.hacker@gmail.com>

Reviewers: raster, zmike, gwanglim, ManMower, devilhorns

Subscribers: JHyun, ohduna, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3463
2015-12-28 09:24:58 -05:00
Chris Michael bcf3b442dd ecore-drm: Add API function to set a new mode on an output
Summary: This adds a new API function (ecore_drm_output_mode_set) that
we can use from within RandR code to set the resolution of an output
(or disable an output if NULL is passed in).

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:15 -04:00
Chris Michael 3aaa9f2f9f ecore-drm: Fix purpose of ecore_drm_output_enable/disable functions
Summary: These API functions should be used for enable/disable of a
given output. They were previously being misused to stop/start
rendering on an output when we VT switch away so now we add an
internal function we can call to disable/enable rendering.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:03 -04:00
Chris Michael e577a108cf ecore-drm: Add a 'name' field to Ecore_Drm_Event_Output
Summary: This adds a new 'name' field to the Ecore_Drm_Event_Output
structure so that when we catch drm output events in E, we can compare
this name to find an e_randr screen and update compositor's outputs.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 12:07:31 -04:00
Chris Michael 8a3441dfe9 ecore-drm: Add API function to test if an output can go on a given crtc
Summary: This adds a new API function to test if a given
Ecore_Drm_Output can be used on a given crtc. This is needed for DRM
RandR support

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 08:57:47 -04:00
Chris Michael 958b15c207 ecore-drm: Add new API function to mark an output as primary
Summary: This adds a new API function which we can use to mark a given
Ecore_Drm_Output as being the primary output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 2145cb18c2 ecore-drm: Add API function to find an output given a name
Summary: This adds a new API function to find an Ecore_Drm_Output
which matches a given name.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 03a242f263 ecore-drm: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 49de7d0ee8 ecore-drm: Add API function to get an output's crtc size
Summary: This adds a new API function to return an output's crtc size.
This is mainly used for drm RandR config in E

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 8120cdcc13 ecore-drm: Add API function to return primary output
Summary: This adds a new API function to return the output which is
marked as the primary output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 1ab4975491 ecore-drm: Add API function to return output modes
Summary: This adds a new API function to return a list of modes
supported on a given output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 34664306a9 ecore-drm: Add API function to return the edid of a given output
Summary: This adds a new API function to return the EDID string of a
given output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 130ad6d60f ecore-drm: Add API function to return if a given output has a backlight
Summary: This adds a new API function to call so we can check if a
given Ecore_Drm_Output has a backlight

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 4d2290847f ecore-drm: Add API function to return the connector type of a given output
Summary: This adds a new API function to return the connector type of
an Ecore_Drm_Output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael c4461ac5d8 ecore-drm: Add API function to return output connected state
Summary: This adds a new API function to check if a given output is connected or not.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -04:00
Chris Michael 2606735b39 ecore-drm: Add API function to return the name of an output
Summary: This adds a new API function to turn the name of a given Ecore_Drm_Output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -04:00
Chris Michael 29362040b2 ecore-drm: Add API function to return screen size range
Summary: This adds new API function to return the min & max width &
height of valid screen range for an Ecore_Drm_Device

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -04:00
Cedric BAIL ce5ccfb5be ecore: remove the need to order the header correctly for Windows. 2015-05-07 09:53:10 +02:00
Chris Michael 26ebd007af ecore-drm: Add missing doxy for ecore_drm_output_enable
Summary: This adds missing doxygen for function ecore_drm_output_enable

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-05 13:51:00 -04:00
Mike Blumenkrantz 4e7549683b ecore-drm: fix ecore_drm_devices_get() to return a const value
this is the internal device list, we're pretty hosed if someone decides
to free it because there's no const
2015-04-22 19:34:59 -04:00
Chris Michael 50c47e36eb ecore-drm: Add pending_flip field to Ecore_Drm_Fb
Summary: This adds a pending_flip field to Ecore_Drm_Fb structure so
that when we schedule a pageflip event we can wait until the flip is
complete before trying to reuse the buffer again.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-16 10:25:46 -04:00
Chris Michael 3cb5c2bf0b ecore-drm: Change @since 1.15 to @since 1.14 for newly added APIs
Summary: As requested by stefan, change newly added APIs to be @since
1.15

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael 10985880c2 ecore-drm: Add 2 new API functions for setting and sending framebuffers
Summary: This adds 2 new API functions we can use from within the evas
drm engine to set framebuffers as current, and to call a pageflip on
given buffers.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael a5d180b282 ecore-drm: Add an API function to return the connector id of an output
Summary: This adds an API function to return the connector id of a
given output.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 4a1cbeb258 ecore-drm: Whitespace removal
Summary: No functional changes, just removing whitespace

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael e18f82632d ecore-drm: Add API function to return an output's crtc id
Summary: This adds an API function to return the crtc id of an output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 63ff8eaf3d ecore-drm: Add API function to return an output crtc buffer id
Summary: This adds an API function to return an output's crtc buffer id

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael e11be98ed0 ecore-drm: Add API function to find an output at given coordinates
Summary: This commit adds an API function that can be used to find an
output given an x/y coordinate pair.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 70e8a00271 ecore-drm: Move doxygen documentation to main Ecore_Drm header
Summary: This moves all doxygen to the main Ecore_Drm header to match
rest of efl.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael db87e02ac6 ecore-drm: Remove unused API function that should not have been committed
Summary: This API was added in the header while testing a theory, and
should not have been committed.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 8f661eb5d1 ecore-drm: Move drm headers to Ecore_Drm
Summary: Since we only create one drm context in the drm_device
structure now, we need the drm headers to be included in Ecore_Drm.h

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 3832cd59b8 ecore-drm: Create drmEventContext Once during device open
Summary: This changes allows us to reuse the same drmEventContext once
so that when we get drm events, we are not constantly recreating the
drmEventContext.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael e1dfa64159 ecore-drm: Add API function to disable an output
Summary: This adds a new API function we can call to disable an Ecore_Drm_Output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 718ce414c1 ecore-drm: Add API to setup the drm device for software rendering
Summary: This adds an API we can call from ecore_evas to setup the
device for software rendering which will cause dumb buffers to be
created in the Ecore_Drm_Device structure.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael a3a6399c3a ecore-drm: Add API function to mark a Framebuffer as dirty
Summary: This adds an API function used to mark a framebuffer as dirty

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:49 +02:00
Chris Michael 0885834b68 ecore-drm: Add API function to set output gamma
Summary: This commit adds new API for setting gamma of an Ecore_Drm_Output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:49 +02:00
Chris Michael 3a0577bd76 ecore-drm: Add support for DPMS on an output
Summary: This commit adds support for setting DPMS level of an output.
This adds a new API function 'ecore_drm_output_dpms_set' to set the
level.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:49 +02:00
Chris Michael e5e0b0b506 ecore-drm: Fix formatting
Summary: NO functional changes, just formatting.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:41:13 +02:00
Chris Michael c7ced198e6 ecore-drm: Move Eeze Udev Watch to Drm Device
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>
2015-04-09 17:41:03 +02:00
Chris Michael 318f2c435a ecore-drm: Add width & height to Ecore_Drm_Fb structure
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>
2015-04-09 17:40:42 +02:00
Seunghun Lee 500e76fd53 ecore_drm: Add event of ECORE_DRM_EVENT_SEAT_ADD.
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
2015-03-24 10:45:11 -04:00
Boram Park 9baacf802d ecore-drm: add ecore_drm_devices_get to get the list of drm devices
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
2015-03-17 09:31:18 -04:00
Chris Michael aabf45071c ecore-drm: Add function to return the pointer xy of Ecore_Drm_Device
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>
2015-03-04 11:49:44 -05:00
Chris Michael 15a2178492 ecore-drm: Add output id to output event
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>
2015-02-23 13:58:42 -05:00
Derek Foreman 0d69422cca ecore-drm Add hooks for updating wl_output when outputs are hotplugged
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
2015-02-19 14:48:25 -05:00
Derek Foreman 5184ffec63 ecore-drm Add API for querying output parameters
Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Maniphest Tasks: T2131

Differential Revision: https://phab.enlightenment.org/D2005
2015-02-19 14:48:21 -05:00
Derek Foreman a915dcc9bd ecore-drm Fix typo
Reviewers: devilhorns, zmike

Reviewed By: devilhorns, zmike

Subscribers: cedric

Maniphest Tasks: T2131

Differential Revision: https://phab.enlightenment.org/D2004
2015-02-19 14:48:14 -05:00
Chris Michael 3c62f4222c ecore-drm: Move session and vt fields to store inside the
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>
2015-01-26 08:37:08 -05:00