platform/upstream/weston.git
6 years agoivi-shell/hmi-controller: Include config.h as to not break ivi-shell build on meson
Marius Vlad [Thu, 13 Dec 2018 14:31:14 +0000 (16:31 +0200)]
ivi-shell/hmi-controller: Include config.h as to not break ivi-shell build on meson

We're going to eventually pass bindir to weston-screenshooter and we
will need config.h info.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agolibweston: Allow taking screenshots when debug protocol is enabled
Marius Vlad [Thu, 13 Dec 2018 21:04:52 +0000 (23:04 +0200)]
libweston: Allow taking screenshots when debug protocol is enabled

Screenshots of the outputs can only be taken by having a keyboard
plug-ed in, as to avoid potential malicious intent. On the other hand,
this is problematic as there are cases where a keyboard cannot
be used as a input device. A particular use-case is that for
multiple devices it can be cumbersome to connect a keyboard such
that using ssh can be much easier and can be further automated.

This patch allows taking screenshots without the need of having a
keyboard connected when debug protocol is enabled.

Add also a few words about the fact that this is a serious issue
and can lead to silently leaking the output contents.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agolibweston/weston-debug: Add a easy way to determine if the debug protocol has been...
Marius Vlad [Thu, 13 Dec 2018 21:03:30 +0000 (23:03 +0200)]
libweston/weston-debug: Add a easy way to determine if the debug protocol has been enabled

This allows additional debug features to depend on the debug protocol being enabled

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agoclients/screenshot: Allow weston-screenshooter to be called directly
Marius Vlad [Wed, 5 Dec 2018 12:40:31 +0000 (14:40 +0200)]
clients/screenshot: Allow weston-screenshooter to be called directly

As is stands now, libexec/weston-screenshooter can only be called from
within weston server. This will allow weston-screenshooter to be called
on the command line. The final scope here is to allow taking screenshots
without the need of a keyboard.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agoclients/screenshot: Avoid using global variables to pass down data between functions
Marius Vlad [Thu, 13 Dec 2018 13:24:08 +0000 (15:24 +0200)]
clients/screenshot: Avoid using global variables to pass down data between functions

This is just cosmetic and doesn't fixes anything.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agolibweston/compositor-drm: Add missing debug message for scanout_view
Marius Vlad [Tue, 18 Dec 2018 08:29:20 +0000 (10:29 +0200)]
libweston/compositor-drm: Add missing debug message for scanout_view

Print debug message when the fb coudn't be retrieved for the primary
plane.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agolibweston/compositor-drm: No need to test for invalid alpha for the view
Marius Vlad [Tue, 18 Dec 2018 08:27:31 +0000 (10:27 +0200)]
libweston/compositor-drm: No need to test for invalid alpha for the view

This is redundant and is already being checked drm_fb_get_from_view()

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agolibweston/compositor-drm: Print composition mode in weston-debug
Marius Vlad [Fri, 14 Dec 2018 09:56:10 +0000 (11:56 +0200)]
libweston/compositor-drm: Print composition mode in weston-debug

This fixes the situation when using only plane-state mode for
compositing there's no obvious debug message stating that. This patch
makes it slightly better/easier to dermine what mode the compositor is
using currently.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agoFix compiler warning: unused variable when building with DEBUG
Marius Vlad [Fri, 23 Nov 2018 12:10:16 +0000 (14:10 +0200)]
Fix compiler warning: unused variable when building with DEBUG

clients/keyboard.c: In function 'dbg':
clients/keyboard.c:276:6: warning: variable 'l' set but not used [-Wunused-but-set-variable]
  int l;

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agoFix compiler warnings: invalid type format
Marius Vlad [Fri, 23 Nov 2018 12:07:33 +0000 (14:07 +0200)]
Fix compiler warnings: invalid type format

This patch fixes the following warnings:

clients/weston-info.c: In function 'print_tablet_tool_info':
clients/weston-info.c:569:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' [-Wformat=]
   printf("\t\t\thardware serial: %lx\n", info->hardware_serial);
   ^
clients/weston-info.c:572:3: warning: format '%lx' expects argument of type 'long unsigned int', but argument 2 has type 'uint64_t' [-Wformat=]
   printf("\t\t\thardware wacom: %lx\n", info->hardware_id_wacom);

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agoFix compiler warnings: clobber variables
Marius Vlad [Fri, 23 Nov 2018 12:04:46 +0000 (14:04 +0200)]
Fix compiler warnings: clobber variables

This patchs fixes warnings generated by older toolchains:

shared/image-loader.c: In function 'load_png':
shared/image-loader.c:211:12: warning: variable 'data' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
  png_byte *data = NULL;

See https://linux.die.net/man/3/longjmp why is this needed.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agoFix compiler warnings generated by older toolchains/compiler
Marius Vlad [Fri, 23 Nov 2018 12:02:07 +0000 (14:02 +0200)]
Fix compiler warnings generated by older toolchains/compiler

This fixes warnings like ``may be used uninitialized''

libweston/compositor-drm.c: In function 'drm_device_is_kms':
libweston/compositor-drm.c:6374:12: warning: 'id' may be used uninitialized in this function [-Wmaybe-uninitialized]
  b->drm.id = id;

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agomeson: fix -Wno-foo argument testing
Eric Engestrom [Thu, 13 Dec 2018 17:05:31 +0000 (17:05 +0000)]
meson: fix -Wno-foo argument testing

gcc and clang ignore `-Wno-foo` arguments nowadays, so we need to
test the positive variant instead.

6 years agoCI: Add Meson build
Daniel Stone [Sun, 22 Jul 2018 14:38:54 +0000 (15:38 +0100)]
CI: Add Meson build

This uses pip to install Meson in order to get a sufficiently new
version.

Signed-off-by: Daniel Stone <daniels@collabora.com>
6 years agoCI: build rdp-backend
Pekka Paalanen [Sat, 24 Nov 2018 11:52:49 +0000 (13:52 +0200)]
CI: build rdp-backend

Extends CI build coverage to catch more issues.

freerdp2-dev needs stretch-backports.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
6 years agoCI: build remoting-plugin
Pekka Paalanen [Sat, 24 Nov 2018 11:51:04 +0000 (13:51 +0200)]
CI: build remoting-plugin

Extends CI build coverage to catch more issues.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
6 years agobuild: add meson to autotools dist tar-ball
Pekka Paalanen [Sat, 24 Nov 2018 12:13:02 +0000 (14:13 +0200)]
build: add meson to autotools dist tar-ball

This should let people using the dist tarballs to build with meson.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
6 years agoAdd Meson build system
Daniel Stone [Thu, 24 Nov 2016 15:54:51 +0000 (15:54 +0000)]
Add Meson build system

Meson is a build system, currently implemented in Python, with multiple
output backends, including Ninja and Make. The build file syntax is
clean and easy to read unlike autotools. In practise, configuring and
building with Meson and Ninja has been observed to be much faster than
with autotools. Also cross-building support is excellent.

More information at http://mesonbuild.com

Since moving to Meson requires some changes from users in any case, we
took this opportunity to revamp build options. Most of the build options
still exist, some have changed names or more, and a few have been
dropped. The option to choose the Cairo flavour is not implemented since
for the longest time the Cairo image backend has been the only
recommended one.

This Meson build should be fully functional and it installs everything
an all-enabled autotools build does. Installed pkg-config files have
some minor differences that should be insignificant. Building of some
developer documentation that was never installed with autotools is
missing.

It is expected that the autotools build system will be removed soon
after the next Weston release.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Co-authored-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
6 years agotests: fix include in input-timestamps-helper.c
Daniel Stone [Sun, 9 Dec 2018 12:49:07 +0000 (14:49 +0200)]
tests: fix include in input-timestamps-helper.c

No need to use the protocol directory prefix. This may even be necessary
for the Meson build.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Extracted from the patch adding the Meson build system.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
6 years agoshared: remove fallback definition of backtrace()
Pekka Paalanen [Sat, 24 Nov 2018 09:39:48 +0000 (11:39 +0200)]
shared: remove fallback definition of backtrace()

The user of backtrace() was removed in
bb707dc0fe331c9af112a0552b7aa6fde755dd83 and has been unused since.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
6 years agoclients/simple-egl: include weston-egl-ext.h correctly
Pekka Paalanen [Sat, 17 Nov 2018 12:48:04 +0000 (14:48 +0200)]
clients/simple-egl: include weston-egl-ext.h correctly

weston-egl-ext.h was moved to shared/ in
ffff92d592e1635a7ee4511ad3e080f7576553bd

Use the correct include path, so that Meson build does not need to add
../shared to the include path just for this.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
6 years agotests: Rename surface-screenshot
Daniel Stone [Tue, 28 Aug 2018 21:53:59 +0000 (22:53 +0100)]
tests: Rename surface-screenshot

Give it a more regular name, matching all the other test plugins.

Signed-off-by: Daniel Stone <daniels@collabora.com>
6 years agordp-compositor: fix compilation with FreeRDP 2.0-rc4
David Fort [Tue, 4 Dec 2018 22:25:39 +0000 (23:25 +0100)]
rdp-compositor: fix compilation with FreeRDP 2.0-rc4

Some members have been removed from FreeRDP structs, so let's use local
variables.

6 years agocompositor: Make pixel format printing in human-friendly form
Marius Vlad [Tue, 20 Nov 2018 15:52:31 +0000 (17:52 +0200)]
compositor: Make pixel format printing in human-friendly form

This would make weston-debug much more readable when looking at
the pixel format of the buffer.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agopixel-formats: Added pixel_format_get_info_shm() helper for printing SHM buffers
Marius Vlad [Tue, 20 Nov 2018 15:04:57 +0000 (17:04 +0200)]
pixel-formats: Added pixel_format_get_info_shm() helper for printing SHM buffers

In current form SHM buffers pixel format can only be printed as 0 and 1.
With the help of this helper we align with DRM_FORMAT_ pixel format.

Signed-off-by: Marius Vlad <marius.vlad0@gmail.com>
6 years agocompositor-drm: parse all DRM format names
Pekka Paalanen [Wed, 26 Sep 2018 11:33:36 +0000 (14:33 +0300)]
compositor-drm: parse all DRM format names

Use the pixel format table to parse format names. This makes the parser
recognize almost all DRM format names.

Not all formats are usable, but we rely on the use to fail
appropriately. What we can use depends on the drivers anyway.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agopixel-formats: search by name
Pekka Paalanen [Wed, 26 Sep 2018 11:26:53 +0000 (14:26 +0300)]
pixel-formats: search by name

Add a function to find a format description by the DRM format name. This
will be useful when parsing configuration strings.

While at it, fix the two function formattings in pixel-formats.h to
match everything else in the file.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agopixel-formats: add name string
Pekka Paalanen [Wed, 26 Sep 2018 11:00:34 +0000 (14:00 +0300)]
pixel-formats: add name string

There is often a need to print the name of a pixel format. Printing the
raw numeric value is hard to decipher, printing the four ASCII
characters is slightly more human-friendly but still needs a decoder
table. Add a name that can be printed easily.

The bulk of this patch was done with:
sed -i -e 's/\.format = DRM_FORMAT_\(.\+\),/DRM_FORMAT(\1),/' libweston/pixel-formats.c

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agoDon't look for weston.ini in the current working directory
Dima Ryazanov [Thu, 15 Nov 2018 06:55:22 +0000 (22:55 -0800)]
Don't look for weston.ini in the current working directory

It's a bit surprising that Weston looks different when launched from the root
of the git repo vs from elsewhere.

But it's also technically a security vulnerability: if I launch it from
a directory like /tmp, it might pick up a weston.ini created by another user,
which could then load modules with arbitrary code. Basically, it's the same
problem as including "." in $PATH.

Signed-off-by: Dima Ryazanov <dima@gmail.com>
6 years agoivi-shell: remove input-method section from config
Emre Ucan [Fri, 2 Nov 2018 14:42:17 +0000 (15:42 +0100)]
ivi-shell: remove input-method section from config

input_method protocol is no longer supported.
Therefore, we should remove it from the example config

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agoivi-shell: remove unused functions and members
Emre Ucan [Fri, 2 Nov 2018 14:17:00 +0000 (15:17 +0100)]
ivi-shell: remove unused functions and members

input panel related members of ivi_shell struct are
not required anymore. Also get_default_view(),
input_panel_setup() and input_panel_destroy() are not used.
Therefore, we can remove them.

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agoivi-shell: remove input panel implementation
Emre Ucan [Fri, 2 Nov 2018 14:09:48 +0000 (15:09 +0100)]
ivi-shell: remove input panel implementation

it is unused now

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agoivi-shell: don't use input panel implementation
Emre Ucan [Fri, 2 Nov 2018 14:04:49 +0000 (15:04 +0100)]
ivi-shell: don't use input panel implementation

input panel implementation puts contents of an
application, which uses input_method protocol,
on top of all other surfaces. It is not controllable
with ivi-layout interface.

This is not acceptable for an In-Vehicle Infotainment
platform. Because we have to ensure configured scenegraph
cannot be hijacked by any rogue application.

Therefore, I am removing input panel implementation

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agocompositor-drm: Log atomic commits and flips
Arkadiusz Hiler [Mon, 15 Oct 2018 08:06:11 +0000 (11:06 +0300)]
compositor-drm: Log atomic commits and flips

Add a couple log points for tracking atomic commits and flip processing.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
6 years agolibweston-desktop/xdg-shell: update view transforms for xdg popup surfaces
Michael Olbrich [Wed, 10 Oct 2018 11:49:45 +0000 (13:49 +0200)]
libweston-desktop/xdg-shell: update view transforms for xdg popup surfaces

For toplevel surfaces, the shell will do the same thing. Without this, the
commit does not trigger repaints, because the output mask for the surface
is not set.

Without this the popup is not shown unless something else triggers a
repaint. This is usually not seen because the mouse cursor triggers a
repaint at the same time.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
6 years agogl-renderer, pixman: disconnect the client on unhandled buffer type.
Vasilis Liaskovitis [Wed, 10 Oct 2018 14:14:55 +0000 (16:14 +0200)]
gl-renderer, pixman: disconnect the client on unhandled buffer type.

Introduce a helper function to disconnect the client on unhandled
buffer types, and use it in the gl and pixman renderers. The function
is modeled after linux_dmabuf_buffer_send_server_error.

Also print the egl error state in the gl renderer, in case the
unrecognized buffer error happens when querying an egl buffer.

https://gitlab.freedesktop.org/wayland/weston/issues/148

6 years agoclients: configure cursor theme from XCURSOR_* env
emersion [Wed, 10 Oct 2018 07:46:12 +0000 (09:46 +0200)]
clients: configure cursor theme from XCURSOR_* env

If XCURSOR_THEME or XCURSOR_SIZE is set, use it as the cursor theme
or cursor size.

This is similar to what Qt and some X11 apps do.

6 years agoFixed potential memory leaks in simple-dmabuf-drm.c found by Cppcheck.
orbitcowboy [Fri, 5 Oct 2018 16:02:10 +0000 (16:02 +0000)]
Fixed potential memory leaks in simple-dmabuf-drm.c found by Cppcheck.

6 years agocompositor-drm: Read FB2_MODIFIERS capability
Deepak Rawat [Fri, 24 Aug 2018 20:16:03 +0000 (13:16 -0700)]
compositor-drm: Read FB2_MODIFIERS capability

Not all drivers support fb2 modifiers so read the capability before
using drmModeAddFB2WithModifiers.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
6 years agoivi-shell: check ivi_view mappedness in commit_changes()
Emre Ucan [Fri, 26 Oct 2018 12:42:21 +0000 (14:42 +0200)]
ivi-shell: check ivi_view mappedness in commit_changes()

If the view is not mapped, we do not need to update its
properties. We can use ivi_view_is_mapped() function to
check it.

Also we don't need to call weston_view_damage_below()
for weston_views, which were in the scenegraph. Because
we are calling weston_view_unmap for views of unmapped
ivi_views in build_view_list() function

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agoivi-shell: unmap views which are not in scenegraph
Emre Ucan [Fri, 26 Oct 2018 13:07:03 +0000 (15:07 +0200)]
ivi-shell: unmap views which are not in scenegraph

From Michael Olbrich:
"Both the core in weston_compositor_build_view_list() with view.link
and the ivi-shell in commit_screen_list() with view.layer_link
don't remove the old views from the list.

As a result, all views that are not currently in the list have
old broken links. Destroying such a view tries to remove
the view from these lists and will access the old, invalid pointers."

Therefore, we have to unmap weston_views which are not in current
scenegraph of ivi-shell. I implemented ivi_view_is_mapped() function
to check mappedness of ivi_views. The functions checks:
   - the view is on a layer's order list
   - the layer is on a screen
   - the layer and view's ivi_surface are visible

If ivi_view is not mapped but weston_view is still mapped,
we have to unmap the weston_view with weston_view_unmap() call.

Reported-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agoivi-shell: Add build_view_list function
Emre Ucan [Fri, 26 Oct 2018 12:15:15 +0000 (14:15 +0200)]
ivi-shell: Add build_view_list function

Move the implementation from commit_screen_list to
build_view_list function

Signed-off-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agoAdd remoting plugin for output streaming
Tomohito Esaki [Wed, 24 Jan 2018 08:08:02 +0000 (17:08 +0900)]
Add remoting plugin for output streaming

Remoting plugin support streaming image of virtual output on drm-backend
to remote output. By appending remote-output section in weston.ini,
weston loads remoting plugin module and creates virtual outputs via
remoting plugin. The mode, host, and port properties are configurable in
remote-output section.

This plugin send motion jpeg images to client via RTP using gstreamer.
Client can receive by using following pipeline of gst-launch.

gst-launch-1.0 rtpbin name=rtpbin \
   udpsrc caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,
encoding-name=JPEG,payload=26" port=[PORTNUMBER] !
          rtpbin.recv_rtp_sink_0 \
   rtpbin. ! rtpjpegdepay ! jpegdec ! autovideosink \
   udpsrc port=[PORTNUMBER+1] ! rtpbin.recv_rtcp_sink_0 \
   rtpbin.send_rtcp_src_0 !
          udpsink port=[PORTNUMBER+2] sync=false async=false

where, PORTNUMBER is specified in weston.ini.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
6 years agoweston: Add set up SIGUSR1 blocking early using pthread_sigmask()
Tomohito Esaki [Tue, 4 Sep 2018 08:18:06 +0000 (17:18 +0900)]
weston: Add set up SIGUSR1 blocking early using pthread_sigmask()

Xwayland block SIGUSR1 signal for handling this signal. However, if some
weston plugins creates additional threads before xwayland is loaded,
this signal get delivered these threads and causes weston quit.
Therefore, we should set up SIGUSR1 blocking early so that these threads
can inherit the setting when created.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
6 years agocompositor-drm: Add Support virtual output
Tomohito Esaki [Wed, 31 Jan 2018 08:50:48 +0000 (17:50 +0900)]
compositor-drm: Add Support virtual output

Add support virtual output for streaming image to remote output by
remoting-plugin which will be added by the patch:
"Add remoting plugin for output streaming."
The gbm bo of virtual output is the linear format.

Virtual output is implemented based on a patch by Grigory Kletsko
<grigory.kletsko@cogentembedded.com>.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
6 years agocompositor-drm: store gbm bo flags in drm_output
Tomohito Esaki [Wed, 31 Jan 2018 08:50:15 +0000 (17:50 +0900)]
compositor-drm: store gbm bo flags in drm_output

Store usage flags of gbm bo in drm_output in order to specify the bo
format for each output. A following patch will add a new type of
drm_output which requires different gbm_bo_flags.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
6 years agogl-renderer: provide fence sync fd for synchronizing with GPU rendering
Tomohito Esaki [Tue, 22 May 2018 03:05:14 +0000 (12:05 +0900)]
gl-renderer: provide fence sync fd for synchronizing with GPU rendering

Add new API to gl-renderer interface for providing fence sync fd. the
backend can wait for GPU rendering by this API.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
6 years agocompositor-drm: add num_planes to drm_fb structure
Tomohito Esaki [Mon, 10 Sep 2018 02:44:17 +0000 (11:44 +0900)]
compositor-drm: add num_planes to drm_fb structure

Add new member to store number of planes to drm_fb structure.

Signed-off-by: Tomohito Esaki <etom@igel.co.jp>
6 years agolibweston: print EGL information as early as possible
Emil Velikov [Thu, 18 Oct 2018 14:58:09 +0000 (15:58 +0100)]
libweston: print EGL information as early as possible

In the case where CreateContext/MakeCurrent fails, we still want to
know what the EGL driver is capable of.

Move the EGL info printing, just after the eglInitialize() call to
ensure that.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
6 years agolibweston: split EGL and GL info logging
Emil Velikov [Thu, 18 Oct 2018 14:55:28 +0000 (15:55 +0100)]
libweston: split EGL and GL info logging

Split the two into separate functions. Former requires an initialized
EGL display, while the latter a current context.

We will use that distinction with the next patch.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
6 years agoxwayland: Silence format-truncation compilation warnings
Alexandros Frantzis [Fri, 12 Oct 2018 09:52:42 +0000 (12:52 +0300)]
xwayland: Silence format-truncation compilation warnings

We are currently formatting 32-bit signed integers into 8 byte buffers,
which are too small, causing the compiler to complain. Update the buffer
size to the minimum required value of 12 bytes: 1 for the sign, 10 for
the number, and 1 for the null byte terminator.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
6 years agocompositor-drm: Don't warn about missing backlight control
Daniel Stone [Fri, 21 Sep 2018 15:59:08 +0000 (16:59 +0100)]
compositor-drm: Don't warn about missing backlight control

Not every output will have a backlight control, and even if it does we
may just not be able to find it. Not having backlight control isn't an
error, so don't spam the log with it, as doing so can confuse users into
thinking this is an actual error which is responsible for their real
problems.

Signed-off-by: Daniel Stone <daniels@collabora.com>
6 years agogl-renderer: Remove warning on missing extensions
Daniel Stone [Fri, 21 Sep 2018 15:57:13 +0000 (16:57 +0100)]
gl-renderer: Remove warning on missing extensions

Not having swap_buffers_with_damage could cause a performance impact on
some backends, but at least on GBM it causes no issues. It also seems to
confuse users into thinking it's a legitimate error which could explain
session slowness.

Similarly with buffer_age, whilst we do lose a little bit of performance
by not being able to do partial renders, it is not a great deal, and the
user is unlikely to be able to do anything about it in any event.

Remove the warning; we print the full extension list at startup, so we
already have enough information from the logs to easily diagnose any
real errors.

Signed-off-by: Daniel Stone <daniels@collabora.com>
6 years agoweston: keep non-desktop displays turned off by default
Philipp Zabel [Thu, 30 Aug 2018 15:41:42 +0000 (17:41 +0200)]
weston: keep non-desktop displays turned off by default

Keep non-desktop heads representing e.g. head mounted displays turned off by
default. When using the DRM backend they can still be enabled by setting an
explicit [output] mode (or "mode=preferred") in weston.ini.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
6 years agocompositor-drm: check connector non-desktop property and mark head accordingly
Philipp Zabel [Thu, 30 Aug 2018 15:39:51 +0000 (17:39 +0200)]
compositor-drm: check connector non-desktop property and mark head accordingly

Use the DRM connector "non-desktop" property to mark weston_heads that
represent head mounted displays and other non-standard displays that the
desktop should not be extended to.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
6 years agolibweston: add weston_head_{is,set}_non_desktop()
Philipp Zabel [Thu, 30 Aug 2018 15:38:03 +0000 (17:38 +0200)]
libweston: add weston_head_{is,set}_non_desktop()

Add non-desktop property for weston_heads representing displays that the
desktop should not be extended to by default, e.g. head mounted displays.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
6 years agocompositor-drm: use weston_view_is_opaque()
Philipp Zabel [Mon, 3 Sep 2018 18:13:52 +0000 (20:13 +0200)]
compositor-drm: use weston_view_is_opaque()

Implement drm_view_is_opaque() using weston_view_is_opaque(). Also, use
weston_view_is_opaque() directly in drm_output_propose_state(), with the
clipped_view.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
6 years agolibweston: add weston_view_is_opaque()
Philipp Zabel [Mon, 3 Sep 2018 18:11:15 +0000 (20:11 +0200)]
libweston: add weston_view_is_opaque()

Use the weston_surface is_opaque property, the opaque region, and the view
alpha value to determine whether the weston_view is opaque in a specific
region.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
6 years agolibweston: add weston_surface is_opaque property
Philipp Zabel [Mon, 3 Sep 2018 17:44:59 +0000 (19:44 +0200)]
libweston: add weston_surface is_opaque property

Add an is_opaque property that is set to true if the attached buffer does not
have an alpha component, or if the solid color is non-transparent.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
6 years agolibweston: fix typo in comment
Changwoo Cho [Fri, 4 Aug 2017 15:30:47 +0000 (00:30 +0900)]
libweston: fix typo in comment

6 years agoivi-shell: Add missing sentence point
Emmanuel Gil Peyrot [Tue, 18 Sep 2018 09:54:29 +0000 (11:54 +0200)]
ivi-shell: Add missing sentence point

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
6 years agoFix and remove broken links to confluence pages
Sruthik P [Thu, 7 Jun 2018 06:24:59 +0000 (11:54 +0530)]
Fix and remove broken links to confluence pages

6 years agoweston-info: add xdg-output support
emersion [Mon, 17 Sep 2018 21:51:13 +0000 (23:51 +0200)]
weston-info: add xdg-output support

6 years agodesktop-shell: allow to center background image
Stefan Agner [Wed, 22 Aug 2018 21:56:07 +0000 (23:56 +0200)]
desktop-shell: allow to center background image

Add the centered option as background-type. This draws the image
once in the center of the screen. If the image is larger, it will
be cropped like scale-crop.

Signed-off-by: Stefan Agner <stefan@agner.ch>
6 years agodesktop-shell: always paint background color first
Stefan Agner [Wed, 22 Aug 2018 21:33:10 +0000 (23:33 +0200)]
desktop-shell: always paint background color first

Only draw the background once, using the the current default
background color or the user specified background color.

This allows for non-filling background image implemenation
while still using the specified background color.

Signed-off-by: Stefan Agner <stefan@agner.ch>
6 years agomain: do not exit in case stdin is a closed stream
Stefan Agner [Wed, 22 Aug 2018 12:09:18 +0000 (14:09 +0200)]
main: do not exit in case stdin is a closed stream

Weston should not exit if stdin is a closed stream. This allows
to launch with a closed stdin:

  # weston <&-

This fixes screen sharing using weston: Weston closes the stdin
before forking itself to execute the screen sharing instance of
weston. Before this patch screen sharing failed with:
  Screen share failed: No wl_shm found
  unknown child process exited

Fixes: f0d39b2243e5 ("weston: Set CLOEXEC on stdin")
Signed-off-by: Stefan Agner <stefan@agner.ch>
6 years agocompositor-drm: Add drm-backend log debug scope
Daniel Stone [Fri, 20 Jul 2018 09:21:28 +0000 (10:21 +0100)]
compositor-drm: Add drm-backend log debug scope

Add a 'drm-debug' scope which prints verbose information about the DRM
backend's repaint cycle, including the decision tree on how views are
assigned (or not) to planes.

Signed-off-by: Daniel Stone <daniels@collabora.com>
6 years agocompositor-drm: Add backend pointer to drm_output
Daniel Stone [Fri, 20 Jul 2018 18:00:06 +0000 (19:00 +0100)]
compositor-drm: Add backend pointer to drm_output

Add this for convenience, so it's easier to access when we add the DRM
backend debug scope.

Signed-off-by: Daniel Stone <daniels@collabora.com>
6 years agocompositor-drm: Calculate atomic-commit flags earlier
Daniel Stone [Fri, 20 Jul 2018 18:35:05 +0000 (19:35 +0100)]
compositor-drm: Calculate atomic-commit flags earlier

Shift up our calculation of the flags we use for atomic commits. We will
later use this to differentiate between test-only and full commits when
printing debug information inside drm_output_state_apply_atomic.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agocompositor: Add scene-graph debug scope
Daniel Stone [Fri, 20 Jul 2018 08:46:24 +0000 (09:46 +0100)]
compositor: Add scene-graph debug scope

Add a 'scene-graph' debug scope which will dump out the current set of
outputs, layers, and views and as much information as possible about how
they are rendered and composited.

Signed-off-by: Daniel Stone <daniels@collabora.com>
6 years agocompositor: Add weston_layer_mask_is_infinite
Daniel Stone [Fri, 20 Jul 2018 07:38:25 +0000 (08:38 +0100)]
compositor: Add weston_layer_mask_is_infinite

As a counterpart to weston_layer_set_mask_infinite(), returning if the
mask is the same as what is set.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agocompositor: protocol logger
Pekka Paalanen [Thu, 12 Oct 2017 11:18:15 +0000 (13:18 +0200)]
compositor: protocol logger

This is better than running Weston with WAYLAND_DEBUG=server:
- It is enabled on demand, no unnecessary flooding and no need to
  restart the compositor if debug was enabled.
- It prints client pointers so that messages with different clients can
  be seen apart.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
parse and print message arguments in protocol_log_fn

Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agoxwm: convert WM_DEBUG into a weston-debug scope
Pekka Paalanen [Thu, 12 Oct 2017 11:18:14 +0000 (13:18 +0200)]
xwm: convert WM_DEBUG into a weston-debug scope

Instead of a compile time choice, offer the XWM debugging messages
through the weston-debug protocol and tool on demand. Users will not
need to recompile weston to get XWM debugging, and it won't flood the
weston log.

The debug scope needs to be initialized in launcher.c for it be
available from start, before the first X11 client tries to connect and
initializes XWM.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
pass the wm_debug scope to weston_debug_scope_printf API to append
the scopename to the timestr

Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agoxwm: move FILE to the callers of dump_property()
Pekka Paalanen [Thu, 12 Oct 2017 11:18:13 +0000 (13:18 +0200)]
xwm: move FILE to the callers of dump_property()

This is preparation for using the weston-debug infrastructure for
WM_DEBUG. dump_property() may be called from different debugging
contexts and often needs to be prefixed with more information.

An alternative to this patch would be to pass in the weston_debug_scope
as an argument to dump_property(), but then all callers would need to be
converted to weston-debug infra in a single commit.

Therefore require the callers to provide the FILE* to print to.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agoxwm: dump_property() to use FILE internally
Pekka Paalanen [Thu, 12 Oct 2017 11:18:12 +0000 (13:18 +0200)]
xwm: dump_property() to use FILE internally

Write the output of dump_property() out in one log call. When multiple
processes (weston and Xwayland) are writing to the same file, this will
keep the property dump uninterrupted by Xwayland debug prints.

This is also preparation for more development in the same direction.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agocompositor: offer logs via weston-debug
Pekka Paalanen [Thu, 12 Oct 2017 11:18:11 +0000 (13:18 +0200)]
compositor: offer logs via weston-debug

This registers a new weston-debug scope "log" through which one can get
live log output interspersed with possible other debugging prints. This
is implemented by passing the format and varargs received in our usual
logging entrypoints through to the debug scope as well.

Anywhere where the varargs set is used twice (once for vfprintf, another
for the debug scope), we copy the va_list in order to avoid reusing it,
which leads to memory safety issues.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agoclients: add weston-debug
Pekka Paalanen [Thu, 12 Oct 2017 11:13:44 +0000 (13:13 +0200)]
clients: add weston-debug

A tool for accessing the zcompositor_debug_v1 interface features.

Installed along weston-info, because it should be potentially useful for
people running libweston-based compositors.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Added a man page for weston-debug client

Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
[Pekka: fixed 'missing braces aroudn initializer' warning]

Add --list and --all arguments, using interface advertisement.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agocompositor: add option to enable weston_debug
Pekka Paalanen [Thu, 12 Oct 2017 11:13:43 +0000 (13:13 +0200)]
compositor: add option to enable weston_debug

Let users enable the compositor debug protocol on the compositor command
line. This allows weston-debug tool to work.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agolibweston: add weston_debug API and implementation
Pekka Paalanen [Thu, 12 Oct 2017 11:13:42 +0000 (13:13 +0200)]
libweston: add weston_debug API and implementation

weston_debug is both a libweston API for relaying debugging messages,
and the compositor-debug wayland protocol implementation for accessing those
debug messages from a Wayland client.

weston_debug_compositor_{create,destroy}() are private API, hence not
exported.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
append the debug scope name along with the timestamp in
weston_debug_scope_timestamp API

Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add explicit advertisement of debug scope names.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agoprotocol: add weston-debug.xml
Pekka Paalanen [Thu, 12 Oct 2017 11:13:41 +0000 (13:13 +0200)]
protocol: add weston-debug.xml

This is a new debugging extension for non-production environments. The
aim is to replace all build-time choosable debug prints in the
compositor with runtime subscribable debug streams.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
Added new libweston-$MAJOR-protocols.pc file and install that
for external projects to find the XML files installed by libweston.

Signed-off-by: Maniraj Devadoss <Maniraj.Devadoss@in.bosch.com>
Use noarch_pkgconfig_DATA instead, add ${pc_sysrootdir}, drop
unnecessary EXTRA_DIST of weston-debug.xml.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Add explicit advertisement of available debug interfaces.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
6 years agogl-renderer: Explicitly zeroing the offset for 2^ plane of SHM_FOMRAT_YUYV
Matteo Valdina [Fri, 31 Aug 2018 14:47:59 +0000 (09:47 -0500)]
gl-renderer: Explicitly zeroing the offset for 2^ plane of SHM_FOMRAT_YUYV

This fix a crash, when gl-renderer uploads the 2^ texture for YUYV.
The pixels buffer was offset of a random value.

6 years agoCONTRIBUTING: How do I get started?
Daniel Stone [Tue, 28 Aug 2018 16:55:02 +0000 (17:55 +0100)]
CONTRIBUTING: How do I get started?

Attempt to answer the question on everyone's lips.

Signed-off-by: Daniel Stone <daniels@collabora.com>
6 years agoman: make substitutions meson-friendly
Pekka Paalanen [Thu, 16 Aug 2018 14:22:14 +0000 (17:22 +0300)]
man: make substitutions meson-friendly

Change format of substituted variables to follow the pattern used by
configure_file() in Meson.

This helps the migration to Meson, making man/meson.build much cleaner.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agoconfigure.ac: Reopen master for regular development
Derek Foreman [Fri, 24 Aug 2018 18:43:34 +0000 (13:43 -0500)]
configure.ac: Reopen master for regular development

6 years agoconfigure.ac: bump to version 5.0.0 for the official release upstream/5.0.0
Derek Foreman [Fri, 24 Aug 2018 17:39:33 +0000 (12:39 -0500)]
configure.ac: bump to version 5.0.0 for the official release

6 years agocompositor-drm: add DPI connector type
Stefan Agner [Mon, 20 Aug 2018 15:11:38 +0000 (17:11 +0200)]
compositor-drm: add DPI connector type

Linux v4.7 introduced a new connector type for display parallel
interface (DPI). Add DPI to the list of connectors in the DRM
backend of Weston as well. This avoid DPI connectors showing up
as UNNAMED.

Signed-off-by: Stefan Agner <stefan@agner.ch>
6 years agoconfigure.ac: bump to version 4.0.94 for the RC2 release
Derek Foreman [Fri, 17 Aug 2018 16:20:27 +0000 (11:20 -0500)]
configure.ac: bump to version 4.0.94 for the RC2 release

6 years agoinput: Send unique keymap file descriptors to clients
Derek Foreman [Wed, 28 Jun 2017 17:17:46 +0000 (12:17 -0500)]
input: Send unique keymap file descriptors to clients

Client may map any file descriptor opened for writing with PROT_WRITE
themselves.  On linux, even a read-only file descriptor to an unlinked
file can be re-opened with write permission through /proc/self/fd.

The only way to prevent this is to create a memfd which
is subsequently write-sealed.  Unfortunately this prevents clients
from mapping with MAP_SHARED, which is already in widespread usage.

To isolate and protect the keymap, whilst allowing MAP_SHARED clients
to continue to work, use a unique file descriptor for each
wl_keyboard resource.

Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agoinput: add weston_keyboard_send_keymap helper function
Derek Foreman [Wed, 28 Jun 2017 16:41:43 +0000 (11:41 -0500)]
input: add weston_keyboard_send_keymap helper function

We've always had "send_keymap" internally, but some places failed to use
it.  Since we also use this in the text backend, export it.

Reviewed-by: Daniel Stone <daniels@collabora.com>
6 years agoconfigure.ac: bump to version 4.0.93 for the RC1 release
Derek Foreman [Fri, 10 Aug 2018 18:03:57 +0000 (13:03 -0500)]
configure.ac: bump to version 4.0.93 for the RC1 release

6 years agoivi-shell: Remove the compositor destory listener from list during de-init
Harsha M M [Tue, 7 Aug 2018 13:35:03 +0000 (19:05 +0530)]
ivi-shell: Remove the compositor destory listener from list during de-init

During de-init ensure removal of compositor destroy notification
from list. Otherwise a dongling pointer is left behind which will
affect other plugins.

Signed-off-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agolibweston: Remove signals from the list during de-init
Harsha M M [Tue, 7 Aug 2018 13:35:02 +0000 (19:05 +0530)]
libweston: Remove signals from the list during de-init

During de-init ensure removal of added signals from list. Otherwise
a dongling pointer is left behind which will affect other plugins.

Signed-off-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agodoc: fix typos in CONTRIBUTING.md
Will Thompson [Tue, 7 Aug 2018 14:16:46 +0000 (14:16 +0000)]
doc: fix typos in CONTRIBUTING.md

* Cover letters are no more; presumably the changes since the previous
  revision should be summarised in the MR
* Code should be indented with tabs, not implemented with tabs

Signed-off-by: Will Thompson <will@willthompson.co.uk>
6 years agodoc: Use GitLab MRs for patches, not the list
Daniel Stone [Sat, 14 Jul 2018 13:04:07 +0000 (14:04 +0100)]
doc: Use GitLab MRs for patches, not the list

Though Wayland and the protocols still use mail-based patch review,
Weston can now move to GitLab MRs with review through that system.

Add some documentation on how to submit patches through GitLab,
specifically targeted at people who may be familiar with GitLab review,
but not familiar with our rebasing microcommit workflow.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agoREADME: Move to Markdown, rewrite introduction
Daniel Stone [Sat, 14 Jul 2018 12:33:30 +0000 (13:33 +0100)]
README: Move to Markdown, rewrite introduction

Move the README file to Markdown, and update it to attempt to explain
the current status and use of Weston.

The first sections are user-facing, so they can quickly understand what
Weston is, what it does, what it doesn't do, and how to go about using
it. The following sections on libweston and for distribution packagers
are left intact, but should probably be moved to separate documents.

This includes a screenshot of Weston running weston-terminal, Chrome and
simple-egl, which was taken by myself and subject to the same licensing
terms as the rest of the tree.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agodoc: Update CONTRIBUTING for Weston
Daniel Stone [Sat, 14 Jul 2018 12:09:58 +0000 (13:09 +0100)]
doc: Update CONTRIBUTING for Weston

Change some Wayland-specific references to instead refer to Weston.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agoAdd CONTRIBUTING.md document
Pekka Paalanen [Sat, 14 Jul 2018 10:55:24 +0000 (11:55 +0100)]
Add CONTRIBUTING.md document

Taken from Pekka's wayland/wayland@630c25f4c160 and follow-ups, use
Wayland's CONTRIBUTING document as a basis for Weston.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
6 years agoconfigure.ac: bump to version 4.0.92 for the beta release
Derek Foreman [Fri, 27 Jul 2018 16:45:59 +0000 (11:45 -0500)]
configure.ac: bump to version 4.0.92 for the beta release

6 years agocompositor-drm: Remove addfb warning for user buffers
Daniel Stone [Thu, 12 Jul 2018 11:16:47 +0000 (12:16 +0100)]
compositor-drm: Remove addfb warning for user buffers

THe KMS AddFB call can fail for any reason at all: format/modifier not
suitable, stride not aligned, allocation not contiguous, etc. If this
happens with Weston's own buffers, the result is bad - no composition
output.

Failing AddFB from user-supplied buffers though, is not an error. The
user can't necessarily allocate suitable buffers, nor does it have to.
Don't spam the log with warnings when we fail on user buffers.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derek.foreman.samsung@gmail.com>
6 years agocompositor-drm: Don't test render-only atomic configuration
Daniel Stone [Fri, 20 Jul 2018 18:55:37 +0000 (19:55 +0100)]
compositor-drm: Don't test render-only atomic configuration

In the RENDERER_ONLY state proposal mode, we don't actually have a
viable configuration to test, because we won't get a renderer buffer
until after assign_planes - where we're called from - has completed.

This can result in us trying to test a configuration with the CRTC and
connectors active, but no planes active, which the kernel can
legitimately fail.

If we're working in renderer-only mode, just return the state we have
without trying to test it first, and let the kernel fill it in later.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Derek Foreman <derek.foreman.samsung@gmail.com>