compositor-x11: Always free output_mode on error.
compositor: log program launches

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
compositor: format check for weston_log arguments

Add gcc format check attribute to the weston_log() and
weston_log_continue() functions.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
compositor-drm: fix weston_log format errors

compositor-drm.c: In function 'drm_output_set_cursor':
compositor-drm.c:754:4: warning: too few arguments for format
compositor-drm.c:759:4: warning: too few arguments for format

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
compositor: fix weston_log format warnings

compositor.c: In function ‘log_extensions’:
compositor.c:3085:7: warning: field precision should have type ‘int’,
but argument 2 has type ‘long int’
compositor.c:3087:4: warning: field precision should have type ‘int’,
but argument 2 has type ‘long int’

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
evdev: do not pass a list to evdev_led_update()

evdev_led_update() does not really need the whole list of device at
once, it can be called one device at a time.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
evdev: rename evdev_input_device to evdev_device

As said by krh: "Maybe we should also just call it an evdev_device
instead, shorter [and] not really ambiguous."

[krh: if my typo filled irc is going in a commit message, I'm at least going
to insert the missing words.]

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
shell: don't abuse link_layer for keeping track of input panel surfaces

Input panel surfaces were kept in a list by using layer_link of
weston_surface. This was pretty hacky and resulted in the bug that
an input panel surface was not removed from the list if it was unmapped
at the time of destruction.

This patch wraps the surface in a new input_panel_surface struct and
properly handles destruction with a signal listener.
image: Don't segfault when the file doesn't exist

Don't create a window when the file doesn't exist.

https://bugs.freedesktop.org/show_bug.cgi?id=52450
compositor-drm: handle vblanks on secondary crtc

Signed-off-by: Rob Clark <rob@ti.com>
spring: Avoid excessive calculation loops for the spring values

To handle the case where wall clock time jumps forwards by a large amount or
backwards limit the execution of the spring calculation loop.

We do this by forcing the spring update timestamp to being no older that 1s of
the most current time we've been given. We also present a log message if the
timestamp jumps more than expected.
compositor: When redrawing, don't clip opaque regions from other planes

When accumulating damage in the repaint loop, the opaque region of
surfaces in other planes is added to the overall opaque region. This
causes surface->clip to contain the areas obscured by surfaces in
other planes. Change it to contain only the opaque region of surfaces
in the primary plane

This fixes a bug where moving a window that was just moved from the
primary plane to another would leave artifacts on the screen. The
problem was that the damage generated by weston_surface_move_to_plane()
would be clipped on weston_surface_redraw(), leaving the contets below
it unchanged. Moving the overlaid surface would no longer generate
damage on the primary plane, so the contents would remain unchanged
(i.e. wrong) indefinitely.
shell: Fix repaint debugging

Since weston_surface_update_transform() was changed so it called
surface_damage_below() instead of surface_damage(), the trick of
clearing the surface damage did not work anymore.

Fix this by moving the repaint surface to a special plane before
calling update_transform. The move is made manually (as opposed to
calling weston_surface_move_to_plane()) to avoid the call to
weston_surface_damage_below(). The transform update causes the
damage to be added to this special plane, which is simply ignored.
After the geometry.dirty bit is clear, the surface is moved back to
the primary plane.
compositor-drm: Check for OUTPUT_CONFIG_OFF instead of using strcmp()

A call to strcmp() is already made in output_section_done() and
output->config is set appropriately if mode is "off". There is
no need to duplicate that in create_output_for_connector().
compositor-drm: Return the newly added mode in drm_output_add_mode()

Most of the times the caller will look at the output's mode list to get
the new mode, so just return that instead.
compositor-drm: skip overlay for shm buffers

They can't be imported by gbm, so no point in trying, and segfaulting
in gbm when we try to import (because it tries to deref the buffer as
a wl_drm_buffer).

Signed-off-by: Rob Clark <rob@ti.com>
compositor-drm: don't attempt sprite for out of bounds dimensions

The drmModeAddFB2() call will fail anyways, and cause us to unnecessarily
set sprites_are_broken.

Signed-off-by: Rob Clark <rob@ti.com>
compositor-drm: don't keep trying if hw doesn't support cursors

Not all hw supports hw cursors.  Similar to the case with sprites, if
the driver does not support it, don't keep trying and spamming the log
with error messages.

Signed-off-by: Rob Clark <rob@ti.com>
shell: move input panels into a designated layer

This makes the separation between panels and input panels clearer and
prevents the (desktop) panel from removing existing input panels on
redraw.

The input panel layer is below the panel layer.
compositor-drm: Fix bad rebase

I failed to compile test my rebase of Robs compositor-drm fixes.