If a NULL mode is passed into ecore_drm_output_mode_set, then we try
to disable the given output. If disabling the output fails, we were
trying to print an ERR message which tried to access the NULL mode.
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This results in wayland wl_output modes having their refresh rates
1000x too high, which has the magical effect of making some native
Qt apps fail with a GTK error when Xwayland crashes on 32-bit systems.
@fix
Fixes T3587
When fetching possible planes for an output, we end up leaking object
properties here as these were never freed.
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
As ecore_drm_private.h already includes config.h header, we don't need
to include it here in these files also
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
As portions of this code have been derived from existing code in
Weston, we should also be including their copyright/licence text to
give credit.
NB: Fixes T3286
@fix
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
When trying to set a rotation on a given output, we would previously
always be returning EINA_TRUE. We should be returning EINA_FALSE when
the rotation_set fails.
@fix
Summary: ecore_drm_output_rotation_set should be returning EINA_FALSE when the output doesn't have a plane of requested type.
Test Plan:
1. call ecore_drm_output_rotation_set() with ECORE_DRM_PLANE_TYPE_CURSOR
2. If output doesn't have a plane of ECORE_DRM_PLANE_TYPE_CURSOR, the for statement does nothing. But return value is TRUE;
Reviewers: raster, stefan_schmidt, gwanglim, devilhorns, zmike
Subscribers: input.hacker, cedric, JHyun, ManMower, jpeg
Differential Revision: https://phab.enlightenment.org/D3678
This adds 2 new API functions for getting supported rotations of an
output, and for setting rotation on an output
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds an internal function that we use during output
creation in order to create the planes necessary and get the supported
rotation values for an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds an API function to allow the Screen Setup dialog in
Enlightenment to support setting rotations on an output when running
under drm
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This patch adds an API function so that we can get the supported
rotations from an output. This is needed so that the Screen Setup
dialog in Enlightenment can list the rotations supported for the user
to choose from while running using drm
@feature
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
Summary:
printf %m stringifies and prints errno. I've tried to remove its use
anywhere that the immediately preceding function might not set errno
or is a complicated function for which knowing errno doesn't really
give any useful information.
I've left a few of the drmMode calls because they're just wrappers
around ioctl, which legitimately sets errno.
@fix
Reviewers: zmike, devilhorns
Reviewed By: zmike, devilhorns
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D3572
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>