Commit Graph

119 Commits

Author SHA1 Message Date
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 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 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 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 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 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 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 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 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 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
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
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 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
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
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 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 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 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
Chris Michael 7552bccc35 ecore-drm: Fix usage of EINA_LIST_FREE
Summary: When we exit the backlight_init function, we should
stringshare_del the returned device strings from eeze properly

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Chris Michael e0864520d7 ecore-drm: Fix formatting
Summary: No functional changes, just fixing formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-12-10 12:01:58 -05:00
Carsten Haitzler e962827ef2 ecore drm - comment out unused code to reduce warnings
several brightness functions in ecore drm are unused - comment them
out until they are needed.
2014-11-25 17:01:36 +09:00
vivek 6e5a4a7156 ecore_drm: Added internal function for drm output updates when device is hotplug
Summary:
Added internal function _ecore_drm_update_outputs which will update the
outputs if the drm device is hotplug

@fix

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

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1565
2014-11-12 08:31:02 -05:00
Srivardhan Hebbar 399c571ab6 ecoreidrm: Cleaned up unwanted code.
Summary: Cleaned up all unwanted code's in ecore_drm. This just
removes a bunch of already commented out code.

@fix

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1615
2014-10-30 09:36:21 -04:00
Stefan Schmidt cc6aebc916 ecore_drm: Silence warnings about unused parameters. 2014-10-29 16:00:28 +01:00
vivek cd1bc17c1b ecore-drm: Added documentation for various APIs in ecore_drm_output module
Summary:
Added documentation for ecore_drm_outputs_create, ecore_drm_output_free,
ecore_drm_output_cursor_size_set, ecore_drm_output_size_get functions

@fix

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

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1572
2014-10-23 08:52:43 -04:00
Chris Michael dae6bcb62d ecore-drm: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-23 08:28:56 -04:00
vivek 221c79dc87 ecore-drm: Cleanup backlight and drm device in output_free function code
Summary:
Added code to cleanup backlight structure and to close the drm device and
delete it.

@fix

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1566
2014-10-23 08:28:45 -04:00
Chris Michael bab8379248 ecore-drm: Check for valid crtc before calling free
Summary: We cannot call drmModeFreeCrtc with an invalid crtc, so check
that it is set inside the output structure before trying to make this
call

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-22 09:24:14 -04:00
Chris Michael 826d6f1bc2 ecore-drm: Cleanup/Unify output_free function code
Summary: There is no point in having different code in each output
free function (internal one and API exposed one), so let's unify the
code here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-22 09:24:14 -04:00
vivek 2a9272333f ecore_drm: Added internal function to check if drm device is hotplug device
Summary:
Added _ecore_drm_output_device_is_hotplug API to check if the
drm device is hotplug device. It returns EINA_TRUE if device is
hotplug else returns EINA_FALSE

@feature

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

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1559
2014-10-22 08:14:42 -04:00
Chris Michael 8549ee799a ecore-drm: Create udev watch for each output, and delete the watch
when we free the output.

Summary: This commit fixes an issue where a hotplug watch was Only
being added for One input, and also deletes any created watch during
output_free.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-21 08:26:25 -04:00
Chris Michael 6cf9246ad6 ecore-drm: Default output to NULL and add safety check for NULL output
after the device loop.

Summary: If there are no outputs created during the loop, we would end
up crashing here by checking output->watch. This fixes that situation
without leaking resources because we still end up doing our cleanup.

NB: Thanks Cedric for the report !! :)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-21 08:18:34 -04:00
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
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
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 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 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 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
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 e1e8859aa0 ecore-drm: Fix formatting from a7428edeb4
Fix horrible formatting before it gets too far...
Bad Stefan, no cookie ;)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-01 10:59:31 -04:00
Stefan Schmidt a7428edeb4 ecore_drm: Check for currently used CRTC first before searching others
If we have a CRTC already configured save the work to search for a new
crtc and encoder combination that works with this connector. Just use what
we have.

Also always check if the CRTC is already allocated for a different connection
before using it.
2014-07-01 15:10:00 +02:00
Stefan Schmidt 4c0f9da2b9 ecore_drm: Iterate over all available connectors not just the first
Maybe this was here for some debugging? It does not make any sense though
to loop over all connectors but break out of the loop after the first run.
2014-06-30 10:13:42 +02:00
Chris Michael bba98a515c ecore-drm: Add API function for getting size of an output.
@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-04-01 07:09:49 +01:00
Jeff Grimshaw 9ff9faae70 ecore_drm: fix Doxygen markup to prevent warnings.
Summary:
These files are missing group titles on the @defgroup line.  Added the titles so Doxygen does not
complain.

Test Plan: make doc 2> doc/doxyerr.log

CC: cedric

Differential Revision: https://phab.enlightenment.org/D612

Signed-off-by: Cedric BAIL <cedric.bail@free.fr>
2014-03-15 20:04:24 +09:00
Chris Michael 2f3082df66 ecore-drm: Quiet down ecore_drm_output rendering messages
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-12 10:41:57 +00:00
Chris Michael 3762e85c39 ecore-drm: Add Ecore_Drm code
@feature: Add Ecore_Drm library code for setting up drm card, outputs,
virtual terminals, framebuffers, and input for use with ecore_evas drm
code.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-06 10:57:26 +00:00