Commit Graph

407 Commits

Author SHA1 Message Date
Chris Michael e8754ee9d2 ecore-drm: Set output connected property in the creation function
Summary: Makes more sense to set the output's connected property
inside the function which creates outputs.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 0341d08831 ecore-drm: Add some debug code to spit out planes and plane properties
Summary: This adds a debug function to spit out planes and their
properties while debugging rotation support

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 3aee7d1b6f ecore-drm: Add connector type to output structure
Summary: This adds a connector type field to the Output structure.
This will be used in the Enlightenment Drm rendering code for RandR
config

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:45 -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
Chris Michael 403e5ad385 ecore-drm: Remove debug noise
Summary: No real function changes, just commented out some debug lines
so we have less noise for release

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-04 11:41:25 -04:00
Derek Foreman ccbcf3db0b ecore-drm: close fd when asked to close fd
Summary:
the logind device close function just lets logind revoke fd permissions
but doesn't actually close the (now useless) fd.

@fix

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2457
2015-04-30 14:31:14 -04:00
Derek Foreman f7ae5f28d4 ecore-drm: don't return EINA_FALSE as an invalid fd
Summary:
0 is a valid fd.  EINA_FALSE is 0.  EINA_FALSE is a valid fd.

@fix

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2456
2015-04-30 14:29:51 -04:00
Derek Foreman c5a21aaf84 ecore-drm: append O_CLOEXEC always
Summary:
Seems libinput wasn't bothering to set this so all child processes get
their hands on input devices

@fix

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2455
2015-04-30 14:28:56 -04:00
Derek Foreman 1d887a1005 ecore_drm: close fd if flag set fails
@fix

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2454
2015-04-30 14:27:48 -04:00
Mun, Gwan-gyeong 34fd2cfa4a ecore-drm: add touch_motion event on touch_down event handler.
Summary:
  ecore-drm touch down handler does not produce ECORE_EVENT_MOUSE_MOVE event.
  so, when user touches screen, application can't handle mouse down event correctly.
  this fix adds touch_motion event on touch_down event handler.

Reviewers: zmike, cedric, raster, gwanglim, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2427
2015-04-29 08:55:06 -04:00
Boram Park 5c7cfdc133 ecore_drm: send a fake motion event to let other know the initial pos of mouse
Summary:
At the first time after finishing booting, the position of mouse cursor is in the
center of screen. But e doesn't know it. ecore_drm should let e know the initial
position of cursor by sending a fake motino event.

Reviewers: devilhorns, ManMower, zmike, raster, gwanglim

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2410
2015-04-29 08:54:03 -04:00
MinJeong Kim 45abf35ec0 ecore-drm: Fix using uninitialized output value
Summary:
This revision fixed using of uninitialized value 'output'.
The usage can cause segmentation fault when it try to refer current_mode

@fix

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2448
2015-04-29 08:47:32 -04:00
Mike Blumenkrantz e65de76e52 ecore-drm: shutup libinput log info 2015-04-28 16:12:55 -04:00
Mike Blumenkrantz 054fed5336 ecore-drm: fix multiclick interval time
libinput returns timestamps in milliseconds as int, not double
2015-04-24 13:40:32 -04:00
Mike Blumenkrantz 3a3552ec66 ecore-drm: fix improper conditional syntax in _ecore_drm_tty_switch() 2015-04-24 12:53:01 -04:00
Mike Blumenkrantz 3d71a10891 ecore-drm: add safety checks to all EAPI functions 2015-04-24 12:53:01 -04:00
Mike Blumenkrantz e95488ded5 ecore-drm: refactor _ecore_drm_output_backlight_init() to use fewer gotos 2015-04-23 13:21:32 -04:00
Mike Blumenkrantz e6ed330dce ecore-drm: use eeze_udev_find_by_filter() to only return relevant backlight devices 2015-04-23 13:17:25 -04:00
Mike Blumenkrantz 4d9b5b8f19 ecore-drm: restrict output backlight detection to drm device
previously this would pull in any available backlight device regardless
of whether it was actually attached to the device or output in any way
2015-04-23 13:12:18 -04:00
Mike Blumenkrantz c8c9da3e19 ecore-drm: fix uninitialized output mode pointers when creating outputs 2015-04-22 21:11:51 -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
Derek Foreman 67460e2d78 ecore_drm: Don't crash if a device is assigned a bad output
Summary:
If an input device is assigned via udev to an output that we can't find
we just assign it to the first output instead.

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2408
2015-04-22 14:32:16 -04:00
Chris Michael 39e380f754 ecore-drm: Change ecore_drm_fb_set warning level
Summary: This is not actually "critical", it just means that we tried
to set a dumb buffer of the wrong size. Ecore_Evas will call this
function again after the canvas has been resized to the proper size,
so just issue a WRN here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-21 13:59:56 -04:00
Chris Michael d5005d0efc ecore-drm: Use #if 0 to comment out unused function
Summary: It was mentioned on the mailing list to use #if 0 instead of
commenting the block. This does not change any functionality

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-20 12:15:13 -04:00
Chris Michael 6195910698 Revert "ecore-drm: Remove 'defined but not used' function"
This reverts commit d625167e07.

Reverting this to use #if 0 as suggested by q66
2015-04-20 12:14:27 -04:00
Chris Michael d625167e07 ecore-drm: Remove 'defined but not used' function
Summary: As we no longer require the idler to repaint outputs, comment
out the function that was defined for the idler.

NB: I left it commented (and not totally removed) just in case it is
needed for a later (undiscovered) issue

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-20 11:47:55 -04:00
Chris Michael 613e6ad934 ecore-drm: Don't fetch output geometry on every mouse movement
Summary: This is a better way to allow mouse movement across multiple
outputs as this does not require us to fetch output geometry on Every
mouse movement (as before).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-16 12:47:29 -04:00
Chris Michael b41ed6a6f8 ecore-drm: Fix mouse movement across multiple outputs
Summary: When running E-Wl with multiple outputs, we could not
previously move the mouse pointer across to the second output. This
commit fixes that issue.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-16 12:35:36 -04:00
Chris Michael 6d243f5672 ecore-drm: Fix hotplugging of outputs
Summary: In order to process hotplugging of outputs, we need to send
the 'dev' structure as data to the callback so that we can update
outputs. This fixes hotplugging of outputs when running E

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-16 10:51:56 -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 25de79b05a ecore-drm: Modify device pageflip function to accept ecore_drm_fb callbacks
Summary: This modifies the ecore_drm_device pageflip function to make
use of the ecore_drm_fb callbacks passed into the ecore_drm_fb_send
function

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:51 +02:00
Chris Michael 82ff6fc512 ecore-drm: Add private structure used during pageflip calls
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 e3440c4683 ecore-drm: Skip repaints if we are VT switched away
Summary: This allows us to skip output rendering if we are VT switched
away.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 0e35734ef9 ecore-drm: Update device active state on VT switch and use new output_disable function
Summary: This marks an Ecore_Drm_Device as active or not when we VT
switch. We do this so we can skip rendering if we are not active.

@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 5858513daa ecore-drm: Update drm device & output code to remove per-output dumb buffers
Summary: Since we now create the dumb buffers in the ecore_drm_device
structure, we don't need them on a per-output basis. This commit fixes
the output & device code to adjust to this.

@fix

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 2b554161fe ecore-drm: Remove per-output framebuffers
Summary: No real need for each output to have its own framebuffers as
we can just create dumb buffers in the drm device structure

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 53002d385e ecore-drm: Fix issue of outputs_geometry_get not skipping cloned outputs
Summary: When we make the call to outputs_geometry_get, we should NOT
include cloned outputs in the final size.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-10 11:09:50 +02:00
Chris Michael 8d1e57e52e ecore-drm: Delay destroy of output if there is a pending flip
Summary: If an output has a pending page flip, we cannot destroy it
until the page flip has completed. This commit adds support to delay
destroying an output until the page flip is completed.

@fix

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 f3edc3b20e ecore-drm: Improve drm output creation, mode detection, and cloning support
Summary: This refactors the output creation code to support better
mode detection, cloning of hotplugged outputs, and initial support for
setting of output gamma (API to follow)

@fix

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 dcda62c04e ecore-drm: Fix output_geometry_get function
Summary: This fixes an issue where heights of all outputs would get
added, thus causing the ecore_evas to be created at the wrong size.
Now, the height will be whichever output is larger.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:46:35 +02:00
Chris Michael 12dc91590d ecore-drm: Remove debug line from launcher
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:46:23 +02:00
Chris Michael c5d46c88ec ecore-drm: Set mode flag for preferred if this is the preferred mode
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>
2015-04-09 17:46:14 +02:00
Chris Michael 92e10af291 ecore-drm: Send ECORE_DRM_EVENT_OUTPUT on unplug also
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>
2015-04-09 17:45:43 +02:00
Chris Michael 9d0892b4f7 ecore-drm: Better output name format
Summary: Make output names match format reported from kernel

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:42:09 +02:00
Chris Michael 07ee56d555 ecore-drm: Fix formatting
Summary: NO functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:42:00 +02:00
Chris Michael 40945aa10c ecore-drm: Fix issue with edid_parse_string truncating strings
Summary: We should only truncate the string if it's greater than 4

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-09 17:41:33 +02:00
Chris Michael ec12d25057 ecore-drm: Add more connector types
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>
2015-04-09 17:41:24 +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
Chris Michael 2f62ebb223 ecore-drm: Create all framebuffers using XRGB8888 by default
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>
2015-04-09 17:40:22 +02:00
Marcel Hollerbach 94299e2bfd ecore_drm: use get_vt instead of parsing the tty attribute
Summary: logind has a seperate function to get the vt number.

@fix

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2252
2015-03-30 10:41:03 -04:00
Jean-Philippe ANDRE 0ef41604e8 Ecore: Use calloc() to initialize Ecore_Event_Key fully
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.
2015-03-25 15:34:23 -07:00
Chris Michael f0d0533c42 ecore-drm: Use better output names
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>
2015-03-24 15:35:31 -04: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
Mun, Gwan-gyeong 3c056419d7 ecore-drm: Fixed null pointer free
Summary:
Fixed null pointer free
         when sd_session_get_seat() fails, it does not allocate string.

Reviewers: zmike, cedric, raster, gwanglim, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2219
2015-03-24 09:11:07 -04:00
Chris Michael 2dc7ad52df ecore-drm: Fix issue of not getting updated for output hotplug events
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>
2015-03-23 12:17:11 -04:00
Chris Michael 3f7bf36046 ecore-drm: Fix build error caused by missing function declaration
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>
2015-03-21 16:38:47 -04:00
Chris Michael a2edb5958d ecore-drm: Add more debug info when output is created or updated
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>
2015-03-21 16:29:47 -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 9abc0ee76f ecore-drm: Return the index of the crtc from output_crtc_find
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
2015-03-11 17:09:49 -04:00
Chris Michael 2e319df7b0 ecore-drm: Implement edid parsing for Ecore_Drm_Output
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>
2015-03-04 14:53:06 -05:00
Chris Michael 02e7931aeb ecore-drm: Add edid structure to Ecore_Drm_Output
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>
2015-03-04 14:52:04 -05:00
Chris Michael 49beaeacf4 ecore-drm: Center mouse pointer on an output when it gets created
Summary: This sets the initial mouse pointer position to be at the
center of an output.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-04 11:49:44 -05: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 f23acbac81 ecore-drm: Fix formatting
Summary: No functional changes, just formatting fixes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-04 11:49:44 -05:00
Derek Foreman 95cb1938c2 Use doubles to store libinput's mouse motion
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
2015-02-27 10:40:38 -05:00
Mike Blumenkrantz a57df757a8 ecore-drm modifier updating is now functional
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
2015-02-26 21:51:00 -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 fd0de9ae5c ecore-drm: Fix issue with ecore_drm_evdev->path being incorrect
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>
2015-02-17 16:19:55 -05:00
Chris Michael 6597d39e90 ecore-drm: Fix issue of ecore_drm not calling ReleaseDevice when an
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>
2015-02-17 16:19:55 -05:00
Chris Michael 96cbbb3416 ecore-drm: Don't recreate ecore_event handlers if we already have them
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>
2015-02-17 16:19:55 -05:00
Chris Michael a5fe8a1e87 ecore-drm: Fix issue of checking improper eldbus message for errors
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>
2015-02-17 16:19:55 -05:00
Stefan Schmidt dc5a391d1c ecore/drm: Fix libinput >= 0.8 check
We need #if here as LIBINPUT_HIGHER_08 will be either 0 or 1

@fix
2015-02-12 18:38:51 +01:00
Chris Michael 5c68b659bb ecore-drm: Fix bad German formatting ;)
Summary: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-12 12:09:47 -05:00
Stefan Schmidt 52c48cfc21 ecore/drm: Add support for changed libinput API since 0.8
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
2015-02-12 18:06:12 +01:00
Chris Michael 9b24d378a3 ecore-drm: Print error when taking control of a device fails
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>
2015-02-11 15:42:02 -05:00
Chris Michael ab2487037f ecore-drm: Disable/Enable inputs if we release/aquire VT through logind
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>
2015-02-11 14:51:44 -05:00
Chris Michael 4f320a80df ecore-drm: Disable/Enable inputs if we release/acquire the VT
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>
2015-02-11 14:14:52 -05:00
Mike Blumenkrantz c0683bc2dd ecore-drm should not use sscanf when getting logind vt
this should be more robust for when something like "/dev/tty4" is passed

@fix
2015-02-10 16:24:39 -05:00
Chris Michael 92954b707c ecore-drm: Remove unused variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-05 11:21:36 -05:00
Chris Michael 773897b09b ecore-drm: Fix issue with ecore_drm_output_crtc_Find sending back an
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>
2015-02-05 11:08:36 -05:00
Mike Blumenkrantz 11311bf01c ecore-drm should probably send the expected (reversed) scroll z value 2015-02-03 19:18:01 -05:00
Chris Michael 37d21a4729 ecore-drm: Trap for failure to dup stdin
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>
2015-02-02 11:59:27 -05:00
Chris Michael 559b7d7ee6 ecore-drm: Fix formatting
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-02 11:46:50 -05:00
Chris Michael 8eb78df3bb ecore-drm: Remove session parameter for session take/release functions
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>
2015-01-26 08:37:09 -05:00
Chris Michael 3b4a989892 ecore-drm: Remove unused function parameter
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>
2015-01-26 08:37:09 -05:00
Chris Michael c853181533 ecore-drm: Remove session parameter for internal function
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>
2015-01-26 08:37:09 -05:00
Chris Michael bd41178fb0 ecore-drm: Remove logind header file
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>
2015-01-26 08:37:09 -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
Chris Michael feff00178e ecore-drm: Cleanup private header file
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>
2015-01-26 08:37:08 -05:00
Chris Michael 81a4731036 ecore-drm: Cleanup launcher code
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>
2015-01-26 08:37:08 -05:00
Chris Michael c7d557cf4e ecore-drm: Fix various issues with logind code
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>
2015-01-26 08:37:08 -05:00
Chris Michael e6970f4f8b ecore-drm: Cleanup tty code and handle vt signal trapping
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>
2015-01-26 08:37:08 -05:00
Chris Michael bee13a55e1 ecore-drm: Default device->session to NULL
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>
2015-01-26 08:37:08 -05:00
Chris Michael 5a62a760c0 ecore-drm: Store session name inside dev structure and don't
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>
2015-01-26 08:37:08 -05:00
Chris Michael 205430ceb4 Revert "ecore-drm: Don't init tty unless we are Not using systemd"
This reverts commit 28e4901d04.

This broke vt switching in drm so revert (for now) until we get the
systemd vt and setup handlers
2015-01-19 12:55:50 -05:00
Chris Michael 28e4901d04 ecore-drm: Don't init tty unless we are Not using systemd
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>
2015-01-19 12:48:41 -05:00
Chris Michael 21b34d4d84 ecore-drm: Reset output cursor and crtc mode on shutdown
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>
2015-01-19 12:48:41 -05:00
Chris Michael d38462f2eb ecore-drm: Restore tty keyboard mode on restore of tty
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>
2015-01-19 12:48:41 -05:00
Chris Michael 0c105e4f68 ecore-drm: Re-enable setting K_OFF keyboard mode
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>
2015-01-13 15:35:55 -05:00
Chris Michael 90ffc57f0c ecore-drm: Limit mouse movement to within the output size
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>
2015-01-13 10:35:52 -05:00
Chris Michael 30506f0d6d ecore-drm: Remove call to unused function
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>
2015-01-13 10:35:52 -05:00
Chris Michael 79a09007bc ecore-drm: Remove unused function
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>
2015-01-13 10:35:52 -05:00
Chris Michael 2eb0be048b ecore-drm: Add actual Outut to the Input device structure
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>
2015-01-13 10:35:52 -05:00
Chris Michael e2a9988e5e ecore-drm: Fix issue with TakeControl and ReleaseControl functions
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>
2015-01-06 13:01:31 -05:00
Chris Michael 32a7eecf50 ecore-drm: Fix incorrect launcher shutdown procedure
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>
2015-01-06 11:12:54 -05:00
Seunghun Lee 2db6ed0945 ecore-drm: remove duplicated code from logind and tty.
Summary: integrates the code used in common.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1796
2015-01-05 09:08:27 -05:00
Seunghun Lee c280e2f711 ecore-drm: add error handling, when fail to setup tty.
Summary: need to restore vt to text mode, when failed to setup.

@fix

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1777
2014-12-16 09:20:42 -05:00
Chris Michael 0b77b7f59f ecore-drm: Free devices before we release the libinput reference
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>
2014-12-10 14:26:52 -05:00
Chris Michael 6972d25dc9 ecore-drm: Don't declare sprite variable unless we need it, also fix
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>
2014-12-10 12:17:37 -05:00
Chris Michael d800e81d83 ecore-drm: Fix formatting
Summary: No functional changes, just formatting fixes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:14:25 -05:00
Chris Michael 7fbe17f5c4 ecore-drm: Fix formatting
Summary: No functional changes, just formatting fixes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:13:33 -05:00
Seunghun Lee 5720a350f9 ecore-drm: Add event to notify session activation state.
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
2014-12-10 12:12:21 -05:00
Chris Michael 5d767aff32 ecore-drm: Finish implementing touch events
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>
2014-12-10 12:01:59 -05:00
Chris Michael 9980082c6a ecore-drm: Also update device calibration when output size changes
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>
2014-12-10 12:01:59 -05:00
Chris Michael ea417ef9de ecore-drm: Comment out debug line for unhandled touch_frame event
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Chris Michael d3d5c80ad6 ecore-drm: Update pointer motion event coordinates
Summary: This fixes pointer motion events to be transformed based on
output coordinates

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Chris Michael ed12acbfc6 ecore-drm: Transform touch events into output coordinates
Summary: This updates touch events to be transformed into output
coordinates

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Chris Michael ce473d88a1 ecore-drm: Add internal function to set the output size in the input
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>
2014-12-10 12:01:58 -05:00
Chris Michael 64e005503b ecore-drm: Update input devices with new output size
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Chris Michael ff13e2d88d ecore-drm: Add output size to device structure and add internal
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>
2014-12-10 12:01:58 -05:00
Chris Michael 080ef1d984 ecore-drm: Fix formatting
Summary: No functional changes, just formatting fixes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00