summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-05-10compositor-drm: Add support for EGLDevice+EGLOutputHEADnvidia_headMiguel A. Vico2-103/+234
As previously stated, EGLDevice and EGLOutput will provide means to access native device objects and different portions of display control hardware respectively. Whenever EGL_EXT_device_drm extension is present, EGLDevice can be used to enumerate and access DRM KMS devices, and EGLOutputLayer to enumerate and access DRM KMS crtcs and planes. By using EGLStreams and attaching an EGLOutputLayer consumer (representing a DRM KMS crtc or plane) to it, compositor-drm can produce final composition frames and present them on a DRM device. This change adds required logic to support presentation through EGLDevice+EGLOutput+EGLStream. Whether GBM or EGLDevice should be used can be controlled by --use-egldevice backend argument. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: Adam Cheney <acheney@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-10compositor-drm: Gracefully handle vblank and flip invalid timestampsMiguel A. Vico1-3/+23
Instant query for vblank timestamp may always fail, resulting in never scheduling a full repaint in drm_output_start_repaint_loop(). Additionally, timestamp provided in page_flip_handler() may also be invalid. This change makes both drm_output_start_repaint_loop() and page_flip_handler() to schedule a full repaint in any of the situations above. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com>
2016-05-10gl-renderer: Add EGL client support for EGLStream frame presentationMiguel A. Vico2-1/+186
By attaching a GLTexture consumer to a stream, a producer (wayland EGL client) could feed frames to a texture, which in turn can be used by a compositor to prepare the final frame to be presented. This change adds required logic to support presentation approach described above. Note that some unpublished EGL extensions were needed: - EGL_NV_stream_attrib: https://github.com/aritger/eglstreams-kms-example/blob/master/proposed-extensions/EGL_NV_stream_attrib.txt - EGL_WL_wayland_eglstream: https://github.com/aritger/eglstreams-kms-example/blob/master/proposed-extensions/EGL_WL_wayland_eglstream.txt Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Adam Cheney <acheney@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-08gl-renderer: Add support for EGLDevice composited frame presentationMiguel A. Vico3-3/+307
EGLDevice provides means to enumerate native devices, and then create an EGL display connection from them. Similarly, EGLOutput will provide means to access different portions of display control hardware associated with an EGLDevice. For instance, EGLOutputLayer represents a portion of display control hardware that accepts an image as input and processes it for presentation on a display device. EGLStream implements a mechanism to communicate frame producers and frame consumers. By attaching an EGLOutputLayer consumer to a stream, a producer will be able to present frames on a display device. Thus, a compositor could produce frames and feed them to an EGLOutputLayer through an EGLStream for presentation on a display device. This change adds required logic to support presentation approach described above. Note that some unpublished EGL extensions were needed: - EGL_NV_stream_attrib: https://github.com/aritger/eglstreams-kms-example/blob/master/proposed-extensions/EGL_NV_stream_attrib.txt - EGL_EXT_stream_acquire_mode: https://github.com/aritger/eglstreams-kms-example/blob/master/proposed-extensions/EGL_EXT_stream_acquire_mode.txt - EGL_NV_output_drm_flip_event: https://github.com/aritger/eglstreams-kms-example/blob/master/proposed-extensions/EGL_NV_output_drm_flip_event.txt Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: Adam Cheney <acheney@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-08gl-renderer: Add EGLDevice enumeration supportMiguel A. Vico2-1/+93
EGLDevice provides means to enumerate native devices. In preparation for follow-on changes to support frame presentation through EGLDevice+EGLOutput, this change adds both gl_renderer_get_devices() and gl_renderer_get_drm_device_file() functions which will help to enumerate EGLDevices and match them to DRM devices. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: Adam Cheney <acheney@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-08gl-renderer: Refactor gl_renderer_output_window_create()Miguel A. Vico1-32/+64
In preparation for follow-on changes to support frame presentation through EGLDevice+EGLOutput, this change refactors gl_renderer_output_window_create() to separate out window surface creation code from output common creation code. Bonus: Fix EGLSurface leakage upon gl_renderer_setup() failure. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-08gl-renderer: Accept non-NULL empty <visual_id> arraysMiguel A. Vico1-1/+1
This change modifies egl_choose_config() to accept a non-NULL but empty <visual_id> array (i.e. n_ids == 0) Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-08gl-renderer: Add <platform_attribs> param to gl_renderer_display_createMiguel A. Vico6-4/+8
In preparation for follow-on changes to support frame presentation through EGLDevice+EGLOutput, this change adds <platform_attribs> parameter to gl_renderer_display_create(). Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-08gl-renderer: Rename <attribs> param of gl_renderer to <config_attribs>Miguel A. Vico2-6/+6
In preparation for follow-on changes to support frame presentation through EGLDevice+EGLOutput, this change renames <attribs> parameter of gl_renderer_display_create() and gl_renderer_output_window_create() to <config_attribs> Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-08gl-renderer: Rename gl_renderer::output_create to output_window_createMiguel A. Vico6-7/+7
No functional change. This patch renames gl_renderer_output_create() to gl_renderer_output_window_create(), which is something more descriptive of what the function does. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: Andy Ritger <aritger@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-08gl-renderer: Rename gl_renderer_create to gl_renderer_display_createMiguel A. Vico6-8/+9
No functional change. This patch only renames gl_renderer_create() to gl_renderer_display_create(), which is something more descriptive of what the function does. Signed-off-by: Miguel A Vico Moya <mvicomoya@nvidia.com> Reviewed-by: James Jones <jajones@nvidia.com>
2016-05-06compositor: refactor into convert_size_by_transform_scale()Pekka Paalanen1-40/+40
There were two copies of code applying transform and scale to size. Refactor the code to use just one copy in a new function. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-06compositor: constify weston_surface_build_buffer_matrix()Pekka Paalanen1-2/+2
Makes it easier to see that it does not change weston_surface state implicitly. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-04releasing: Correct documentation for script nameBryce Harrington1-1/+1
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-04compositor-wayland: put configuration structure in separate headerBenoit Gschwind3-19/+62
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: moved #include out of extern "C".] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04compositor-wayland: split backend_initBenoit Gschwind1-53/+126
Extract configuration parsing from init_backend function. The new init_backend start by generating the configuration structure from configuration file with separated function and then use this structure to load the backend. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: rebased] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04compositor-wayland: split wayland_output_create_for_configBenoit Gschwind1-36/+68
The splitting intend to separate configuration parsing from output setup. Introduces struct weston_wayland_backend_output_config. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: squashed "wayland-backend: define output configuration structure" into this.] [Pekka: fix fullscreen output scale back to 1.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04compositor-wayland: move config parsing in create_cursorBenoit Gschwind1-13/+19
Move configuration parsing from create_cursor to backend_init. Use newer configuration structure to initialize the cursor in create_cursor. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04compositor-wayland: use new config struture to create backendBenoit Gschwind1-7/+6
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04compositor-wayland: fix memory leak of display_nameBenoit Gschwind1-0/+2
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04compositor-wayland: create a basic config structure to use in new init APIBenoit Gschwind1-14/+23
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-04libinput: Remove unused static valuesDaniel Stone1-3/+0
default_seat and default_seat_name are not used anywhere in this file. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2016-05-04weston.pc: Properly specify Requires.privateQuentin Glidic1-0/+1
We include wayland-server.h, pixman.h and xkbcommon.h in compositor.h, but they are not required for linking if the plugin doesn’t use them. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Stone <daniels@collabora.com>
2016-05-03configure.ac: bump to version 1.10.91 for the alpha releaseBryce Harrington1-1/+1
2016-05-03compositor.h: Add shell_interface.get_output_work_areaQuentin Glidic2-1/+4
This will allow plugins to be aware of e.g. panels, to avoid covering them with other surfaces. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-05-03x11: Fix incorrect output counting logicBryce Harrington1-1/+1
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
2016-05-03x11: port the x11 backend to the new init apiBenoit Gschwind4-104/+264
Use a "well" defined structure to configure x11-backend and move configuration file parsing inside the weston compositor code. Enforce destruction of all backend config objects after initialization. Since the backend config struct versioning implies that there we expect potential future descrepancy between main's definition of the config object and the backend's, don't allow the backend to hang onto the config object outside the initialization scope. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net> Tested-by: Benoit Gschwind <gschwind@gnu-log.net>
2016-05-02headless-backend: fix leak of transform configurationBenoit Gschwind1-3/+7
Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> [Pekka: fixed the mispelling in subject] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-29compositor: Hyphenate compound adjective surface-localYong Bakos1-1/+1
See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-29ivi-application: Hyphenate compound adjective surface-localYong Bakos1-1/+1
See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-29ivi-layout: Correct coordinate adjective grammar, misspellingsYong Bakos1-8/+8
Hyphenate 'multi screen' coordinates, and correct misspellings and grammar within changed lines. See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-29fullscreen-shell: Use 'surface-local' to correct grammarYong Bakos1-1/+1
Correct the pluralization by simplifying with 'surface-local'. See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-29desktop-shell: Use 'surface-local' to correct grammarYong Bakos1-1/+1
Correct the pluralization by simplifying with 'surface-local'. See https://lists.freedesktop.org/archives/wayland-devel/2016-April/028249.html. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-29fbdev-backend: refactor configuration APIBenoit Gschwind4-38/+121
Implement a "well" defined API to configure the fbdev backend. Following and according to discussion about libweston API The output transform configuration is moved into weston and added to the fbdev configuration structure. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> [Pekka: squashed two patches and rebased.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-29compositor-fbdev: make copy of the device stringPekka Paalanen1-5/+8
Ensuring that the pointer to the device path stays valid gets harder and harder with migrating to the libweston-style config handling. Therefore, make a copy of the string, private to struct fbdev_output. Now the pointer passed in to fbdev_output_create() could be freed right after the call returns. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>
2016-04-26linux-dmabuf: Keep checking planes even if the first doesn't support lseekDerek Foreman1-1/+1
If we break; when lseek fails we can fail to do some legitimate tests on remaining planes in a multi-plane buffer. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-04-25man: Clarify weston.ini scale optionYong Bakos1-6/+11
Add explanations of scaling that are a bit more approachable for users. Signed-off-by: Yong Bakos <ybakos@humanoriented.com> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=94824 Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-25compositor-rdp: refactor configuration APIBenoit Gschwind4-45/+137
Implement a "well" defined API to configure the rdp backend. Following according to discution about libweston API. Signed-off-by: Benoit Gschwind <gschwind@gnu-log.net> Reviewed-by: David FORT <rdp.effort@gmail.com> [Pekka: added missing headers to Makefile.am] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-25clients/nested: fix undefined reference to xzallocU. Artie Eoff1-0/+1
Include shared/xalloc.h in clients/nested.c to fix compilation error: undefined reference to `xzalloc' Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-25build: Add (and use) an AC_SEARCH_LIBS wrapperQuentin Glidic2-13/+42
AC_SEARCH_LIBS is the recommended macro for these checks, unfortunately, we use AC_CHECK_LIB instead, and even AC_CHECK_FUNC, when only one AC_SEARCH_LIBS would be enough. This wrapper macro is used much like PKG_CHECK_MODULES, as it defines (and AC_SUBST) the PREFIX_LIBS variable itself. It also avoids adding unnecessary stuff to LIBS. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Tested-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-22build: actually use CLOCK_GETTIME_LIBS for libzunitcGustavo Zacarias1-1/+2
The fix/check in 34d59859 is incomplete. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-22build: add check for clock_gettime() in librtGustavo Zacarias2-7/+13
zuctest is another clock_gettime() user that fails to link against librt when necessary. Instead of adding another -lrt LDADD entry i've opted for the saner way and converted the check to a configure test that will set CLOCK_GETTIME_LIBS appropiately and replaced all instances of -lrt with it. Built-tested against old and new glibc. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-22tests: check for NULL surface in keyboard and pointer handlersPekka Paalanen1-4/+11
When a test destroys a wl_surface, it is still possible to get events referring to the destroyed surface. The surface in such cases will be NULL. Handle NULL surface gracefully in keyboard and pointer enter/leave handlers. Touch-down handler is already NULL-safe. This fixes a SEGV in a test I am writing for wp_viewport. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-22weston-info: look for the right wp_presentationPekka Paalanen1-1/+1
Patch b00c79b587a4903df576008a64a49f851fed234c forgot to update the global interface name to look for. Fix it. This makes weston-info report the presentation clock again. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
2016-04-22input: Don't try to send axis_source when there are no resourcesJonas Ådahl1-0/+3
The focus_client pointer may be NULL here if the focused client has no pointer resources. To avoid a crash, NULL check focus client before proceeding to send the events. https://bugs.freedesktop.org/show_bug.cgi?id=94899 Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-22data-device: Update current action even if source version is oldJonas Ådahl1-10/+12
If the version of the source object is old enough to not have wl_data_source.set_actions() the current action would never be updated since source->set_actions would never be set. To fix this, instead of checking whether source->set_actions before proceeding with updating the current action, just always update the action when we know all parts are valid dnd data device objects. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
2016-04-22desktop-shell: Get rid of some unused fieldsJonas Ådahl1-6/+0
Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-22desktop-shell: Unset the shell surface owner when it goes awayJonas Ådahl1-1/+10
On client destruction, the shell object may be destroyed before the shell surface objects. If this happens to two surfaces of the same client, and one surface being destroyed results in the focus being switched to the other, this would trigger a ping event. The ping event sending function relies on having a valid owner, and if the shell would be destoryed prior to the shell surface, we'd crash in this function. Solve this by unsetting the owner pointer when the shell client goes away and early out in the ping event sending function if the owner is gone. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-18headless: port the headless backend to the new init apiBenoit Gschwind4-44/+126
refactor configuration API of headless-backend Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> v6: - Define version number in the header - Don't use leading underscores in header guards - Add stub config_init_to_defaults() - Allocate config on stack - Drop unused display_name parameter - Add error message when config is invalid - Install compositor-headless.h and list it in headless-backend sources v5: - Update to current trunk - Fixed typo 'struct weston_wayland_backend_config' - Dropped unused variables - Dropped weston_headless_backend_config_create() in favor of directly zalloc'ing the object - Dropped weston_headless_backend_load() in favor of the more generalized load_backend_new(). - Dropped typedef from header - Restored use of 'backend_init' entry point - Backend_init() takes a base weston_backend_config object - Renamed 'param' to 'config' in a few places for consistency - Renamed 'headless_options' variable to 'options for consistency - Version the base struct - Free config on error - Don't free config during backend_init normal operations - Adjust header ordering - Make header guard naming consistent with other headers - Light reformatting for code style and consistency with other backend config patches Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com> [Pekka: rebased to apply before drm and x11 backends] [Pekka: squashed in the headless part of "Enforce destruction of all backend config objects after initialization"] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2016-04-18main: document load_backend_new()Bryce Harrington1-1/+14
Split from the patch "Enforce destruction of all backend config objects after initialization". Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>