Commit Graph

115 Commits

Author SHA1 Message Date
Chris Michael 845dbaf7da ecore-drm: Remove useless return
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-20 10:17:08 -04:00
vivek 0fb11c15a1 ecore-drm: Added initial support to check if drm device is hotplug and update outputs
Summary:
Added watch to check if drm output device is hotplug and update the
outputs accordingly.

NB: This is only partially complete. The actual update of outputs
still needs to be implemented.

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1552
2014-10-20 10:16:32 -04:00
Chris Michael 7135d1967d ecore-drm: Fix drm cards on ARM platform not having boot_vga parameter
Summary:
On some ARM platforms, the drivers do not list boot_vga as an
attribute, so we cannot do checks for that. This patch fixes finding
drm cards on those platforms by skipping the boot_vga check if we had
to use "platform" to find it.

Thanks to shiin for the report :)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-08 10:06:45 -04:00
Chris Michael 1c77bdf2d1 ecore-drm: Fix failure of finding drm device on ARM platforms.
Summary:
On some ARM platforms we were failing to find the drm device card.
This was due to those ARM platforms using SUBSYSTEM="platform" as a
udev attribute instead of "pci". This fixes that issue so that those
devices are found again.

Thanks to shiin for the report :)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-08 09:31:37 -04:00
Chris Michael 61a6f5b8ae ecore-drm: Remove the FIXME note
Summary: Apparently, it's better if we just let this fail rather than
trying to be proactive for the API user.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-06 10:08:19 -04:00
Chris Michael cfea1e9322 Revert verifying anything passed in to the API.
Revert "ecore_drm: Verifying if name format is /dev/xyz before assigning to tty."

This reverts commit 5ebc31908e.
2014-10-06 10:07:22 -04:00
Chris Michael c644155ac6 Revert "ecore-drm: Fix formatting"
This reverts commit d4e4038e52.
2014-10-06 10:07:07 -04:00
Chris Michael d4e4038e52 ecore-drm: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-06 09:16:11 -04:00
Srivardhan Hebbar 5ebc31908e ecore_drm: Verifying if name format is /dev/xyz before assigning to tty.
Summary: Because this is an exposed API function, we should be
checking that the name parameter is valid, and also verify it's
formatting before we use it. This patch fixes that by comparing the
passed in name and assembling a valid tty name to open

@fix

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1521
2014-10-06 09:14:30 -04:00
Srivardhan Hebbar dee101b08f ecore_drm: Removed unwanted FIXME line.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1520
2014-10-06 08:41:38 -04:00
Srivardhan Hebbar 56f3d4cadf ecore_drm: Removed hard coded seat value.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1519
2014-10-06 08:32:01 -04:00
vivek 4125f1cef9 ecore-drm: Added private function to cleanup backlight structure
Summary:
Added _ecore_drm_output_backlight_shutdown function to clean up
the resources related to backlight structure and initialized backlight structure
in _ecore_drm_output_create.

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1501
2014-09-29 09:28:58 -04:00
vivek 9b84f98e27 ecore-drm: Added internal function to set output brightness level
Summary:
Added _ecore_drm_output_brightness_set function to set brightness level

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1499
2014-09-29 08:52:39 -04:00
vivek 4d54525d47 ecore-drm: Fix _device_add function to check input
Summary:
Add condition to check if input is NULL in _device_add function

@fix

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1493
2014-09-26 09:04:53 -04:00
Chris Michael 2bc462f55b ecore-drm: Don't crash if we get no devpath from Eeze
Summary: During a device remove event, we should check that Eeze has
returned us a devpath to remove else we segfault when trying to strcmp
the device path later during actual remove.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-25 12:04:23 -04:00
Chris Michael 44e2cde623 ecore-drm: Add some more debug information if a device fails to open
Summary: This is mainly for debugging, but lets print out a bit more
information if a device fails to open.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-25 11:46:46 -04:00
Chris Michael b81cafcd7b ecore-drm: Fix adding an input device when we don't get the devpath
from Eeze.

Summary: If we fail to get a devpath from Eeze for an input device,
then we need to error out gracefully and not add a failed input device.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-25 11:36:24 -04:00
Chris Michael 157c0598ed ecore-drm: Add an extra blank line just to separate code
Summary: This commit has no functional changes, just
cosmetic/formatting to make the code easier to read.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-24 10:03:47 -04:00
vivek af6cb4e84a ecore-drm: Added private functions to get brightness levels in backlight
Summary:
 Added private internal functions to get various brightness levels
   1) Added _ecore_drm_actual_brightness_get to get Actual brightness
   2) Added _ecore_drm_max_brightness_get to get Max brightness
   3) Added _ecore_drm_brightness_get to get Brightness
 These functions will eventually be exposed with an API for ecore-drm
to get/set the backlight level for an output.

@feature

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1482
2014-09-24 10:02:37 -04:00
Chris Michael e3c3ba4811 ecore-drm: Remove need to use an extra variable for storing device.
Summary: This commit just modifies the internal code to remove the
need for an extra variable. There really is no need to store the
device twice. We already have it in the list of returned devices.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-24 09:06:47 -04:00
Chris Michael e19fbbcd45 ecore-drm: Port ecore_drm_output backlight init code to use Eeze
Summary: This ports the current backlight_init code to use Eeze
library instead of udev functions directly.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:47:04 -04:00
Chris Michael a0395b07c5 ecore-drm: Port ecore_drm_inputs code to use Eeze instead of udev
Summary: This changes all of our internal ecore-drm input code to use
Eeze library instead of udev directly.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael 777e64fea5 ecore-drm: Remove udev from private header and add an Eeze_Udev_Watch
for Ecore_Drm_Input

Summary: This commit removes all references to 'udev' in the private
header, and replaces udev_monitor (in Ecore_Drm_Input structure) with
an Eeze_Udev_Watch.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael f16e061685 ecore-drm: Fix ecore_drm_device_find function to use Eeze
Summary: This converts the internal code of ecore_drm_device_find
function to use Eeze function calls instead of udev in order to locate
the drm card.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael 16d8352ebe ecore-drm: Remove references to udev functions and init Eeze during
startup

Summary: This removes the variable & function calls to udev and adds
code to initialize/shutdown Eeze.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael 9228a6ac6b ecore-drm: Fix comment to not mention udev
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael e35f3414d1 ecore-drm: Add Eeze as an internal dependency for ecore-drm
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael 368e9de044 ecore-drm: Remove internal dependency on libudev
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 15:31:12 -04:00
Chris Michael 0f24804c1a ecore-drm: Fix minor formatting issue
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-23 08:41:43 -04:00
vivek 05ea3edda5 Ecore_drm: Added initial support for backlight in ecore_drm module
Summary:
Added initial support for backlight in drm by adding various structures
and provided api for initializing the backlight struct.

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: devilhorns, stefan_schmidt

Subscribers: stefan_schmidt, cedric

Differential Revision: https://phab.enlightenment.org/D1448
2014-09-23 08:41:43 -04:00
Chris Michael 8490f5d282 ecore-drm: Rework internal dbus code to use Eldbus
Summary: This changes all of our internal dbus code for ecore-drm to
work with async Eldbus calls. This adds a potential delay to startup
in that input devices may not be immediately available for use, but is
unavoidable due to Eldbus not having a dbus function call to block for
a reply.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-22 15:57:12 -04:00
Chris Michael 500491069f ecore-drm: Rework input code to function with Eldbus
Summary: Eldbus runs async so we needed to rework the internal input
code to function with it. This commit changes the iternal code to
issue a device open, and then wait for Eldbus to return us a callback
from the proxy that the device open is finished. This Does add a delay
during startup (which means devices will not always be immediately
ready for use) but thus is the nature of Eldbus.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-22 15:54:37 -04:00
Chris Michael 21fe5e6eab ecore-drm: Fix some error/warn message formatting
NB: Nothing functional here, just alignment of error messages in output.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-22 15:44:50 -04:00
Chris Michael c60b348803 ecore-drm: Fix private function prototypes for new dbus functions
Summary: In porting Ecore_Drm to use Eldbus, I had to change some
internal functions to work with the async nature of Eldbus. As a
result, I had to modify some private local functions.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-22 15:43:37 -04:00
Chris Michael 6e384f2a87 ecore-drm: Include config.h in private header
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-22 14:18:53 -04:00
Chris Michael 29a3482704 ecore-drm: Add Eldbus header to private header file
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-22 14:18:53 -04:00
Chris Michael 42a97a98c2 ecore-drm: Fix drm VT switching to work again
This commit fixes VT switching in the ecore_drm library code to work
again. Previously we were not dup'ing the stdin fd which lead to
inappropriate ioctls for that fd. Fix that by adding the missing dup
call. This also adds more error messages during ioctl function calls,
and cleans up the switching handler code (for keyboard events).

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-15 15:45:31 -04:00
Chris Michael d91e607dd6 ecore-drm: Fix missing close of fd on _device_add
If we failed to create an evdev device for an input, we should also be
closing the fd before we return

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-15 15:43:14 -04:00
Chris Michael cc23711651 ecore-drm: Close input device fd on error during open and fix some
todo messages

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-15 15:42:26 -04:00
Chris Michael 20e97d07a3 ecore-drm: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-15 14:32:49 -04:00
MinJeong Kim 96a83aecfa ecore-drm: added vt switch key event handler
Summary:
Because vt mode of tty is set to VT_PROCESS,
ecore-drm is responsible for managing switch-to or switch-from other vt.
For that, ecore-drm has to handshake with kernel(tty driver).

 On switch-from side(A):
  1. Listen key event to satisfy vt switch key binding.
  2. ioctl(fd, VT_ACTIVE, switch-to-vt) for activating switch-to vt.
  3. Receive SIGUSR1(relsig) from kernel.
  4. Prepare releasing vt, and ioctl(fd, VT_RELDISP, 1).

 On switch-to side(B):
  0. Kernel receive VT_RELDISP with value 1(ok) from switch-from vt.
  1. Receive SIGUSR2(acqsig) from kernel.
  2. ioctl(fd, VT_RELDISP, VT_ACKACQ), and start to setup vt.

 This revision added A-1 step on above.

Test Plan:
 On booted PC with systemd.
 1. launch enlightenment_start with drm and wayland
 ex) ECORE_DRM_TTY=/dev/tty1 \
     E_WL_FORCE=drm \
     ELM_ENGINE=wayland_shm enlightenment_start
 2. try to switch vt by pressing "Ctrl + Alt + (F1 ~ F8)"

Reviewers: gwanglim, stefan_schmidt, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1280
2014-09-15 12:03:52 -04:00
Chris Michael f76180a501 ecore-drm: Add API function to get screen geometry
This adds a function that we can call from ecore_evas to get the
screen_geometry

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-04 11:18:23 -04:00
Chris Michael b59b3016e8 ecore-drm: Add API function for getting screen geometry
This adds an API function that we can call to return the screen
geometry. This will be used from ecore_evas to get the screen_geometry.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-04 11:18:23 -04:00
Gwanglim Lee fb861fc236 ecore-drm: Remove duplicated tty fd check
Summary:
No need to check tty fd again as we just did that.
Remove this and adjust indent.

Test Plan: N/A

Reviewers: devilhorns, stefan_schmidt, raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1407
2014-09-04 09:43:53 +02:00
Stefan Schmidt a941d9c2fd ecore/drm: Remove another leftover from dead spartacus 2014-09-02 11:45:02 +02:00
Stefan Schmidt a6178c13e9 ecore/drm: Fix typo in comment 2014-08-29 15:55:37 +02:00
Chris Michael 4fe1475b7f ecore-drm: Fix copy/paste build error
This line should not have been pasted (and it breaks build)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 15:55:05 -04:00
Chris Michael 41147645d7 ecore-drm: Add local function to free outputs and on any errors during
create, call it

Basically, this will fix a potential leak (and a potential case of a
false output getting added) IF during creation of outputs, something
fails.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 15:41:33 -04:00
Chris Michael 80c0a33267 ecore-drm: Print out failed device name during setup
If we fail to setup an input device, let's print an error With the
device name also

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-28 12:13:18 -04:00
Stefan Schmidt d8fb36e791 ecore/drm: Remove unused enums now that spartacus is gone 2014-08-28 17:56:04 +02:00