Commit Graph

407 Commits

Author SHA1 Message Date
Chris Michael 0d6383d69f ecore-drm: Add missing variable 'dev'
Seems this should have been declared in the previously pushed patch,
but was missing.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-29 09:12:50 -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
Duna Oh cb23fd2af2 ecore-drm: Fix failure of setting/closing evdev->fd which causes fd leak
Summary:
When a input device is plugged in, _cb_open_restricted() is called before creating evdev.
So setting fd value on evdev was failed in _cb_open_restricted() and also closing evdev->fd was invalid.
Using a eina_hash which has 'path-fd' pairs, we can find fd value after evdev is created.

@fix

Test Plan:
(1) Multiple input devices are connected. Their evdev->fd remains zero or initial value.
(2) When one of those devices are plugged out, fd leak would happen.

Reviewers: raster, zmike, gwanglim, stefan_schmidt, devilhorns, ManMower

Subscribers: cedric, jpeg, Jeon, input.hacker

Differential Revision: https://phab.enlightenment.org/D3428
2015-12-15 10:28:39 -05:00
Duna Oh 21b1a3f221 ecore-drm: Add logical pointer x, y variable in seat for reflecting multiple pointer's movement
Summary: When one pointer moves, we should update the position of other devices.

Test Plan:
(1) Two pointer devices are connected.
(2) Move the cursor to (x, y) position using "device 1".
(3) When you move the cursor using "device 2", the cursor doesn't start from (x, y) position. This causes discontinuous mouse motion.

Reviewers: raster, zmike, gwanglim, stefan_schmidt, devilhorns, ManMower

Reviewed By: devilhorns, ManMower

Subscribers: cedric, Jeon, input.hacker, jpeg

Differential Revision: https://phab.enlightenment.org/D3384
2015-11-30 11:05:07 -05:00
Chris Michael 0210051a40 ecore-drm: Don't send mouse_move event too early
We cannot be sending an ecore_event for mouse move here as it is too
early in the startup process for that too happen. Raising the event
here never gets caught because the ecore_evas has not yet registered
for ecore_input listening.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-17 15:54:34 -05:00
Stefan Schmidt 8d19716865 ecore_drm: pass NULL to mmap() instead 0 for address
The second find of these. The other one was in evas generic loaders.
mmap() expects a void * as address here. If we want to let the kernel
choose the address we should really pass in NULL instead of the
integer 0.

Thanks goes to the sparse semantic parser for pointing this out.
2015-11-10 16:34:13 +01:00
Chris Michael ebf6d95ed6 ecore-drm: Remove unused function
As we no longer have an fd handler to listen on the drm fd, we don't
need this function anymore

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-05 09:37:48 -05:00
Chris Michael ff8b141f87 ecore-drm: Fix issue of hanging in read()
Summary: As we already call drmHandleEvent when we pageflip, we don't
need to be using an fd handler to catch them. This should fix T2791

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-05 09:01:36 -05:00
Chris Michael ae7a243c99 ecore-drm: Fix issue of duplicate page flips
Summary: If we already have a pending pageflip scheduled for a given
framebuffer, don't reschedule another one. This also includes a minor
fix when mmap'ing the framebuffer (previously was also mapped
PROT_READ).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-05 09:01:36 -05:00
Chris Michael f77ba645d5 ecore-drm: Check return value of drmHandleEvent and cleanup
Summary: drmHandleEvent will return 0 on success, or -1 on error. We
should trap for the error case so that we can cleanup any allocated
callback structures.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-04 12:44:29 -05:00
Chris Michael 49d9b3d303 ecore-drm: Don't always check fb size against dumb buffer
Summary: If we are running using gl_drm, then we don't need to create
software dumb buffers on the drm device. Since we may not have the
dumb buffers (only used in software rendering), then we should not
always be checking the framebuffer size against the dumb buffer size.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-04 09:40:54 -05:00
Chris Michael 34415c05bd ecore-drm: Add some debug printing for driver details
Summary: In efforts to debug some non-working drm issues for people,
it would be helpful to know what drivers and versions they are using.
This commit just adds some debug printing for that information

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-30 16:00:32 -04:00
Chris Michael 4ef8750733 ecore-drm: Don't exit tty setup if tty is already in graphics mode
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 <cp.michael@samsung.com>
2015-10-30 09:28:10 -04:00
Chris Michael a2c1faef70 ecore-drm: Add missing field initializers for vt_mode
Summary: clang reports missing field initializers for usage of vt_mode
structure, so add the missing initializers

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-14 09:37:20 -04:00
Marcel Hollerbach 46e9eed2c4 build: replace libsystemd-{daemon, journal} with libsystemd
Summary:
since all the libs got merged into libsystemd in 209, we can just check
for libsystemd

Reviewers: cedric

Subscribers: stefan_schmidt, morlenxus

Differential Revision: https://phab.enlightenment.org/D2984
2015-08-25 10:52:47 +02:00
Stefan Schmidt 19c6617d78 ecore_drm_evdev: Avoid shadowing a local variable.
input is already used within this function so rename it in the block.
2015-08-07 15:26:54 +02:00
Chris Michael 79b33928fa ecore-drm: Ignore key events that are not seat wide state changes
Summary: This patch adds some checks to make sure that we can ignore
key events which are not seat wide state changes.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-23 11:54:24 -04:00
Mike Blumenkrantz 121e7be4b6 Revert "ecore-input: add keysym to Ecore_Event_Key struct"
This reverts commit c3f3c4eba8.

this was audited and found to be impractical due to portability concerns
2015-06-29 13:18:01 -04:00
Chris Michael e399e9df4a ecore-drm: Quiet down output from libinput
Summary: As libinput has matured enough now, we can reduce the noise
in outputs logs by adjusting libinput log level priority

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-23 13:27:28 -04:00
Chris Michael 1d981756b9 ecore-drm: Fix setting proper output subpixel value
Summary: This adds a minor internal function to convert
DRM_MODE_SUBPIXEL values into something that the wayland protocol
supports.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-23 11:11:29 -04:00
Chris Michael c6b997eb17 ecore-drm: Fix issue of outputs not getting registered with the wayland registry
Summary: This fixes T2465: QT5 apps don't work. The issue here is that
when the randr code runs in E we make calls to
ecore_drm_output_enable/disable which is supposed to register the
outputs with the wayland registry. This was not happening due to the
enable/disabled checks at the top of these functions.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-23 11:11:29 -04:00
Chris Michael 6407b8a820 ecore-drm: Don't free an output on unplug
Summary: We should not be freeing an output when it gets unplugged (as
it may get replugged). Just disable rendering on that output

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:45 -04:00
Chris Michael 354fd6f67b ecore-drm: Don't crash when trying to disable an output
Summary: If we call these functions with an already disabled output,
we crash. Check for an output being 'enabled' before we make these
calls.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael 027d974004 ecore-drm: Remove erroneous error messages from EINA_SAFETY checks
Summary: As the gl_drm engine code will almost always pass NULL
rectangles, remove the EINA_SAFETY checks so that logs don't fill with
meaningles error messages.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael 8a4922132f ecore-drm: Remove call to set drm mode when creating an output
Summary: As it turns out, we don't need to make the call to set an
output mode during creation. The mode will end up getting set anyway
when we set the first buffer.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-21 10:51:29 -04:00
Mike Blumenkrantz c3f3c4eba8 ecore-input: add keysym to Ecore_Event_Key struct
currently only functional for x11, wl, drm

@feature
2015-05-20 14:50:46 -04:00
Chris Michael dcc73c8f9a ecore-drm: Only try to set the crtc mode if an output is connected
Summary: If an output is disconnected, then we should not be trying to
set the mode of it's CRTC as that is going to fail anyway.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-18 10:15:09 -04:00
Chris Michael 066ca5ffdd ecore-drm: Ignore output enabled flag when setting output mode
Summary: We really do not need to check the enable flag here because
if we are setting a valid mode, then we will be enabled anyway

NB: This makes it actually possible to Enable/Disable outputs in the
RandR config dialog of E-Wl ;)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-14 09:17:02 -04:00
Chris Michael eaf2b91a3d ecore-drm: Fix segfault if sending output event and output has no current mode
Summary: This fixes a segfault which could happen if we enable an
output before setting the output current mode. Now we test for an
output having a current_mode, and if not we use the crtc size when
sending the output event.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-14 08:36:57 -04:00
Chris Michael edf13dca59 ecore-drm: Remove debug output
Summary: This should not have been included in the previous push as it
was just debug noise which was added during testing

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:57:39 -04: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 d9b59f34d2 ecore-drm: Fix issue with output_current_resolution_get function
Summary: This fixes ecore_drm_output_current_resolution_get function
to properly operate if an output does not have a current mode assigned.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:15 -04:00
Chris Michael 7d5d06bb20 ecore-drm: Only send output events when we enable/disable an output
Summary: This reduces the number of output events that wl_drm module
will receive from ecore-drm. We now only send those events when an
output gets enabled/disabled where previously we were also sending
them during output creation.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:15 -04:00
Chris Michael 443010b465 ecore-drm: Greatly improve drm rendering speed
Summary: This greatly improves rendering speed in evas drm engine.
Previously we would always call drmModeSetCrtc regardless if it was
needed or not. These changes greatly improve rendering speed in drm as
we now only call drmModeSetCrtc if it is needed.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:42:10 -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 4073519cac ecore-drm: Skip not connected outputs when calculating geometry
Summary: When we make a call to get the geometry of all outputs, we
should be skipping ones which are not connected.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 12:07:31 -04:00
Chris Michael 723c24de31 ecore-drm: Fix finding possible crtcs
Summary: This fixes an issue when searching for possible crtcs that an
output can work on. Previously, we would end up not returning any
possible crtcs due to not looping the crtcs of the resource.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 12:07:31 -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 df28c380d3 ecore-drm: Fix ecore_drm_output_edid_get to return a hex string
Summary: As we will use the edid string inside RandR code to store
unique information about an output, we should be returning this edid
in a "readable" form.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-12 12:07:31 -04:00
Chris Michael 956eb9318b ecore-drm: Fix issue of edid parsing not ignoring string
Summary: When we are parsing the edid string, if the string is random
junk, then we need to ignore it. Prior to this commit, we were not
setting the returned text properly.

@fix

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 94adf30b93 ecore-drm: Add support for a Primary Output
Summary: As 'primary' output support is not implemented in hardware,
we need to support this feature via software. For now, the first
output returned via libdrm will be marked as 'primary' until user
changes it via config

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael c79922f392 ecore-drm: Set drm client capabilities to support universal planes
Summary: If we do not set client capabilities to support universal
planes, then libdrm does not expose the primary or cursor planes so
this adds a quick call to set DRM_CLIENT_CAP_UNIVERSAL_PLANES

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
Chris Michael 7df68b484b ecore-drm: Cleanup plane debug output
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 14:39:46 -04:00
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