- Sep 22, 2017
-
-
Pekka Paalanen authored
Fixes a small memory leak, spotted with Valgrind. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Fixes a small memory leak, spotted with Valgrind. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Not referenced anywhere ever, has been there since the introduction of fbdev-backend. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
The timer was never removed anywhere. Remove it in disable() to match what happens in enable(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
This is a more logical name for the function, matching the pattern used in other backends and the hook names. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
If we pass the base->enabled test, then the renderer output is guaranteed to be there, so we can just destroy it. Destroying it before unmap makes the sequence match better the enable path. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Rename fbdev_frame_buffer_destroy() to fbdev_frame_buffer_unmap() because that is what it does. Adding the destruction of hw_surface in it makes it the perfect counterpart to fbdev_frame_buffer_map() which simplifies the code. fbdev_frame_buffer_map() can no longer call that, so just open-code the munmap() there. It is an error path, we don't really care about failures in an error path. The error path of fbdev_output_enable() is converted to call buffer_unmap() since that is exactly what it did. fbdev_output_disable() became redundant, being identical to fbdev_frame_buffer_unmap(). Invariant: output->hw_surface cannot be non-NULL without output->fb being non-NULL. hw_surface wraps the mmapped memory so cannot exist without the mmap. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Fix the assumption that MAP_FAILED would be equal to NULL. It is not. Set 'fb' explicitly to NULL on mmap failure so that comparisons to NULL would produce the expected result. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
A few functions had argument 'output' which was not used at all. Remove such unused arguments. The coming migration to the head-based output API would have made it awkward to come up with the output argument for these, but luckily they are not actually needed. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Change all backends to set the core backend pointer early. This is necessary for libweston core to be able to access the backend vfuncs before the backend init function returns. Particularly, weston_output_init() will be needing to inspect the backend vfuncs to see if the backend has been converted to a new API. Backends that create outputs as part of their init would fail without setting the pointer earlier. For consistency, all backends are modified instead of just those that could hit an issue. Libweston core will take care of resetting the backend pointer to NULL in case of error since "libweston: ensure backend is not loaded twice". Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Check and ensure that a compositor can only load one backend successfully. If a backend fails to load, it is theoretically possible to try another backend. Once loading succeeds, only destroying the compositor would allow "unloading" a backend. If backend init fail, ensure the backend pointer remains NULL to avoid calling into a half-loaded backend on e.g. compositor destruction. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
'release' is a more appropriate name because the function does not free the underlying memory. The main reason for this is that we need the name weston_output_destroy() for new API that actually will free also the underlying memory. Since the function is only used in backends and external backends are not a thing, this does not cause libweston major version bump, even though it does change the ABI. There is no way external users could have successfully used this function. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
A client may have bound the same wl_output multiple times, for who knows what reason. As the server cannot know which wl_output resource to use for which wl_surface, send enter/leave events for all of them. This is a protocol correctness fix. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Move the remaining scattered setup of the fixed properties into create_output_for_connector(). All these are already known and they cannot change. This helps future refactoring. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
This fixes a regression where monitor make and model would always be advertised as "unknown" to Wayland clients. The EDID strings were parsed at create_output_for_connector() time, but the fallback "unknown" values were set in weston_drm_output_api::set_mode vfunc later. This made the correct monitor info be shown in the log, but not sent to clients. The purpose of the "unknown" assignments is to give fallback values in case EDID is not providing them. Fix all that by moving all setting of the make, model and serial into create_output_for_connector(). These values cannot change afterwards anyway. While at it, document find_and_parse_output_edid(). The ugly casts in create_output_for_connector() are required to silence compositor warnings from ignoring const attribute. This is temporary, and a future refactoring will get rid of the casts. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Move the weston_output_init() call into wayland_output_create_common(). This avoids passing the name twice to different functions, and follows the precedent set in "libweston: weston_output_init(..., +name)" for calling init before accessing fields. Since the error paths in wayland_output_create_for_parent_output() and wayland_output_create_fullscreen() are now guaranteed to have weston_output init'd, call weston_output_destroy() appropriately. There might be more to free than just the name. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Add 'name' argument to weston_output_init(). This is much more obvious than the assert inside weston_output_init() to ensure the caller has set a field in weston_output first. Now weston_output_init() will strdup() the name itself, which means we can drop a whole bunch of strdup()s in the backends. This matches weston_output_destroy() which was already calling free() on the name. All backends are slightly reordered to call weston_output_init() before accessing any fields of weston_output, except the Wayland backend which would make it a little awkward to do it in this patch. Mind, that weston_output_init() still does not reset the struct to zero - it is presumed the caller has done it, since weston_output is embedded in the backend output structs. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
There are IVI tests that require an output. Previously these tests would silently skip if no outputs were present. However, a test setup should always have outputs with these tests. Skipping could easily leave the tests dead without notice. Make these tests fail instead of skip if there are no outputs. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Simplifies the code, and makes moving weston_output_init() into wayland_output_create_common() a little easier. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Gets rid of the constant size char array. While here, document the function. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Pekka Paalanen authored
Initialize the list in weston_output_init() instead of doing it separately in each backend. One would expect weston_output_init() to initialize all weston_output members, at least those that are not NULL. We rely on the set_size() functions to be called only once, as is assert()'d. If set_size() becomes callable multiple times, this patch will force them to be fixed to properly manage the mode list instead of losing all members. compositor-wayland.c is strange in wayland_output_create_for_parent_output(): it first called wayland_output_set_size() that initialized the mode list with a single mode manufactured from width and height and set that mode as current. Then it continued to reset the mode list and adding the list of modes from the parent output, leaving the current mode left to point to a mode struct that is no longer in the mode list and with a broken 'link' element. This patch changes things such that the manufactured mode is left in the list, and the parent mode list is added. This is probably not quite right either. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Sep 18, 2017
-
-
This patch disables the opacity binding when the modifier is configured to `none' in weston.ini, and thus supports use cases where one does not want to have this binding. Signed-off-by: Ian Ray <ian.ray@ge.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
This patch changes the zoom binding to use the modifier configured in weston.ini instead of hardcoding MODIFIER_SUPER. Signed-off-by: Ian Ray <ian.ray@ge.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
When calibrating touchscreen with weston-calibrator, you can use the mouse to click on the cross which is recorded as a touch event. This event is used to compute the final calibration of the touchscreen which results in invalid touchscreen calibration and broken touchscreen behaviour. In order to avoid to use the mouse in weston-calibrator, we disable mouse operation by default and add a parameter "--enable-mouse" to enable it. Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
weston_check_egl_extension() returns a bool, not a pointer. Fixes: ce5b614c "clients/nested: use weston_check_egl_extension over strstr" Cc: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
-
- Sep 04, 2017
-
-
Remove the option, because it is hard to use. Drm connector ids are hard to reach for users, and they can change when kernel or device tree is modified. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Daniel Stone <daniels@collabora.com> [Pekka: bump WESTON_DRM_BACKEND_CONFIG_VERSION] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Two cases are tested: success and fail case of the screen-remove-layer API. Signed-off-by: Michael Teyfel <mteyfel@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Aug 30, 2017
-
-
The old code for scheduling configure events on idle looked like: if (configure_scheduled) { if (this_event_is_the_same) { remove_timer(); return; } } If we queued one new event (either changed, or the client had never received any configure event), followed immediately by one event which was the same as the first, we would delete the scheduled send of the first event. Fix this by treating unconfigured surface as never the same. Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
-
- Aug 28, 2017
-
-
Daniel Stone authored
drm_pending_state is currently skeletal, but will be used to retain data through begin_repaint -> assign_planes -> repaint -> repaint_flush. The flush and cancel functions are currently identical, only freeing the state, but they will be used for different purposes in later patches. Specifically, the intent is to apply any pending output changes (through PageFlip/SetCrtc, or the atomic ioctls) in flush, and only free the state in cancel. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
Retain drm_plane tracking objects for all actual DRM planes when using universal planes, not just overlay planes. Rename uses of 'sprite' to 'plane' to make it clear that it can now be any kind of plane, not just an overlay/sprite. These are currently unused. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Add awareness of, rather than support for, universal planes. Activate the client cap when we start if possible, and if this is activated, studiously ignore non-overlay planes. For now. Signed-off-by: Daniel Stone <daniels@collabora.com> Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Co-authored-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
Add a cache for DRM property IDs and values, and use it for the two connector properties we currently update: DPMS and EDID. As DRM property ID values are not stable, we need to do a name -> ID lookup each run in order to discover the property IDs and enum values to use for those properties. Rather than open-coding this, add a property cache which we can use across multiple different object types. This patch takes substantial work from the universal planes support originally authored by Pekka Paalanen, though it has been heavily reworked. Signed-off-by: Daniel Stone <daniels@collabora.com> Co-authored-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
Daniel Stone authored
All planes being displayed have a framebuffer. What makes 'fb_plane' special is that it's being displayed as the primary plane by KMS. Previous patchsets renamed this to 'primary_plane' to match the KMS terminology, namely the CRTC's base plane, which is controlled by drmModeSetCrtc in the legacy API, and identified by PLANE_TYPE == "Primary" in the universal-plane API. However, Weston uses 'primary_plane' internally to refer to the case where client content is _not_ directly displayed on a plane, but composited via the renderer, with the result of the compositing then shown. Rename to 'scanout_plane' as our least-ambiguous name, and document it a bit. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
-
This moves the single sprite creation code from create_sprites() into a new function. The readability clean-up is small, but my intention is to write an alternate version of create_sprites(), and sharing the single sprite creation code is useful. The removal code now actually removes the plane from the list. In doing this, the gymnastics required to exact the CRTC ID the plane was last on when making a disabling drmModeSetPlane call have been removed; specifying the CRTC is not necessary when disabling a plane. (The atomic API goes a step further, mandating it be zero.) [daniels: Genericised from drm_sprite to drm_plane, moving some of the logic back into create_sprites(), also symmetrical drm_plane_destroy.] Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
-
- Aug 16, 2017
-
-
Pekka Paalanen authored
Fixes the failure to start with fbdev-backend: weston: /home/pq/git/weston/libweston/compositor.c:4733: weston_compositor_add_pending_output: Assertion `output->disable' failed. The disable hook was completely unimplemented, and the regression was caused by e952a01c "libweston: move asserts to add_pending_output()". It used to work because Weston never tried to explicitly disable the fbdev output, but now it is hitting the assert. Fix it by tentatively implementing a disable hook. It has not been tested to work for explicit disabling, but it does solve the regression. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102208 Cc: bluescreen_avenger@verizon.net Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Armin Krezović <krezovic.armin@gmail.com> Tested-by: n3rdopolis <bluescreen_avenger@verizon.net>
-
- Aug 11, 2017
-
-
Arnaud Vrac authored
It's been unused since the legacy (non-libinput) input backends have been removed. Signed-off-by: Arnaud Vrac <rawoul@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-
Arnaud Vrac authored
The GCC address sanitizer overrides dlopen and dlclose, so the configure test does not detect libdl as a needed dependency for linking. It is still needed though, as dlsym is not exported by the sanitizer. The result is that linking fails in the end. Fix this by checking for dlsym instead of dlopen. This can be reproduced by configuring the build with: CFLAGS="-fsanitize=address -fsanitize=undefined" LDFLAGS="-fsanitize=address -fsanitize=undefined" Signed-off-by: Arnaud Vrac <rawoul@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-
Arnaud Vrac authored
Signed-off-by: Arnaud Vrac <rawoul@gmail.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
-
Pekka Paalanen authored
Fixes "configure: error: Weston version is greater than libweston." Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102143 Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Aug 08, 2017
-
-
Bryce Harrington authored
A 3.0 branch has been established for stable release work.
-