platform/upstream/efl.git
7 years agoedje: Fix shadow variable warning
Jean-Philippe Andre [Tue, 25 Apr 2017 06:29:34 +0000 (15:29 +0900)]
edje: Fix shadow variable warning

7 years agomapbuf: Make point_color a property
Jean-Philippe Andre [Tue, 25 Apr 2017 06:28:22 +0000 (15:28 +0900)]
mapbuf: Make point_color a property

7 years agocontainer: Remove method part_name_get
Jean-Philippe Andre [Tue, 25 Apr 2017 06:11:08 +0000 (15:11 +0900)]
container: Remove method part_name_get

Remove this for now, as it may not apply to all contents.
Note that this was a new API in EO.

7 years agoefreet: free the allocated buffer before returning
Stefan Schmidt [Thu, 11 May 2017 07:34:53 +0000 (09:34 +0200)]
efreet: free the allocated buffer before returning

This fixes the commit 169a08c03a6a7270e185bda85d4ab9afd9063c8e (efreetd:
BSD optimizations). Coverity rightly pointed out six different leaks of
various buffers on error paths.

CID: 1374949 1374950 1374951 1374952 1374953 1374954

7 years agogl_drm: Fix rendering problems with dmabuf
Derek Foreman [Wed, 10 May 2017 21:10:49 +0000 (16:10 -0500)]
gl_drm: Fix rendering problems with dmabuf

Somehow this long standing bug wasn't obvious until wayland 1.13.0 made
some additions to an opaque structure.

This changed the frequency that new buffers came to us with the exact
same pointer value of a buffer that had just been freed.

This shortcut in eng_image_native_set has always been wrong - we need to
proceed to the end to make sure we pick up new dmabuf attributes.

7 years agoefreetd: BSD optimizations.
Al Poole [Wed, 10 May 2017 19:26:04 +0000 (12:26 -0700)]
efreetd: BSD optimizations.

Summary: Related to ticket T5475.

Reviewers: raster, cedric

Subscribers: jpeg, cedric, raster

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoexamples/evas: Improve linespacing consistency
Bryce Harrington [Wed, 10 May 2017 09:03:37 +0000 (11:03 +0200)]
examples/evas: Improve linespacing consistency

Summary:
Also fixes a handful of obvious indentation irregularities,
including some reformatting of some printf() multi-line indents that
commit a71b770b did not properly adjust.

No functional code changes.

Reviewers: cedric

Subscribers: jpeg

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

7 years agoecore_evas: Improve linespacing consistency
Bryce Harrington [Wed, 10 May 2017 08:49:17 +0000 (10:49 +0200)]
ecore_evas: Improve linespacing consistency

Summary:
Adds a line between each function so it's more obvious what doc goes
with what API routine.  Reorganize the doxygen elements so they're
consistently ordered and spaced.

No code or documentation changes; mostly just whitespace.

Reviewers: cedric

Subscribers: jpeg

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

7 years agoevas: adjust pointer mode set to work in headless scenario.
Cedric BAIL [Tue, 9 May 2017 22:54:45 +0000 (15:54 -0700)]
evas: adjust pointer mode set to work in headless scenario.

With the wayland backend, it is posible to have no seat connected
until later. This would lead to calling evas_object_pointer_mode_set
and fail without returning a boolean it was impossible to detect it
did fail. This patch correct it.

7 years agoevas: make sure that even when nothing is rendered there is a pair of RENDER_PRE...
Cedric BAIL [Tue, 9 May 2017 22:39:58 +0000 (15:39 -0700)]
evas: make sure that even when nothing is rendered there is a pair of RENDER_PRE and RENDER_POST events generated.

7 years agoecore_evas: fix link issue on macOS
Jean Guyomarc'h [Tue, 9 May 2017 19:24:11 +0000 (21:24 +0200)]
ecore_evas: fix link issue on macOS

696ed3e2e8f97de482e98db34997ad1848da985d introduced a build failure on
macOS. _ecore_evas_subregister is being used in a foreign code module,
but it was not exported. Enforcing EAPI gives this symbol enough
visibility to be used outside of ecore_evas.

7 years agoecore_input: suppress warning (unused parameter)
Jean Guyomarc'h [Thu, 20 Apr 2017 18:49:08 +0000 (20:49 +0200)]
ecore_input: suppress warning (unused parameter)

7 years agoeina: fix for escapable charachters not getting escaped if it comes after '\t' or...
Prasoon Singh [Tue, 9 May 2017 17:37:12 +0000 (10:37 -0700)]
eina: fix for escapable charachters not getting escaped if it comes after '\t' or '\n'

Summary:
Escaping is not happening whenever any escapable characters is coming after
'\t' or '\n'. It will also fix invalid read of 1 byte which happens for string where
last charachter is '\t' or '\n' like "eina\t".

Test Plan:
Take a string like "eina\t ". Observe space which is followed by tab is not getting
escaped.

Signed-off-by: Prasoon Singh <prasoon.16@samsung.com>
Reviewers: shilpasingh, rajeshps, govi, cedric

Reviewed By: shilpasingh

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoecore_x: add function to show and hide X cursor.
thierry E [Tue, 9 May 2017 17:13:11 +0000 (10:13 -0700)]
ecore_x: add function to show and hide X cursor.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoecore_x: handle DPMS state for a more accurate idling evaluation.
thierry E [Tue, 9 May 2017 17:02:31 +0000 (10:02 -0700)]
ecore_x: handle DPMS state for a more accurate idling evaluation.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoecore-evas-wayland: Remove unused variable
Chris Michael [Tue, 9 May 2017 15:46:48 +0000 (11:46 -0400)]
ecore-evas-wayland: Remove unused variable

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-drm2: Add start of refcounting for FB objects
Chris Michael [Tue, 9 May 2017 15:29:35 +0000 (11:29 -0400)]
ecore-drm2: Add start of refcounting for FB objects

Small patch which starts to implement refcounting on framebuffer
objects. This will be needed so that we do not free FB objects while
they are on the screen.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore_drm2: Move test for atomic_req into atomic flip path
Derek Foreman [Tue, 9 May 2017 15:33:05 +0000 (10:33 -0500)]
ecore_drm2: Move test for atomic_req into atomic flip path

We ended up doing an occasional atomic ioctl when we shouldn't.
This should be a harmless failure, but it's also a pointless one.

7 years agoecore_drm2: Fix dmabuf fb destroy
Derek Foreman [Mon, 8 May 2017 19:38:45 +0000 (14:38 -0500)]
ecore_drm2: Fix dmabuf fb destroy

I missed the fact that it'd run through the existing non-gbm path on
destroy, resulting in a (probably harmless) bad ioctl

7 years agoexamples/evas: streamline the intro description statement for examples
Bryce Harrington [Mon, 8 May 2017 22:25:12 +0000 (15:25 -0700)]
examples/evas: streamline the intro description statement for examples

Summary:
For people browing through the examples, having the opening statement be
concise and consistent will help them more quickly find what they're
looking for.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Test Plan:
Some of the examples had identical opening statements (e.g. the image
object examples).  I've tried to give each a unique description defining
what they are demonstrating, but you may want to doublecheck I got these
correct.  Of particular note, to me evas-images5.c looks like just a
fixup to evas-images4.c, so I'm not sure what makes these two distinct.

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoevas: fix typos in Evas Text docco
Bryce Harrington [Mon, 8 May 2017 22:23:18 +0000 (15:23 -0700)]
evas: fix typos in Evas Text docco

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoecore_evas: doc experimental comp_sync API
Bryce Harrington [Mon, 8 May 2017 22:17:46 +0000 (15:17 -0700)]
ecore_evas: doc experimental comp_sync API

Summary: (And indicate it's likely to be made private in EFL 2)

Reviewers: stefan_schmidt

Subscribers: stefan_schmidt, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoelm_theme: check whether object is valid before calling edje_object_mmap_set
Prasoon Singh [Mon, 8 May 2017 22:15:17 +0000 (15:15 -0700)]
elm_theme: check whether object is valid before calling edje_object_mmap_set

Summary:
In Issue scenario when _elm_theme_set was called,object was already deleted by app causing
unnecessary addition of the style in style_not_found list.
Check for object validity, if object is NULL return theme apply failed.

Test Plan: Make object pointer NULL before _elm_theme_set is called.

Reviewers: cedric, shilpasingh

Subscribers: rajeshps, govi, cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoexamples: use printf instead of fprintf(stdout, ...)
Bryce Harrington [Mon, 8 May 2017 22:14:27 +0000 (15:14 -0700)]
examples: use printf instead of fprintf(stdout, ...)

Summary:
Applies same change as e8355c93 for evas, to the remaining examples.
This uses the shell command-line:

    src/examples/evas$ grep -sr 'fprintf(stdout' . | cut -d: -f1 \
        | uniq | xargs sed -i "s/fprintf(stdout/printf(/"

Note that use of the "fprintf(stdout" construct can generate warnings
when -Wformat-security is enabled, if the fprintf statement has no
format arguments, so in addition to the stylistic simplification this
also helps quell those spurious warnings.

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoEcore_Evas (Win32): add geometry_get() method and fix dpi_get(), using the new API...
Vincent Torri [Fri, 5 May 2017 05:53:33 +0000 (07:53 +0200)]
Ecore_Evas (Win32): add geometry_get() method and fix dpi_get(), using the new API in Ecore_Win32.

This fixes fullscreen feature in Elm on Windows as the geometry of the desktop
was not known.

In case of multiple displays, the desktop, where the window is displayed, is used for fullscreen.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoEcore_Win32: add API to retrieve the geometry and dpi of plugged displays
Vincent Torri [Fri, 5 May 2017 05:52:12 +0000 (07:52 +0200)]
Ecore_Win32: add API to retrieve the geometry and dpi of plugged displays

@feature

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
7 years agoecore_evas: refactor win32 backend to use generic render infrastructure.
Cedric BAIL [Mon, 8 May 2017 22:04:09 +0000 (15:04 -0700)]
ecore_evas: refactor win32 backend to use generic render infrastructure.

7 years agoecore_evas: refactor wayland backend to use generic render infrastructure.
Cedric BAIL [Mon, 8 May 2017 22:03:51 +0000 (15:03 -0700)]
ecore_evas: refactor wayland backend to use generic render infrastructure.

7 years agoecore_evas: refactor sdl backend to use generic render infrastructure.
Cedric BAIL [Mon, 8 May 2017 22:03:31 +0000 (15:03 -0700)]
ecore_evas: refactor sdl backend to use generic render infrastructure.

7 years agoecore_evas: refactor psl1ght backend to use generic render infrastructure.
Cedric BAIL [Mon, 8 May 2017 22:03:10 +0000 (15:03 -0700)]
ecore_evas: refactor psl1ght backend to use generic render infrastructure.

7 years agoecore_evas: refactor fb backend to reuse generic render infrastructure.
Cedric BAIL [Mon, 8 May 2017 22:02:50 +0000 (15:02 -0700)]
ecore_evas: refactor fb backend to reuse generic render infrastructure.

7 years agoecore_evas: refactor extn backend to use generic rendering infrastructure.
Cedric BAIL [Mon, 8 May 2017 22:02:15 +0000 (15:02 -0700)]
ecore_evas: refactor extn backend to use generic rendering infrastructure.

7 years agoecore_evas: refactor drm backend to use generic render infrastructure.
Cedric BAIL [Mon, 8 May 2017 22:01:49 +0000 (15:01 -0700)]
ecore_evas: refactor drm backend to use generic render infrastructure.

7 years agococoa: refactor cocoa backend to use generic render infrastructure.
Cedric BAIL [Mon, 8 May 2017 22:01:30 +0000 (15:01 -0700)]
cocoa: refactor cocoa backend to use generic render infrastructure.

7 years agoecore_evas: refactor ews backend to use generic infrastructure for rendering.
Cedric BAIL [Mon, 8 May 2017 22:00:54 +0000 (15:00 -0700)]
ecore_evas: refactor ews backend to use generic infrastructure for rendering.

7 years agoecore_evas: first step into refactoring ews backend.
Cedric BAIL [Mon, 8 May 2017 18:00:38 +0000 (11:00 -0700)]
ecore_evas: first step into refactoring ews backend.

7 years agoelm_cnp: Fix typo
Bryce Harrington [Mon, 8 May 2017 17:04:47 +0000 (19:04 +0200)]
elm_cnp: Fix typo

Summary:
Removes extraneous 'or' in debug message due to change from commit
27375735.

Reviewers: bu5hm4n

Reviewed By: bu5hm4n

Subscribers: bu5hm4n, cedric, jpeg

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

7 years agoedje: null checking the return value of a function eina_mempool_malloc
Minchul Lee [Mon, 8 May 2017 13:39:21 +0000 (15:39 +0200)]
edje: null checking the return value of a function eina_mempool_malloc

Summary:
The return value of the function eina_mempool_malloc was dereferenced without checking. I added the checking code similar to the other codes.
@fix

Reviewers: raster, cedric, jpeg, herdsman, woohyun, stefan_schmidt

Subscribers: stefan_schmidt

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

7 years agoevas: Fix can't open tiff file on loader
jiin.moon [Mon, 8 May 2017 13:20:01 +0000 (15:20 +0200)]
evas: Fix can't open tiff file on loader

Summary:
Evas can't open tiff file because of no implement in client read api.
I wrote codes simply for open.

Test Plan: self

Reviewers: jpeg, cedric, jypark

Subscribers: stefan_schmidt

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

7 years agodocs: Fix broken edje tutorial (swallow 2)
Jeeyong Um [Mon, 8 May 2017 07:58:56 +0000 (16:58 +0900)]
docs: Fix broken edje tutorial (swallow 2)

7 years agoelm_code: Move the 'default' font name and size into the theme.
Andy Williams [Sat, 6 May 2017 21:02:17 +0000 (22:02 +0100)]
elm_code: Move the 'default' font name and size into the theme.

This can still be overridden by the standard method calls

7 years agoeolian: help and version shall not cause an error exit status
Jean Guyomarc'h [Sat, 6 May 2017 19:15:40 +0000 (21:15 +0200)]
eolian: help and version shall not cause an error exit status

eolian_gen called with --help or --version is a valid action. It shall
terminates with the 0 exit status.

7 years agoecore_evas: first step into refactoring x backend.
Cedric Bail [Sat, 6 May 2017 00:29:15 +0000 (17:29 -0700)]
ecore_evas: first step into refactoring x backend.

7 years agoecore_evas: first step into refactoring wayland backend.
Cedric Bail [Sat, 6 May 2017 00:28:51 +0000 (17:28 -0700)]
ecore_evas: first step into refactoring wayland backend.

7 years agoecore_evas: first step into refactoring win32 backend.
Cedric Bail [Sat, 6 May 2017 00:27:51 +0000 (17:27 -0700)]
ecore_evas: first step into refactoring win32 backend.

7 years agoecore_evas: first step into refactoring sdl backend.
Cedric Bail [Sat, 6 May 2017 00:27:22 +0000 (17:27 -0700)]
ecore_evas: first step into refactoring sdl backend.

7 years agoecore_evas: first step into refactoring psl1ght backend.
Cedric Bail [Sat, 6 May 2017 00:24:49 +0000 (17:24 -0700)]
ecore_evas: first step into refactoring psl1ght backend.

7 years agoecore_evas: first step into refactoring fb backend.
Cedric Bail [Sat, 6 May 2017 00:24:27 +0000 (17:24 -0700)]
ecore_evas: first step into refactoring fb backend.

7 years agoecore_evas: first step into refactoring extn backend.
Cedric Bail [Sat, 6 May 2017 00:17:08 +0000 (17:17 -0700)]
ecore_evas: first step into refactoring extn backend.

7 years agoecore_evas: first step into refactoring drm backend.
Cedric Bail [Sat, 6 May 2017 00:16:03 +0000 (17:16 -0700)]
ecore_evas: first step into refactoring drm backend.

7 years agoecore_evas: first step into refactoring cocoa backend.
Cedric Bail [Sat, 6 May 2017 00:14:44 +0000 (17:14 -0700)]
ecore_evas: first step into refactoring cocoa backend.

7 years agoecore_evas: use generic function for rendering ecore_evas buffer backend.
Cedric Bail [Wed, 3 May 2017 23:56:40 +0000 (16:56 -0700)]
ecore_evas: use generic function for rendering ecore_evas buffer backend.

7 years agoecore_evas: add infrastructure to properly track sub ecore_evas.
Cedric Bail [Sat, 6 May 2017 00:12:17 +0000 (17:12 -0700)]
ecore_evas: add infrastructure to properly track sub ecore_evas.

7 years agoecore_evas: add logic to allow partial refactoring of backends.
Cedric Bail [Sat, 6 May 2017 00:06:15 +0000 (17:06 -0700)]
ecore_evas: add logic to allow partial refactoring of backends.

7 years agoecore_evas: introduce a generic rendering function.
Cedric Bail [Wed, 3 May 2017 23:08:36 +0000 (16:08 -0700)]
ecore_evas: introduce a generic rendering function.

7 years agoecore_evas: adjust buffer engine with nicer behavior from evas.
Cedric Bail [Wed, 3 May 2017 23:08:03 +0000 (16:08 -0700)]
ecore_evas: adjust buffer engine with nicer behavior from evas.

7 years agoevas: always pair RENDER_PRE and RENDER_POST.
Cedric Bail [Wed, 3 May 2017 23:07:34 +0000 (16:07 -0700)]
evas: always pair RENDER_PRE and RENDER_POST.

7 years agoevas: don't double check if the canvas has changed.
Cedric Bail [Wed, 3 May 2017 23:37:19 +0000 (16:37 -0700)]
evas: don't double check if the canvas has changed.

7 years agoelm_cnp: fixup behaviour
Marcel Hollerbach [Fri, 5 May 2017 15:51:52 +0000 (17:51 +0200)]
elm_cnp: fixup behaviour

On touch devices there is the normal gesture to touch on the screen and
hold until the drag operation started.

For users of a mouse there is the gesture of just click and drag the
mouse away.

This commit changes the behaviour of the start based on the device that
sent the event

7 years agoecore_drm2: Add checks for using a plane after death
Derek Foreman [Fri, 5 May 2017 15:52:05 +0000 (10:52 -0500)]
ecore_drm2: Add checks for using a plane after death

We keep planes on the plane list to ensure a released plane is removed
from display - however this means that if a caller starts messing with
a plane after release, that it could potentially reposition a plane it
doesn't own anymore.

Use EINA_SAFETY macros to prevent this.

7 years agoecore_drm2: Replace plane state release flag with plane dead flag
Derek Foreman [Thu, 4 May 2017 21:28:10 +0000 (16:28 -0500)]
ecore_drm2: Replace plane state release flag with plane dead flag

The release flag is actually less useful than the existing in_use flag
for determining if a plane is unused.  If a new plane is assigned before
the next flip cleans up released planes, then it can point to a released
plane state, and both it and the previous user will be freed on the next
commit, leaking a plane.

Putting the flag in the plane structure fixes this while still allowing us
to keep released planes around to ensure a recently released plane is
cleared from atomic state.

7 years agoecore_drm2: Call flip test in plane release
Derek Foreman [Thu, 4 May 2017 20:19:58 +0000 (15:19 -0500)]
ecore_drm2: Call flip test in plane release

If we don't do a flip test, the atomic state isn't updated.  This fixes
a potential problem where the last operation in state preparation is
a release - the following commit wouldn't include state from the release.

7 years agoecore_drm2: Fix flip test error handling
Derek Foreman [Thu, 4 May 2017 18:41:16 +0000 (13:41 -0500)]
ecore_drm2: Fix flip test error handling

We need to free the atomic req if commit fails, so let's merge these
failure paths and simplify code a bit.

7 years agoecore_drm2: Require x and y value in plane assign
Derek Foreman [Wed, 3 May 2017 15:51:14 +0000 (10:51 -0500)]
ecore_drm2: Require x and y value in plane assign

Saves us a flip test, and gaurantees that we're always testing with a
reasonable x, y and not something leftover from a previous assignment.

7 years agoecore-drm2: Release any marked planes during atomic commit
Chris Michael [Wed, 3 May 2017 14:57:28 +0000 (10:57 -0400)]
ecore-drm2: Release any marked planes during atomic commit

This patch fixes plane_state values during atomic flip test for any
planes marked for release. When the fb_flip actually completes, we
will remove the marked plane(s) from the output.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-drm2: Add 'release' flag for planes
Chris Michael [Wed, 3 May 2017 14:56:07 +0000 (10:56 -0400)]
ecore-drm2: Add 'release' flag for planes

As we cannot immediately remove a plane from an output, due to needing
an atomic commit to actually remove the plane from screen, we can use
a 'release' flag to indicate that a given plane needs removal from the
screen during our next atomic commit.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-drm2: Don't remove plane from output list on release
Chris Michael [Wed, 3 May 2017 14:43:47 +0000 (10:43 -0400)]
ecore-drm2: Don't remove plane from output list on release

As we need to be able to commit a new plane state for any released
planes, we should not be removing them from the output list just yet.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-drm2: Fix formatting
Chris Michael [Wed, 3 May 2017 14:34:14 +0000 (10:34 -0400)]
ecore-drm2: Fix formatting

NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-drm2: Don't assign plane to output list if test fails
Chris Michael [Wed, 3 May 2017 13:22:45 +0000 (09:22 -0400)]
ecore-drm2: Don't assign plane to output list if test fails

There is little point in assigning a plane to the output list if the
atomic flip test fails.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore_drm2: Use stricter cursor plane size check
Derek Foreman [Wed, 3 May 2017 13:01:35 +0000 (08:01 -0500)]
ecore_drm2: Use stricter cursor plane size check

Unfortunately the plane sized returned from the cursor plane query isn't
a limit, it's an exact size.  Sometimes you can use a different size,
but that's completely hardware dependent - so stick to the advertised
size.

7 years agodrm-ee: Use a plane for the evas
Derek Foreman [Fri, 28 Apr 2017 20:49:17 +0000 (15:49 -0500)]
drm-ee: Use a plane for the evas

Assign a plane at startup and update it in flip.

7 years agogl_drm: Support atomic updates
Derek Foreman [Fri, 28 Apr 2017 20:43:09 +0000 (15:43 -0500)]
gl_drm: Support atomic updates

Grab a plane and lock it down for displaying the canvas, update it on
page flip.

7 years agoecore_drm2: Add API to update the fb for a plane
Derek Foreman [Fri, 28 Apr 2017 20:30:34 +0000 (15:30 -0500)]
ecore_drm2: Add API to update the fb for a plane

7 years agoecore_drm2: Rebuild atomic state from plane_destination_set
Derek Foreman [Fri, 28 Apr 2017 20:22:47 +0000 (15:22 -0500)]
ecore_drm2: Rebuild atomic state from plane_destination_set

Call a test commit to rebuild the atomic_req

7 years agoecore_drm2: Fix atomic flip with no new buffer
Derek Foreman [Fri, 28 Apr 2017 20:15:59 +0000 (15:15 -0500)]
ecore_drm2: Fix atomic flip with no new buffer

We don't have an atomic state, so we need to create one before the flip

7 years agoecore_drm2: Pass user data to atomic flip
Derek Foreman [Fri, 28 Apr 2017 19:51:46 +0000 (14:51 -0500)]
ecore_drm2: Pass user data to atomic flip

We need the user_data to come back to us in the flip handler like it does
in the non atomic flip.

7 years agoecore_drm2: Add some atomic state tracking
Derek Foreman [Fri, 28 Apr 2017 17:28:39 +0000 (12:28 -0500)]
ecore_drm2: Add some atomic state tracking

I think we're now at the point where the two paths are merged.

Still no atomic functionality because nothing assigned the primary plane,
so we have no atomic state to commit.  The machinery should be in place
though.

7 years agoecore_drm2: Handle atomic state in _release_buffer
Derek Foreman [Fri, 28 Apr 2017 17:23:28 +0000 (12:23 -0500)]
ecore_drm2: Handle atomic state in _release_buffer

Further merging of atomic and non-atomic paths

7 years agoecore_drm2: Make _release_buffer take a state struct instead of fb
Derek Foreman [Fri, 28 Apr 2017 17:22:04 +0000 (12:22 -0500)]
ecore_drm2: Make _release_buffer take a state struct instead of fb

Lets us push the NULL set into _release_buffer for some clean up

7 years agoecore_drm2: Refactor common code from non-atomic path
Derek Foreman [Fri, 28 Apr 2017 16:27:10 +0000 (11:27 -0500)]
ecore_drm2: Refactor common code from non-atomic path

We'll need to perform all this for atomic operations as well.

7 years agoecore_drm2: Fix typo in comment
Derek Foreman [Fri, 28 Apr 2017 16:26:08 +0000 (11:26 -0500)]
ecore_drm2: Fix typo in comment

7 years agoecore_drm2: treat atomic flip without a req as an error
Derek Foreman [Fri, 28 Apr 2017 15:38:30 +0000 (10:38 -0500)]
ecore_drm2: treat atomic flip without a req as an error

We should use the safety macro here instead of silently continuing so we
can get something in the log if this happens.

7 years agoecore_drm2: remove fb parameter from _fb_flip()
Derek Foreman [Thu, 27 Apr 2017 21:52:09 +0000 (16:52 -0500)]
ecore_drm2: remove fb parameter from _fb_flip()

Time to start smashing the atomic and non-atomic paths together.

7 years agoecore_drm2: Replace output fbs with state structs
Derek Foreman [Thu, 27 Apr 2017 21:43:06 +0000 (16:43 -0500)]
ecore_drm2: Replace output fbs with state structs

next, pending, and current are going to have to deal with atomic state
instead of just fbs soon

7 years agoecore_drm2: Move atomic state into an output state struct
Derek Foreman [Thu, 27 Apr 2017 21:02:59 +0000 (16:02 -0500)]
ecore_drm2: Move atomic state into an output state struct

This should make it easier to share code paths between atomic and non
atomic operations.

7 years agoecore_drm2: Perform test flip during plane assignment
Derek Foreman [Thu, 27 Apr 2017 20:53:16 +0000 (15:53 -0500)]
ecore_drm2: Perform test flip during plane assignment

Make sure we can commit that plane at assign time so when we hook up to
the scene graph it knows when it can safely use a plane.

7 years agoecore_drm2: Drop static from _fb_atomic_flip_test()
Derek Foreman [Thu, 27 Apr 2017 20:50:38 +0000 (15:50 -0500)]
ecore_drm2: Drop static from _fb_atomic_flip_test()

We're going to need this one in plane assign to test commits

7 years agoecore_drm2: remove flip test from commit path
Derek Foreman [Thu, 27 Apr 2017 20:47:12 +0000 (15:47 -0500)]
ecore_drm2: remove flip test from commit path

We'll be doing tests as we build up plane state assignment.  it's too late
to do anything about it if we fail here - failed tests will block plane
assignment in the first place so the scene graph knows it still has to
render those visual elements.

7 years agoecore_drm2: Add ecore_drm2_plane_release to release planes
Derek Foreman [Thu, 27 Apr 2017 20:45:51 +0000 (15:45 -0500)]
ecore_drm2: Add ecore_drm2_plane_release to release planes

Opposite of plane assign.

7 years agoecore_drm2: Store output in plane structure
Derek Foreman [Fri, 28 Apr 2017 20:17:07 +0000 (15:17 -0500)]
ecore_drm2: Store output in plane structure

This will simplify a bunch of API that would otherwise have to pass in
both output and plane - and in some cases we might not have the output
handy anyway.

7 years agoecore_drm2: Remove next, current, pending from plane state
Derek Foreman [Thu, 27 Apr 2017 20:45:07 +0000 (15:45 -0500)]
ecore_drm2: Remove next, current, pending from plane state

These will be output state eventually

7 years agoecore_drm2: Assign planes in ecore_drm2_plane_assign
Derek Foreman [Thu, 27 Apr 2017 20:44:22 +0000 (15:44 -0500)]
ecore_drm2: Assign planes in ecore_drm2_plane_assign

Don't just test, allocate the resource, and then prevent further
assignments from trying to use it as well.

7 years agoecore_drm2: Don't use drmModeAtomicMerge
Derek Foreman [Thu, 27 Apr 2017 20:34:52 +0000 (15:34 -0500)]
ecore_drm2: Don't use drmModeAtomicMerge

We're creating the entire state from scratch already - trying to merge
with the old state will likely bring in state we just tried to replace.

7 years agoecore_drm2: Remove extra #ifdef
Derek Foreman [Thu, 27 Apr 2017 15:53:26 +0000 (10:53 -0500)]
ecore_drm2: Remove extra #ifdef

It's the same as the previous one, so combine them.

7 years agoecore_drm2: Fix typo in error message
Derek Foreman [Thu, 27 Apr 2017 15:13:46 +0000 (10:13 -0500)]
ecore_drm2: Fix typo in error message

Stop printing "commit test failed" from non-test commits.

7 years agoecore_drm2: Add an env var to disable atomic pageflips
Derek Foreman [Thu, 27 Apr 2017 15:13:14 +0000 (10:13 -0500)]
ecore_drm2: Add an env var to disable atomic pageflips

Allows testing non-atomic paths without a reboot or a rebuild.

7 years agoecore-drm2: Do atomic commits per-output
Chris Michael [Thu, 27 Apr 2017 13:11:41 +0000 (09:11 -0400)]
ecore-drm2: Do atomic commits per-output

In cases where output monitors have different frequencies, we need to
be doing atomic commits on a per-output basis. This patch modifies the
ecore_drm2_fb_flip function to support doing atomic commits per output.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-drm2: Free output atomic request on destruction
Chris Michael [Thu, 27 Apr 2017 13:10:43 +0000 (09:10 -0400)]
ecore-drm2: Free output atomic request on destruction

When we free an output, make sure we cleanup any existing atomic
commit requests

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-drm2: Remove newly added atomic API functions
Chris Michael [Thu, 27 Apr 2017 13:09:46 +0000 (09:09 -0400)]
ecore-drm2: Remove newly added atomic API functions

As we need to do atomic commits on a per-output basis, these 2 newly
added API functions can go because these functions did one atomic
commit for all outputs

Signed-off-by: Chris Michael <cp.michael@samsung.com>
7 years agoecore-drm2: Remove #ifdef for HAVE_ATOMIC in plane_assign function
Chris Michael [Tue, 25 Apr 2017 14:29:00 +0000 (10:29 -0400)]
ecore-drm2: Remove #ifdef for HAVE_ATOMIC in plane_assign function

As there is nothing inside this function which requires any Atomic API
calls, this #ifdef can be removed and the function can then still be
used to assign Primary planes for non-atomic use cases.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>