platform/upstream/kmscon.git
10 years agokmscon: remove cdev sessions
David Herrmann [Wed, 23 Oct 2013 13:22:28 +0000 (15:22 +0200)]
kmscon: remove cdev sessions

cdev sessions are outdated. Use libuvt instead. Remove all references to
cdev-sessions and clean up the build chain.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agouvtd: remove
David Herrmann [Wed, 23 Oct 2013 13:15:50 +0000 (15:15 +0200)]
uvtd: remove

Remove uvtd. The idea is outdated and not really needed. With recent
systemd-logind changes, all we need is a shim between legacy-programs
(like XServer) and logind. We can easily do that via libuvt without
requiring a huge daemon like uvtd.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agowlterm: remove
David Herrmann [Wed, 23 Oct 2013 13:11:21 +0000 (15:11 +0200)]
wlterm: remove

Remove all wlterm sources. I never intended to maintain it longer than any
major terminal-emulator needs to get ported over to wayland. Hence, remove
it. It was buggy, anyway.

If anyone is interested, a GTK+ based wlterm is available on:
  http://cgit.freedesktop.org/~dvdhrm/wlterm

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agodummy: redraw on display-refresh
David Herrmann [Wed, 23 Oct 2013 11:45:18 +0000 (13:45 +0200)]
dummy: redraw on display-refresh

If we get a display-refresh event, redraw the screen. Otherwise, we might
stay blank during VT switches if we get a delayed set-master.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agoterminal: redraw on display-refresh
David Herrmann [Wed, 23 Oct 2013 11:44:48 +0000 (13:44 +0200)]
terminal: redraw on display-refresh

If we get a display-refresh event from the session layer, we must redraw
the screen to avoid staying blank.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agoseat: forward UTERM_REFRESH events to sessions
David Herrmann [Fri, 18 Oct 2013 16:33:03 +0000 (18:33 +0200)]
seat: forward UTERM_REFRESH events to sessions

On UTERM_REFRESH events we now forward the event to all sessions on the
bound seat. Sessions can then react to it and repaint the screen.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agouterm: drm: retry DRM wakeup after short timeout
David Herrmann [Fri, 18 Oct 2013 16:27:43 +0000 (18:27 +0200)]
uterm: drm: retry DRM wakeup after short timeout

If drm-wakeup fails, we now retry after 20ms continously to gain
DRM-Master again. If we succeed we send UTERM_REFRESH events for all
available displays so existing code can pick it up.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agogenunifont: fix MAX_DATA_SIZE to be in 8bit range
David Herrmann [Fri, 18 Oct 2013 15:59:34 +0000 (17:59 +0200)]
genunifont: fix MAX_DATA_SIZE to be in 8bit range

We only use uint8_t as length-counter so MAX_DATA_SIZE must be <256 to
make our length-checks work. This fixes a bug where we read invalid data
if someone uses modified genunifont data files. As this just produces
garbled glyphs if garbled data is given, this is actually not critical at
all.

Reported-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agogenunifont: fix ftell() error checking
David Herrmann [Fri, 18 Oct 2013 15:55:56 +0000 (17:55 +0200)]
genunifont: fix ftell() error checking

We need to use signed types to actually see errors from ftell(). Fix it by
using "long" for status bits now.

Reported-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agouterm: drm: move display_ops into vdrm object
David Herrmann [Fri, 18 Oct 2013 15:17:26 +0000 (17:17 +0200)]
uterm: drm: move display_ops into vdrm object

Instead of passing display-ops to every helper store it in vdrm-objects.
During vdrm-setup we set the pointer and reuse it in all helpers. This
simplifies the function headers and allows calling them from
helper-callbacks without requiring a pointer from the respective user.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agobuild: allow kmscon to be cross-compiled
Thierry Reding [Mon, 9 Sep 2013 10:27:48 +0000 (12:27 +0200)]
build: allow kmscon to be cross-compiled

The genshader and genunifont utilities are run during the build process
to generate source files. In order for that to work when cross-compiling
the files need to be built using the native compiler instead of the
cross-compiler.

Add the AX_PROG_CC_FOR_BUILD m4 macro which defines various *_FOR_BUILD
variables that are the native equivalents of CC, CFLAGS, LDFLAGS, etc.
Override CC, CFLAGS and LDFLAGS for genshader and genunifont and their
object files so that they will be built natively and can be executed
during the build.

Signed-off-by: Thierry Reding <treding@nvidia.com>
(added TODO marker)
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agowlt: toolkit: flush display after wl_display_dispatch_pending()
Ran Benita [Wed, 11 Sep 2013 16:05:32 +0000 (19:05 +0300)]
wlt: toolkit: flush display after wl_display_dispatch_pending()

wlterm doesn't work with current Wayland/Weston; the events are never
sent and the window doesn't come up. We need to flush the display, as
per wl_display_dispatch_pending(3):

    To proper integrate the wayland display fd into a main loop, the
    client should always call wl_display_dispatch_pending() and then
    wl_display_flush() prior to going back to sleep.

Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agokmscon: set default precision for fragment shaders
David Herrmann [Wed, 4 Sep 2013 13:02:03 +0000 (15:02 +0200)]
kmscon: set default precision for fragment shaders

With mesa-9.2 fragment shaders are required to define default precisions
as defined in the standard. We didn't do this.. whoops. Add the mediump
declarations and everything should be working again.

fixes fdo bug: #68934

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agogltex: fix GL_UNPACK_ROW_LENGTH(_EXT) update
David Herrmann [Mon, 19 Aug 2013 21:29:53 +0000 (23:29 +0200)]
gltex: fix GL_UNPACK_ROW_LENGTH(_EXT) update

Khronos updated their GLES2 headers and broke backwards compatibility,
hurray. Fix it for real now.

Reported-by: Yichao Yu <yyc1992@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agouterm: drm3d: fix GL_UNPACK_ROW_LENGTH(_EXT) macro
David Herrmann [Mon, 19 Aug 2013 21:15:43 +0000 (23:15 +0200)]
uterm: drm3d: fix GL_UNPACK_ROW_LENGTH(_EXT) macro

Khronos "fixed" their new OpenGLES2 headers and added a bunch of _EXT
suffixes. Now we need to test for both, the old and new macros, yay!

Thanks to Yichao Yu for spotting that.

Reported-by: Yichao Yu <yyc1992@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agodocs: use WantedBy in kmsconvt@.service
David Herrmann [Mon, 15 Jul 2013 15:28:41 +0000 (17:28 +0200)]
docs: use WantedBy in kmsconvt@.service

We currently use the old systemd syntax that was copied from
getty@.service. It doesn't allow enabling specific TTYs, though. So use
the new WantedBy syntax instead.

Thanks to "trusktr" for investigating and reporting upstream to systemd
developers.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agokmscon: pass vtnr to pty so XDG_VTNR is set
David Herrmann [Wed, 12 Jun 2013 13:53:03 +0000 (15:53 +0200)]
kmscon: pass vtnr to pty so XDG_VTNR is set

We need to correctly set the VTNR for each new pty, otherwise the pty
cannot set the XDG_VTNR correctly. Note that we do this only for real VTs,
that is, vtnr > 0.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agopty: set XDG_VTNR if requested by caller
David Herrmann [Wed, 12 Jun 2013 13:50:03 +0000 (15:50 +0200)]
pty: set XDG_VTNR if requested by caller

A caller can now pass a VT-num to the PTY which will get set as XDG_VTNR
in the environment of new childs.

This can be used to tell systemd-logind to associate the session with
the correct VT. But note that this still cannot overwrite VT-associations
if the pty is created from within an existing session.

Reported-by: Thomas Hebb
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agouterm: vt: add uterm_vt_get_num() helper
David Herrmann [Wed, 12 Jun 2013 13:43:17 +0000 (15:43 +0200)]
uterm: vt: add uterm_vt_get_num() helper

This helper returns the VT-number for the given VT if, and only if, it
is a real VT. In all other cases 0 is returned.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
10 years agowlt: toolkit: dont depend on implicit buffer releases
David Herrmann [Tue, 11 Jun 2013 16:57:38 +0000 (18:57 +0200)]
wlt: toolkit: dont depend on implicit buffer releases

Wayland compositors are not required to send buffer release notifications
on an implicit buffer-attach. That is, an attach->commit->commit series
does not cause a buffer-release notification after the second commit.

Hence, send a buffer-attach on every commit that requires a new
buffer-release notification.

For the related wayland-protocol changes, see:
  http://cgit.freedesktop.org/wayland/wayland/commit/?id=7165bf21917ed1c4f5ec823a1e1642a9e83aa984

This fixes a bug where wlterm only redraws the window-content when
resizing (due to explicit buffer-attach calls during redraw).

Reported by: MoD
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agodocs: man: document configuration files in kmscon(1)
Lars Kellogg-Stedman [Wed, 27 Feb 2013 18:04:16 +0000 (13:04 -0500)]
docs: man: document configuration files in kmscon(1)

This moves the description of kmscon.conf to a separate "Configuration"
section and adds some example kmscon.conf configuration lines.

This addresses #71 (at least, with this change in place I probably would
not have been momentarily confused by the exact syntax used in
kmsconf.conf).

(removed trailing whitespaces)
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agokmscon: add --xkb-keymap option for predefined keymaps
Ran Benita [Tue, 12 Mar 2013 16:31:47 +0000 (17:31 +0100)]
kmscon: add --xkb-keymap option for predefined keymaps

This adds an --xkb-keymap <FILE> option to kmscon. When given, kmscon
will try to compile the keymap from the file before trying the other
options (like the XkbKeymap option in xorg.conf).

This is useful for users who have a customized XKB keymap, which is
usually kept in a single file. Example, in X:
xkbcomp $DISPLAY my_keymap.xkb
Customize my_keymap.xkb to your liking, and then in .xinitrc, or
xorg.conf:
xkbcomp my_keymap.xkb $DISPLAY
Now you can also do this in kmscon.conf.

Additionally, lacking such an option, kmscon is quite difficult to use
without an installed xkeyboard-config package, which provides the
infrastructure for the "rules" configuration mechanism. We might even
want to distribute some plain xkb file as a last ditch, for
robustness, if even the default RMLVO fails... without a keyboard a
terminal is not very useful.

(changed Ran's patch to use *_from_string() instead of *_from_file())
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoshl: add shl_read_file() helper
David Herrmann [Tue, 12 Mar 2013 16:16:49 +0000 (17:16 +0100)]
shl: add shl_read_file() helper

This reads in a complete file as a string and returns it to the caller.
The string is 0 terminated (which isn't guaranteed by mmap()) so this
helper is needed if we have to work with APIs that don't accept buffer
lengths.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agokmscon: implement dynamic font-resizing via shortcuts
David Herrmann [Sat, 9 Mar 2013 12:51:05 +0000 (13:51 +0100)]
kmscon: implement dynamic font-resizing via shortcuts

This implements two new keyboard shortcuts zoom-in and zoom-out that
increase/decrease font size of the current terminal.

This is similar to how wlterm does it and allows runtime modification of
fonts.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoterminal: clear unused margins on each frame
David Herrmann [Sat, 9 Mar 2013 12:47:00 +0000 (13:47 +0100)]
terminal: clear unused margins on each frame

If the terminal screen is smaller than the real screen, we never paint to
the margins. This doesn't hurt as long as we never resize the terminal.
The uterm layer clears all framebuffers during allocation.

However, uterm behavior may change and our terminal may get resized (eg.,
during hotplugging) so we really should clear all the margins.

We now clear them on every frame as it is a trivial task. However, if we
speed up rendering, we should probably set a "needs_clear" flag that
simply clears the framebuffer.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoterminal: share font settings across screens
David Herrmann [Sat, 9 Mar 2013 12:19:05 +0000 (13:19 +0100)]
terminal: share font settings across screens

We currently retrieve one font object per screen (which is in fact shared
in the font-layer), but we can also move it one layer up to the terminal
layer. This shares the same font per terminal between all screens.

This simplifies on-the-fly font modifications and speeds up monitor
hotplugging.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agofont: pango: fix vertical alignment of non-ASCII glyphs
Chang Liu [Sat, 9 Mar 2013 11:26:48 +0000 (12:26 +0100)]
font: pango: fix vertical alignment of non-ASCII glyphs

pango_ft2_render_layout_line() requires the baseline offset as argument,
not the vertical extent of the glyphs. This is important as we currently
align glyphs to the bottom edge instead of the baseline.

Fix this by passing the cached baseline offset so all glyphs are correctly
aligned to the baseline. We then clip according to the cell-extents as
usual.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agowlt: theme: change frame color to white plus black border
David Herrmann [Sat, 9 Mar 2013 10:28:32 +0000 (11:28 +0100)]
wlt: theme: change frame color to white plus black border

It is currently pretty annoying to use multiple wlterm windows stacked on
top on each other when the terminal-background is black. The border
doesn't use multiple colors so it is hard to distinguish from the
main-frame.
This patch changes the border color to white (as most terminal-backgrounds
are black by default) and additionally draws a black 1px frame around it.
This guarantees that the frame is even visible with white terminal
backgrounds.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agobuild: fix binary-link with ld.gold linker
David Herrmann [Fri, 8 Mar 2013 16:04:05 +0000 (17:04 +0100)]
build: fix binary-link with ld.gold linker

The ld.gold linker doesn't provide --format=default but needs --format=elf
instead. However, this doesn't work with ld.bfd. To avoid any linker
detection, we now link any binary file via partial-linking into a proper
object file itself and then link this object file in the final linking
step.
This also produces a fake libtool *.lo file so the libtool linking command
doesn't complain about PIC/non-PIC problems.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvtd: vt: return -ENODEV if session died
David Herrmann [Wed, 6 Mar 2013 18:21:57 +0000 (19:21 +0100)]
uvtd: vt: return -ENODEV if session died

We now keep a link to our parent seat and set it to NULL when our session
is unregistered. In this case, any further request that depends on the
session being registered and probably a valid seat pointer, we will stop
with ENODEV.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvtd: vt: implement VT_GETMODE/SETMODE ioctl state-tracking
David Herrmann [Wed, 6 Mar 2013 18:03:34 +0000 (19:03 +0100)]
uvtd: vt: implement VT_GETMODE/SETMODE ioctl state-tracking

These ioctls are used to retrieve and set the VT-mode. That is, the
signals and PID information that correspond to the VT controlling process.
It is notified whenever the VT gets active/inactive so it can react to it
or prevent/acknowledge it.

This doesn't implement the signal-sending logic, yet. It only implements
state-tracking.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvtd: seat: implement session IDs
David Herrmann [Wed, 6 Mar 2013 17:21:25 +0000 (18:21 +0100)]
uvtd: seat: implement session IDs

Session IDs provide a unique ID for each registered session. They are used
to sort the sessions so next/prev return the correct neighbour-sessions.
Furthermore, they can be used by outside users to refer to a session
directly without knowing the session implementation.
Sessions with ID=0 are always linked at the end and considered to be
"unnamed".

The algorithm to switch to a session with a given ID is:
  Try to find the first session with the exact same ID. If there is none,
  return the session with the next higher ID. If there is none, return the
  ID'th session in the list. If there is none, return the last session.

This provides a fairly predictable way of switching between session. It is
modeled after the classic VT F1-F12 keys that switch between sessions. If
a session is not given, these keys will switch to the next higher session
instead.
All "unnamed" sessions are put at the end. So if you have only F1-F4, then
F5-F12 will map to unnamed sessions.

Please note that new sessions are always linked at the end of their group.
So new unnamed sessions are at the far end, new named sessions are linked
in the sorted list but behind all sessions with the same ID.
Hence, the caller should avoid multiple sessions with the same ID,
otherwise, some sessions might not be reachable even though they're named
(unless you use next/prev of course).

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvtd: vt: implement ioctl dummies
David Herrmann [Wed, 6 Mar 2013 16:33:39 +0000 (17:33 +0100)]
uvtd: vt: implement ioctl dummies

Add dummies for the ioctl VT callbacks. Also implement the KD-MODE and
KB-MODE state tracking as it is fairly trivial.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agowlt: theme: prevent move/resize requests when maximized/fullscreen
David Herrmann [Wed, 6 Mar 2013 15:30:31 +0000 (16:30 +0100)]
wlt: theme: prevent move/resize requests when maximized/fullscreen

We should let the user move or resize the window while it is fullscreen or
maximized. This depends on the compositor to stop pending move/resize
requests when maximizing or setting a window fullscreen.

We can implement some "snap away from edges" behavior that allows to move
or resize while maximized. This will "unmaximize" the window if you move
it more than a given threshold. However, that's not needed now so lets do
that later when the wl_shell system is fully figured out.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agowlt: toolkit: add is_maximized/fullscreen helpers
David Herrmann [Wed, 6 Mar 2013 15:29:14 +0000 (16:29 +0100)]
wlt: toolkit: add is_maximized/fullscreen helpers

These helpers return whether a window is maximized/fullscreen. This can be
used by the theme/terminal control layer to change behavior depending on
these flags.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agotsm: vte: fix g0-g3 character-set shifting
David Herrmann [Wed, 6 Mar 2013 10:12:47 +0000 (11:12 +0100)]
tsm: vte: fix g0-g3 character-set shifting

A terminal's GL and GR sets can be mapped to 4 different registers g0 to
g3. The g0-g3 registers can be freely set by the application to predefined
or uploaded character-sets.

We implemented GL and GR as separate registers that are set to the current
g0-g3 states when the applications requests a remapping. So subsequent
changes to g0-g3 don't affect GL and GR. Unfortunately, it turns out this
is wrong. GL and GR should point to the g0-g3 registers instead of copying
them.

This commit fixes the GL and GR pointers to point to g0-g3 instead of
pointing to the underlying character sets. This fixes line-drawing
applications like alsamixer, make-menuconfig and other ncurses based
software.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: client: implement major ioctl callbacks
David Herrmann [Tue, 5 Mar 2013 18:13:31 +0000 (19:13 +0100)]
uvt: client: implement major ioctl callbacks

Add callbacks for all major ioctls. We currently only implement ioctls
that are used by xserver on linux machines. Feel free to implement the new
ioctls.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvtd: ctx: link control/legacy nodes with VTs
David Herrmann [Tue, 5 Mar 2013 17:05:09 +0000 (18:05 +0100)]
uvtd: ctx: link control/legacy nodes with VTs

We now create a VT for each legacy node and assign all clients to it. For
control nodes, we create a different VT for each open-file/client.

Note that we do not recreate VTs or CDEVs directly on HUP instead of
during the next open() or reconfiguration. This avoids trapping into the
same error again and gives control to the user to recreate the nodes at
the right time.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvtd: add VT subsystem
David Herrmann [Tue, 5 Mar 2013 17:03:18 +0000 (18:03 +0100)]
uvtd: add VT subsystem

The VT subsystem manages the virtual VTs and registers them with the
seat/session-scheduler. They manage control and legacy nodes as they are
mostly the same.

The different contexts create these VTs and assign them to cdev clients.
This allows us to split the VT and cdev logic apart so they can be
assigned freely to different clients.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: client: export symbols
David Herrmann [Tue, 5 Mar 2013 17:02:18 +0000 (18:02 +0100)]
uvt: client: export symbols

This adds the uvt_client symbols to the public symbol list and exports
them so we can use them in uvtd.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: client: fix double-kill by first unlinkink then resetting
David Herrmann [Tue, 5 Mar 2013 17:00:50 +0000 (18:00 +0100)]
uvt: client: fix double-kill by first unlinkink then resetting

We _must_ unlink the client and cdev first, then reset the VT. Otherwise,
the set_vt() call might think we are still alive and call user-defined
callbacks which might call kill again.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: include inttypes.h
David Herrmann [Tue, 5 Mar 2013 17:00:09 +0000 (18:00 +0100)]
uvt: include inttypes.h

We use uint8_t so make sure we include inttypes.h in uvt.h.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvtd: add ctx subsystem
David Herrmann [Tue, 5 Mar 2013 00:31:45 +0000 (01:31 +0100)]
uvtd: add ctx subsystem

The ctx subsystem manages the CDEV devices for each seat. It currently
allocates one manager device and a given number of legacy devices that can
be accessed via subdirectories.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: ctx: add major/minor helpers
David Herrmann [Tue, 5 Mar 2013 00:29:10 +0000 (01:29 +0100)]
uvt: ctx: add major/minor helpers

Two new functions to retrieve the current major number and dynamically
allocate minor numbers.
This can be used by clients that allocate more than one CDEV for VTs to
dynamically retrieve a new minor number.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agobuild: add shl_flagset to build-system
David Herrmann [Tue, 5 Mar 2013 00:28:36 +0000 (01:28 +0100)]
build: add shl_flagset to build-system

We need the shl_flagset as part of SHL to make use of it.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: add SHL_EXPORT to cdev+ctx subsystems
David Herrmann [Tue, 5 Mar 2013 00:27:32 +0000 (01:27 +0100)]
uvt: add SHL_EXPORT to cdev+ctx subsystems

We need to export the symbols to make use of them. This exports all useful
ctx+cdev functions for outside use. The other subsystems still need to get
reviewed before we export them.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: cdev: fix sending DEVNAME parameter
David Herrmann [Tue, 5 Mar 2013 00:25:01 +0000 (01:25 +0100)]
uvt: cdev: fix sending DEVNAME parameter

We used an incorrectly formatted arguments as we mixed up two local
variables. Use the correct DEVNAME format now.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: cdev: print minor/major debug messages
David Herrmann [Tue, 5 Mar 2013 00:24:17 +0000 (01:24 +0100)]
uvt: cdev: print minor/major debug messages

These numbers are pretty useful during debugging so print them before
attempting to create the cdev devices.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoshl: add flagset helper
David Herrmann [Tue, 5 Mar 2013 00:22:55 +0000 (01:22 +0100)]
shl: add flagset helper

A flagset is a dynamic array where each bit of the array can be
independently set/reset. It can be used for minor/major allocations or
for other dynamically growing bitsets.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoshl: dlist: add _first/_last helpers
David Herrmann [Tue, 5 Mar 2013 00:22:13 +0000 (01:22 +0100)]
shl: dlist: add _first/_last helpers

These helpers return the first and last elements respectively.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoshl: array: add shl_array_zresize()
David Herrmann [Tue, 5 Mar 2013 00:21:29 +0000 (01:21 +0100)]
shl: array: add shl_array_zresize()

This helper resizes the array to a given length and zeroes out all new
elements.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoREADME: fix tarball-link to /software/kmscon
David Herrmann [Mon, 4 Mar 2013 17:42:34 +0000 (18:42 +0100)]
README: fix tarball-link to /software/kmscon

We now have official upload space on freedesktop.org. No need to link to
my personal upload space, anymore.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agobuild: add .xz files to gitignore instead of bz2
David Herrmann [Mon, 4 Mar 2013 15:07:52 +0000 (16:07 +0100)]
build: add .xz files to gitignore instead of bz2

We use .xz now instead of .bz2 for release tarballs.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agodocs: fix links to point to freedesktop.org
David Herrmann [Mon, 4 Mar 2013 15:05:34 +0000 (16:05 +0100)]
docs: fix links to point to freedesktop.org

kmscon is now hosted on freedesktop.org. Please don't use the github
links, anymore. I will push to github for some more weeks, but I recommend
to everyone to use my freedesktop.org repository as primary upstream link.

There were many reasons why github.com wasn't sufficient, anymore. But the
main reason is that they no longer provide upload space for release
tarballs. Hence, lets ditch github and move to freedesktop.org which
kindly provides everything we need plus a really nice mailing-list.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agobuild: use xz tarballs instead of bz2
David Herrmann [Mon, 4 Mar 2013 15:04:15 +0000 (16:04 +0100)]
build: use xz tarballs instead of bz2

xz is way better than bz2 with same/better decompression times.
Compression will take longer, but that's totally ok.

All new tarballs will be provided as xz only. Please adjust your
build-scripts to stop using bz2.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agobuild: add --enable-all
David Herrmann [Mon, 4 Mar 2013 14:32:01 +0000 (15:32 +0100)]
build: add --enable-all

This flag enables all other options that extend the build. It is used for
debugging only and should never be used by distributions to control what
is built. Hence, we don't document it and never advertise it.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agotests: use new shl_log.h
David Herrmann [Mon, 4 Mar 2013 14:29:48 +0000 (15:29 +0100)]
tests: use new shl_log.h

log.h was moved to shl so use it in all tests.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvtd: add new Virtual Terminal daemon
David Herrmann [Mon, 4 Mar 2013 14:11:30 +0000 (15:11 +0100)]
uvtd: add new Virtual Terminal daemon

This introduces uvtd which replaces kmscon sessions as an external helper
program. It's still a dummy program but it will get extended soon. After
that, kmscon sessions will get removed and limited to a single seat. This
will simplify kmscon itself heavily and move rarely used features out of
kmscon into helpers.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoshl: move githead into a source file
David Herrmann [Mon, 4 Mar 2013 14:05:17 +0000 (15:05 +0100)]
shl: move githead into a source file

This moves githead.h to shl_githead.c so we can skip recompilations on
GIT-HEAD changes. We only need to relink now (which we cannot skip).

This speeds up build-processes considerably on slower machines.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoshl: move log.[ch] to shl_log.[ch]
David Herrmann [Mon, 4 Mar 2013 13:40:36 +0000 (14:40 +0100)]
shl: move log.[ch] to shl_log.[ch]

We want to avoid any static files that are shared between multiple
programs but are not part of SHL. These make the build-process just more
complex.
Move log.[ch] to SHL so we have a known context.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agolog: move includes to top
David Herrmann [Mon, 4 Mar 2013 13:27:27 +0000 (14:27 +0100)]
log: move includes to top

There is no reason to include headers in the main body of the source code.
Move it to the top so it's more readable.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agobuild: mark font-unifont as noexecstack
David Herrmann [Mon, 4 Mar 2013 11:15:27 +0000 (12:15 +0100)]
build: mark font-unifont as noexecstack

ld automatically assumes that any binary input file requires an executable
stack. There's no way to tell it that it doesn't so we simply mark all
inputs as noexecstack.

Reported-by: Etam
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoRelease kmscon-7 kmscon-7
David Herrmann [Thu, 28 Feb 2013 10:37:16 +0000 (11:37 +0100)]
Release kmscon-7

This is kmscon-7. See ./NEWS for a list of new features.

Unfortunately, github disabled the "Downloads" section so there is no way
to upload new pre-generated tarballs. I have a pending application to move
kmscon to freedesktop.org, but it didn't get processed in time for this
release. Therefore, you need to build the GNU-autotools files yourself.
That is, before calling ./configure you need to call:
  NOCONFIGURE=1 ./autogen.sh

You can extend your build-scripts with:
  test -f ./configure || NOCONFIGURE=1 ./autogen.sh

Which will call ./autogen.sh if needed. Everything else can be left
unchanged.

I will not upload the tarballs at another location. Feel free to do that
yourself, but I personally think this will introduce more confusion than
help. I hope the freedesktop.org move will be soon approved. This will
also provide a mailing-list where I can properly announce new releases.

Raw tarballs will be available as (without pre-generated autotools):
  https://github.com/dvdhrm/kmscon/archive/kmscon-7.tar.gz
  https://github.com/dvdhrm/kmscon/archive/kmscon-7.zip

The git-tag is: kmscon-7
You can use my public GPG key to verify the tarballs.

As usual, please report bugs to: https://github.com/dvdhrm/kmscon

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agobuild: fix empty --with-*= arguments
David Herrmann [Wed, 27 Feb 2013 18:48:53 +0000 (19:48 +0100)]
build: fix empty --with-*= arguments

It currently isn't possible to pass empty lists to these arguments as it
will then be interpreted as default. Fix this by using "default" if it is
empty.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agobuild: enable static libraries by default
David Herrmann [Wed, 27 Feb 2013 18:47:33 +0000 (19:47 +0100)]
build: enable static libraries by default

No reason to disable static libraries. Remove the LT_INIT parameter so we
can provide statically linked libraries.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agouvt: new library implementing VTs in user-space
David Herrmann [Wed, 27 Feb 2013 18:44:55 +0000 (19:44 +0100)]
uvt: new library implementing VTs in user-space

UVT is based heavily on the old cdev-sessions. It uses CUSE/FUSE to
implement virtual terminals in user-space.

This move into a library allows to use it in other projects, too. There is
no reason to limit it to kmscon sessions. In fact, we will remove the
cdev-sessions, soon and make kmscon a stand-alone terminal emulator
without any session capability.
Instead, the uvtd program will provide the VT emulation.

This library is not finished, nor ready for use. However, feel free to
contribute patches so we can eventually release a stable API.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agoshl: misc: provide shl_next_pow2()
David Herrmann [Mon, 18 Feb 2013 18:17:49 +0000 (19:17 +0100)]
shl: misc: provide shl_next_pow2()

Move the next_pow2() helper to shl_misc.h so we can use it everywhere.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
11 years agotests: fix compilation with new eloop API
David Herrmann [Sat, 16 Feb 2013 20:41:02 +0000 (21:41 +0100)]
tests: fix compilation with new eloop API

We added llog-data pointers so fix the tests helpers to set it to NULL by
default.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agoREADME: update build-instructions
David Herrmann [Sat, 16 Feb 2013 20:34:46 +0000 (21:34 +0100)]
README: update build-instructions

The build-system changed slightly so update the build-instructions.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agoNEWS: add kmscon-7 notes
David Herrmann [Sat, 16 Feb 2013 20:22:21 +0000 (21:22 +0100)]
NEWS: add kmscon-7 notes

We changed a whole bunch of stuff since kmscon-6 but most of it still
isn't finished (mainly the modularization). However, we definitly need a
bugfix-release.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agobuild: check for fuse >= 2.9.0
David Herrmann [Sat, 16 Feb 2013 20:19:21 +0000 (21:19 +0100)]
build: check for fuse >= 2.9.0

We need "fuse_buf" so check for at least fuse 2.9.0.

Reported-by: https://github.com/dvdhrm/kmscon/issues/67
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agobuild: enable unifont by default
David Herrmann [Sat, 16 Feb 2013 20:05:55 +0000 (21:05 +0100)]
build: enable unifont by default

Unifont is a very nice font-backend that now has sane compilation times
(by using ld directly). It's recommended over 8x16 as it has proper
internationalization support.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agodocs: remove pixman comments
David Herrmann [Mon, 11 Feb 2013 15:26:28 +0000 (16:26 +0100)]
docs: remove pixman comments

We now provide an experimental pixman backend. It still suffers from the
same problems but that cannot be fixed easily. Check it out if you want
it. Disabled by default, though.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agoFix several typos
Jakub Wilk [Mon, 11 Feb 2013 15:24:21 +0000 (16:24 +0100)]
Fix several typos

Provided via github. Fixes typos in documentation and comments.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agollog: add "data" parameter to pass context
David Herrmann [Fri, 8 Feb 2013 15:14:48 +0000 (16:14 +0100)]
llog: add "data" parameter to pass context

If we allow users to specify log functions, we should also allow them to
pass a context. This isn't used internally, but may be needed by external
users so provide it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agobuild: add --enable-wlterm to distcheck flags
David Herrmann [Wed, 6 Feb 2013 17:30:13 +0000 (18:30 +0100)]
build: add --enable-wlterm to distcheck flags

We should test wlterm when running distcheck so make in mandatory.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agofont: freetype2: include tsm_unicode.h
David Herrmann [Wed, 6 Feb 2013 14:19:21 +0000 (15:19 +0100)]
font: freetype2: include tsm_unicode.h

We use TSM symbols so include the right headers.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agofont: unifont: compress binary data and link via ld directly
David Herrmann [Wed, 6 Feb 2013 14:16:09 +0000 (15:16 +0100)]
font: unifont: compress binary data and link via ld directly

Instead of using the blown up UTERM_FORMAT_GREY binary data, we now use an
A1 1bit alpha channel and extract the data during runtime. This guarantees
that only used characters will be extracted into the full alpha channel.

We should add support for A1 formats in uterm to avoid this problem
entirely.

We also now link the binary file directly into the module via ld. This
avoids the long compile times for the huge C-array that we previously
generated. As a side effect, you no longer run out of memory linking this
file on small machines.

With this change we could even start making unifont a default font-backend
as it now works pretty well.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agobuild: major cleanup
David Herrmann [Tue, 5 Feb 2013 23:16:33 +0000 (00:16 +0100)]
build: major cleanup

Major overhaul of the build system. This introduces symbol-versioning for
all exported libraries. Please note that none of these libraries is
stable, yet!

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agoconf: remove unused CONF_DONE
David Herrmann [Tue, 5 Feb 2013 11:40:03 +0000 (12:40 +0100)]
conf: remove unused CONF_DONE

This flag was never used and is mostly useless, so remove it.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agoconf: fix include-protection name
David Herrmann [Tue, 5 Feb 2013 11:36:48 +0000 (12:36 +0100)]
conf: fix include-protection name

We use CONF, not CONFIG as prefix so fix the include-protection to use
this, too.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agoconf: perform aftercheck on ctx-copy
David Herrmann [Tue, 5 Feb 2013 10:45:33 +0000 (11:45 +0100)]
conf: perform aftercheck on ctx-copy

Afterchecks should be always performed when reading data into a config
context. So perform them after copy operations, too.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agowlt: toolkit: fix stuck key repeat bug
Martin Minarik [Sat, 26 Jan 2013 11:09:05 +0000 (12:09 +0100)]
wlt: toolkit: fix stuck key repeat bug

1. Depress Shift
2. Depress K
3. Release Shift
4. Release K

Observed: key stuck repeat
Expected: key not stuck repeating

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agowlt: link font library statically
David Herrmann [Thu, 24 Jan 2013 19:32:40 +0000 (20:32 +0100)]
wlt: link font library statically

We need the font layer to build wlterm. However, the font layer depends on
kmscon internal module handling so we cannot do this. To avoid this, we
simply provide dummy handlers for the kmscon_module_* layer and link it
anyway. This is kind of ugly but works, yey!

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agowlt: fix shl_hook API changes
David Herrmann [Thu, 24 Jan 2013 19:17:26 +0000 (20:17 +0100)]
wlt: fix shl_hook API changes

We changed the hook_add() API but forgot to fix WLT to use the new API.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agowlt: toolkit: fix resize window stuck in need_resize=true
Martin Minarik [Thu, 24 Jan 2013 15:48:03 +0000 (16:48 +0100)]
wlt: toolkit: fix resize window stuck in need_resize=true

The problem is that:
 wnd->w_frame contains a number
and
 wnd->need_frame=true
Therefore schedule_frame() doesn't schedule the callback.
But deleting these checks causes flicker. Further redesign
of the frame sheduling was necessary.

4. frame_callback()
3. do_frame()
3. idle_frame()
2. schedule_frame()
1. wlt_window_set_size()

Please, observe the need_resize variable.
-------------------------------------------------------------------------------
BAD (window stuck on resize):
$3 = {ref = 1, list = {next = 0x659c70, prev = 0x659c70},
  buffer_attached = true, skip_damage = false, need_resize = true,
  w_frame = 0x70d9b0, widget_list = {next = 0x686cb0, prev = 0x6b54d0}}

OK (window not stuck on resize):
$3 = {ref = 1, list = {next = 0x240cc70, prev = 0x240cc70},
  buffer_attached = true, skip_damage = false, need_resize = false,
  w_frame = 0x241bb10, widget_list = {next = 0x2439cb0, prev = 0x2468560}}

-----------------------------------------------------------------------------------

This is the basic idea:

-> time ->
frame callbacks()      *           *           *           *           *           *
wnd->idle_pending ------   ---------   ---------    --------   ---------------------
wnd->need_frame   ---      --- ---     ---          ---        ------ ---
schedule_frame()  *        *   *       *            *          *  *   **
idle_frame()        *        *   *       *            *          *  *   *

This design follows similiar design in weston/clients/window.c

Kmscon                     Weston
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wlt_window_do_redraw() ~~~ shm_surface_swap()
do_frame() ~~~~~~~~~~~~~~~ window_attach_surface()

wnd->idle_pending ~~~~~~~~ window->redraw_scheduled

frame_callback()  ~~~~~~~~ frame_callback()

do_frame()  ~~~~~~~~~~~~~~ idle_redraw()

wlt_window_set_size()
wlt_window_schedule_redraw()
schedule_frame()  ~~~~~~~~ window_schedule_redraw()

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agouterm: drm: rename to drm3d
David Herrmann [Thu, 24 Jan 2013 15:42:03 +0000 (16:42 +0100)]
uterm: drm: rename to drm3d

This renames the video-drm backend to drm3d (which was already used
internally). This is a pure rename, the code-logic stays the same.

This also puts the drm3d backend into a module so we can more easily
load it during runtime.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agouterm: rename drm-dumb backend into drm2d module
David Herrmann [Thu, 24 Jan 2013 13:42:54 +0000 (14:42 +0100)]
uterm: rename drm-dumb backend into drm2d module

This moves all the drm-dumb code into a new module that is now called
drm2d (which was already used internally before).

No conceptual changes, just renames and moves.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agotext: pixman: add support for non x4-stride glyphs
David Herrmann [Thu, 24 Jan 2013 13:11:22 +0000 (14:11 +0100)]
text: pixman: add support for non x4-stride glyphs

pixman expects stride values to be a multiple of 4. However, the glyphs we
get may be of a different stride so copy it if it is.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agotext: pixman: remove debug tests
David Herrmann [Thu, 24 Jan 2013 13:10:43 +0000 (14:10 +0100)]
text: pixman: remove debug tests

The "true ||" case made pixman always use shadow buffers. Remove this
debug statement so it works as expected.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agotext: pixman: special case rendering for known bg/fg colors
David Herrmann [Thu, 24 Jan 2013 13:09:17 +0000 (14:09 +0100)]
text: pixman: special case rendering for known bg/fg colors

We can preallocate a white solid-fill image so we don't have to do that
for each round where we blend white glyphs.

Also, if the background is black, we can omit the pixman_fill() operation
and use the direct composite with SRC operations.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agouterm: dumb: optimize division by 255 in rendering path
David Herrmann [Thu, 24 Jan 2013 13:04:58 +0000 (14:04 +0100)]
uterm: dumb: optimize division by 255 in rendering path

This was recommended by Soren Sandmann on the pixman ML. We can optimize a
real t /= 255 with:
  t += 0x80
  t = (t + (t >> 8)) >> 8;
Instead of using a single fake (t >> 8) shift as we used to.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agotext: cairo: fix debug message to print correct values
David Herrmann [Thu, 24 Jan 2013 13:04:04 +0000 (14:04 +0100)]
text: cairo: fix debug message to print correct values

We need to print the actual stride+buffer instead of the first set values.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agokmscon: add pixman renderer
David Herrmann [Thu, 24 Jan 2013 11:13:29 +0000 (12:13 +0100)]
kmscon: add pixman renderer

This is an experimental renderer based on pixman. It is only available for
testing-purposes and should not be used in production, yet. The bbulk
renderer is still the faster alternative and should be used instead.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agouterm: fbdev: fix wakeing up displays
David Herrmann [Thu, 24 Jan 2013 09:24:18 +0000 (10:24 +0100)]
uterm: fbdev: fix wakeing up displays

The dfb->disp pointer is not used so the current fbdev backend doesn't
wake up displays on video-wakeup. Fix this by traversing the new display
list (even though we currently have only one display at most).

Also remove th dfb->disp pointer as it is unused now.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agouterm: video: print debug messages on wakeup/sleep
David Herrmann [Wed, 23 Jan 2013 18:31:43 +0000 (19:31 +0100)]
uterm: video: print debug messages on wakeup/sleep

This helps debugging video sleep/wakeup issues.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agokmscon: add cairo-renderer module
David Herrmann [Tue, 15 Jan 2013 15:30:49 +0000 (16:30 +0100)]
kmscon: add cairo-renderer module

The cairo text renderer uses the cairo blitting functions to blit all
glyphs into the cairo-surface. This is only for testing-purposes. Cairo is
not really suited for blending/blitting of large surfaces. Hence, this
backend is horribly slow compared to bblit/bbulk.

This backend is disabled by default.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agouterm: fbdev: map FBs for read access
David Herrmann [Tue, 15 Jan 2013 10:09:32 +0000 (11:09 +0100)]
uterm: fbdev: map FBs for read access

We want to provide read-access to users of get_buffers() so map memory
with PROT_READ. However, read is almost always horribly slow so this
should only be used as fallback.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agouterm: video: return buffer information on display_use()
David Herrmann [Mon, 14 Jan 2013 19:57:15 +0000 (20:57 +0100)]
uterm: video: return buffer information on display_use()

uterm_display_use() now returns the current back-buffer index when called.
It returns <0 on error. Whether OpenGL is supported is returned via a new
parameter "opengl". Set it to NULL if you're not interested.

Note that a backend might support OpenGL _and_ memory-mapped buffer
access. But you shouldn't rely on uterm_display_use() to return the
correct buffer-index if uterm_display_get_buffers() is not supported. For
instance the DRM-3D backend always returns 0 as buffer index as it has no
way of detecting it, yet.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
11 years agouterm: video: return information for all buffers on get_buffers()
David Herrmann [Mon, 14 Jan 2013 19:53:32 +0000 (20:53 +0100)]
uterm: video: return information for all buffers on get_buffers()

This renames get_buffer() to get_buffers() and returns back _and_ front
buffer to the application. This allows the application to create
supplemantal data for the buffers and manage it themself.

This data _must_ stay the same as long an activation-period of a display
so users can rely on the buffer information.
Also all information for back and front buffer is the same except for the
data pointer (which is only the same for single-buffered FBs).

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>