Commit Graph

24375 Commits

Author SHA1 Message Date
Chris Michael 314a2364c6 Don't need to print error messages unless there is an error
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael 8bcc51addf Add call to close the tty if something fails
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael 2d7a7da291 When we try to open a tty, check that it is an actual & valid tty
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael 27a61cd4d0 Cleanup tty_open function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael e4c1a1fc33 Remove redundant variable (we don't need 'fd' here).
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael 77f023268d Remove debug print message
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael e2dfb240f6 Add function call to open default tty
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael b2590044e9 Add start of tty code for open/close/etc tty operations
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael 2f78806319 Add ecore_drm_tty file to build order
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael c537913e4d Add tty fields to Ecore_Drm_Device structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael 492f6bc150 Add operation for opening tty
This adds new enum values to Operation, and function prototypes for
tty open/code functions

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael e84800c8cb Add start of TTY_OPEN operation code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael cf2aa071cf Fix fd passing bugger/compiler warning
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:21 +00:00
Chris Michael fb0d304f14 Add code to open a drm device and send the resulting operation status
& fd back to parent process.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 1e19eac751 Get result of call to ecore_drm_device_open
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael e0bdbd62c1 Add function to receive operation result messages.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 43911a80fe Add private function prototype for receiving operation status messages.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 405b0865a4 Fix operation enum when opening device
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 055669d5c7 Rename drm operation enum members
We will eventually have a separate enum value for opening inputs vs
opening actual devices, so change enum now

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 79e42237f0 Remove compiler warning
Copy the device name (/dev/dri/card*) into a buffer so we can pass it
to the send function.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 3058e2f6bc Fix error message
Ecore_Drm_Device is an opaque structure (currently), so we cannot
print the device name here.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 4965f01088 Fix receiving messages from ecore_drm library
Previously, messages were not being sent/received properly
(incomplete). Ecore_Drm library will now send us messages in 2 parts
(opcode & data) so we need to change the message receiving code to
reflect that.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 68eb4ba837 Add function call to open a drm device. Store device id.
Calls to ecore_drm_device_open will now send a message to the slave
process to open the drm device.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael b12bdc779b Fix sending of messages to ecore_drm_launch slave
Previously, sending messages & fds did not quite work right...messages
were not being fully sent.

This fixes the problem by breaking the Ecore_Drm_Message into 2 parts
(iovs). Now we will send the opcode as one iov, and the data as another.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael bf2d1cc4b3 Add private function prototype for sending messages
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 56bcf2f107 Add 'id' field to Ecore_Drm_Device
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 2ec85c631e Add function call to try and open the drm device
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 47e3268628 Add functions to open and close a drm device
This just adds skeletons for those API functions. Actual code to
follow soon ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 461ffcd83d Add device path to Ecore_Drm_Device structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael d3dbfc27c8 Add API functions for device open & device close
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 04bdebcd04 Fix typo of incorrect device field
Ecore_Drm_Device has field 'devname' so that's the one we need to
cleanup

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 92fa2ed483 Start on code for ecore_evas_drm to find the graphics device
This adds a function call into ecore_drm library to discover the
default graphics card to use for drm.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 35580e3378 Add udev support to ecore_drm library. Also close the open sockets on
error.

This adds udev support for graphics card device enumeration. Udev will
also be used in ecore_drm for "other" devices too....

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 39f15e6142 Add ecore_drm_device file for device-specific functions
This adds the start of an ecore_drm_device file with functions that
will pertain to graphics devices (opening, closing, etc).

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 3b57f1ddcd Add udev header and start to define Ecore_Drm_Device structure.
Udev header is needed so we can do drm device discovery (among other
devices).

NB: The structure for Ecore_Drm_Device is NOT exposed to users of the
API currently. It may stay opaque....unclear yet. This structure is
NOT finalized !!! Do not try to use it !!

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael b41d7e67af Rework device API a bit and add a device_free function
This change adds a 'seat' parameter to the ecore_drm_device_find
function for located devices on a specific seat. This also adds a new
API function for freeing any returned Ecor_Drm_Device structure

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 056fb866e9 Include Eina.h header so we can make use of EINA_UNUSED
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 099e17f58a Add ecore_drm_device to build order
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 6e14f2c317 Remove unused variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 3459a23b09 Add code to start slave process, and code to send messages to it
This adds the ability for ecore_drm to launch the
ecore_drm slave process (for privileged device access), and to send
messages from ecore_drm library to the slave process.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael cda78b1b12 Add additional internal headers we need for various functions
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael e4d203762a Add operation support to ecore_drm (types and enums for message passing)
This adds a structure to be used for passing messages between
ecore_drm library and the ecore_drm_launch slave process. Also added
here is an enum for Operations, and an enum for Operation Results.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 0be06f44b3 Add ability for ecore_drm_launch slave process to receive messages
This adds the ability for ecore_drm_launch to accept and act on any
messages sent from ecore_drm library. This includes the ability to
pass file descriptors from ecore_drm library to the slave process for
opening/closing/etc.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 68d94c340e Fix Ecore_Drm Makefile to install slave process
This fixes the Ecore_Drm Makefile to install the ecore_drm_launch
slave process into a directory using MODULE_ARCH

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 70b603572b Add DRM to list of available engines
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 702e3d42eb Add code to ecore_evas drm engine to initialize ecore_drm and setup
the canvas.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael df98346938 Add start of ecore_drm_launch code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael 6475a69c29 Add start of ecore_drm code
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael c47017aa91 Add ecore_drm_private file
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:20 +00:00
Chris Michael e48ff7c3f3 Add Ecore_Drm header file
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-29 15:27:19 +00:00