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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
David Herrmann [Sun, 13 Jan 2013 18:30:35 +0000 (19:30 +0100)]
shl: hook: fix invalid memory access for non-oneshot entries
If an entry is not a oneshot entry, then it might get deleted during the
callback procedure and hence, we _must_ not access it afterwards.
Therefore, remember the oneshot setting so we access it only if it really
is a oneshot entry.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 15:58:31 +0000 (16:58 +0100)]
uterm: video: add uterm_display_get_buffer()
Until now we required external renderers to use the blit/blend helpers.
However, this seems hardly reasonable now so we provide a way to retrieve
the 2D buffer via the public API.
This is limited to xrgb32 and rgb16, other formats are not exported for
now (and probably not used, yet?). The 3D backends do not support that so
use the blit/blend helpers or OpenGL.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 15:11:07 +0000 (16:11 +0100)]
COPYING: add 'Swift Geek'
Without his many bug-reports kmscon wouldn't be what it is now. So add him
to the author-list.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 15:06:00 +0000 (16:06 +0100)]
uterm: video: add support for immediate buffer-swaps
Internally, we already support immediate buffer-swaps but this hasn't been
exported in the API. This patch adds an "immediate" argument that causes
the flip to be immediate and not synchronized with vertical-blanks.
Please note that this might block if there is a pending page-flip.
However, this is mostly a delay of 16ms so we can ignore it as this is
acceptable if you want immediate swaps while there is still a
pending-buffer.
You can listen for the UTERM_PAGE_FLIP event if you don't want this
behavior.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 14:58:40 +0000 (15:58 +0100)]
pty: reset signal-handlers for childs
If signal-handlers are set to SIG_IGN, then this behavior is preserved
across an execve(). We don't want that so reset the handlers for all
childs before executing them.
kmscon may be executed with pre-set signal handlers for good reasons. So
reset the handlers in setup_child() so we have a clean environment.
This fixes a bug where child-programs assume SIGPIPE is not ignored but do
not explicitly set it to SIG_DFL.
Reported-by: Swift Geek [github issue #62]
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 14:26:56 +0000 (15:26 +0100)]
uterm: drm: share mode-setting between dumb+drm
The modesetting code of both DRM backends is almost the same so share it.
This also works around several race-conditions in some DRM drivers. In
particular, we cannot call drmModeSetCrtc while a drmModePageFlip is still
pending. Therefore, we wait for page-flips to complete before performing
an immediate mode-set.
This requires us to handle page-flip events synchronously so we can wait
for kernel page-flip events but the user-space bottom-half is executed in
an idle-handler.
Note that the chance that we have to wait for a page-flip to complete is
pretty small. In fact, without hacking the code to do fast page-flips, I
couldn't get kmscon to run into this condition.
Last but not least, this patch also makes the dumb-backend support
immediate page-flips like the DRM backend did all the time.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 10:54:29 +0000 (11:54 +0100)]
eloop: add EV_ONESHOT and EV_SINGLE flags for idle sources
EV_ONESHOT will remove idle sources once they have been processed and
EV_SINGLE will only register the source if it hasn't been registered, yet.
For source removal EV_ONESHOT has no effect but EV_SINGLE causes all
events with this cb+data combination to be removed.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 10:42:04 +0000 (11:42 +0100)]
shl: hook: add 'oneshot' flag
If an entry is marked as 'oneshot' then it will get deleted after it has
been called once. Note that the entry is unlinked _before_ the callback is
called.
If you use 'oneshot'-entries and normal entries with the same cb+data
combination, then you will probably get unexpected behavior. It is not
recommended to do that. In detail, you cannot control which entry is
deleted via a shl_hook_rm() call so you can never be sure whether the
oneshot entry or a normal entry is deleted.
Do not mix oneshot entries with normal entries!
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 13 Jan 2013 10:23:05 +0000 (11:23 +0100)]
shl: hook: add helpers to add callbacks only once
Very often we want to avoid adding callbacks multiple times. Currently we
have to keep track of this in each module with a boolean value.
To simplify this procedure, we add helpers that guarantee that entries are
only added once and a helper to remove all entries with a given cb+data
combination.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 13:01:01 +0000 (14:01 +0100)]
uterm: drm: reread dpms state on wakeup
Other DRM users might change the DPMS state of a display while we are
asleep. Therefore, reread the state during wakeup and force DPMS to the
same value it had when we left. But do this only for displays that are
online, other displays are never touched by uterm-video.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 12:40:50 +0000 (13:40 +0100)]
uterm: remove uterm_video_use()
This function is a no-op and not used. Hence, remove it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 12:40:00 +0000 (13:40 +0100)]
tests: fix build with new uterm headers
These tests still use uterm.h which builds fine if you have an old uterm
version installed, however, with a new version this will fail horribly.
Hence, fix them to use the new headers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 12:31:17 +0000 (13:31 +0100)]
uterm: video: use shl_dlist for linked lists
uterm-video is actually older than shl_dlist and it used its own
single-linked lists until now. This had several drawbacks and produced
ugly code.
This commit converts all uterm-video elements to use shl_dlist and
introduces _bind and _unbind helpers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 07:21:40 +0000 (08:21 +0100)]
uterm: video: share set_dpms code
The set_dpms callback of dumb and drm backends is identical so share it in
drm-shared module.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 12 Jan 2013 00:01:54 +0000 (01:01 +0100)]
uterm: share drm-video wakeup helpers
The dumb and drm backends still use the same code to perform wakeup/sleep
code. Hence, move it into the drm-shared file so we can use the same
helpers for both.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 23:53:01 +0000 (00:53 +0100)]
uterm: drm: fix y-invert bug
This fixes the last OpenGL user that still uses the wrong y-axis
direction. See the gltex helpers for more information.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 23:51:23 +0000 (00:51 +0100)]
uterm: share drm-video objects
This moves the gbm/drm shared properties into the drm-shared helper.
Furthermore, it removes the last static property in uterm_video objects so
everything is correctly accessed via ->data pointers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 18:18:15 +0000 (19:18 +0100)]
uterm: drm: fix y-inversion bug
OpenGL uses an inverted y-axis by default. However, the old gbm-surface
layer didn't correctly map this. But with the conversion to gbm_surface
objects, we now have the correct OpenGL framebuffers so we have to invert
the y-axis.
This was already fixed for the gltex renderer earlier but we forgot to fix
the uterm-drm blitting backend.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 18:09:42 +0000 (19:09 +0100)]
uterm: share drm-display helpers
dumb and drm video backends share quite a lot of logic. Hence, move common
helpers into the drm-shared module and use it in both backends.
This also moves the uterm-display objects of both backends to use the data
member instead of static fields.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 16:45:48 +0000 (17:45 +0100)]
uterm: share drm dpms code
drm and dumb backends use the same DPMS code so share it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 16:28:29 +0000 (17:28 +0100)]
uterm: share drm_mode between dumb and drm backend
The dumb and drm backends use the same mode structure so share the code as
drm_shared module.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 16:27:22 +0000 (17:27 +0100)]
uterm: fbdev: set mode dimensions after activation
We do not set the dimensions correctly but always use 0/0. Fix this by
overwriting the values on mode creation.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 15:35:25 +0000 (16:35 +0100)]
uterm: video: remove .blend and .blendv backends
We never implemented real blending and never hooked it up with the public
API. Hence, we can safely remove this. All functionality that was
available via .blend is now available via .fake_blendv.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 15:24:37 +0000 (16:24 +0100)]
uterm: split fbdev module into different files
This is the first step towards a uterm-fbdev module. It splits the huge
video file into a video backend and a render backend. A monitor backend
will follow later when a full uterm module infrastructure is available.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 15:01:23 +0000 (16:01 +0100)]
uterm: fbdev: use video-data pointer
Instead of hardcoding fbdev data in the header, we now store all data in
the "data" pointer so we can be loaded during runtime.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 15:00:32 +0000 (16:00 +0100)]
uterm: video: add data pointer
If we want to load backends during runtime, we must allow them to store
their data. Instead of hardcoding it, we now provide a "data" pointer so
they can store arbitrary data.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 14:59:33 +0000 (15:59 +0100)]
uterm: video: include xf86drm.h for drmAvailable()
We need this include so drmAvailable() is declared correctly.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 11 Jan 2013 11:16:43 +0000 (12:16 +0100)]
uterm: video: modularize video backends
We want to allow dynamic backend loading during runtime so we need to
avoid static definitions. This converts the backend IDs into module
structures which are then linked into the binary.
To make this fully modular, we need to load the backends dynamicly via
dlsym() and move all the static declarations from uterm_video.h into the
backends. But for now at least the backends can be easily exchanged and
configured during compile-time.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Tue, 8 Jan 2013 16:54:53 +0000 (17:54 +0100)]
build: link with -ldl
We use dlopen() and friends so link with libdl.so to be sure that they are
available.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 18:36:42 +0000 (19:36 +0100)]
uterm: move uterm.h to uterm_monitor.h
uterm.h contains only uterm-monitor related APIs so rename it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 18:31:27 +0000 (19:31 +0100)]
uterm: move uterm-vt into uterm_vt.h
This splits off uterm-vt from the main header to reduce the dependencies
on uterm.h.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 18:22:38 +0000 (19:22 +0100)]
uterm: move input related API to uterm_input.h
This splits off the uterm-input API from uterm.h to avoid depending on
uterm.h everywhere.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 17:03:45 +0000 (18:03 +0100)]
uterm: move video API into uterm_video.h
Split the main header to avoid having it as dependency in so many places.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 13:07:14 +0000 (14:07 +0100)]
uterm: monitor: avoid libdrm dependency
Instead of depending on libdrm, we simply copy the VERSION-IOCTL ABI and
perform the ioctl ourself. This reduces complexity and dependencies.
Why does the DRM layer not provide normal uapi headers via
linux-api-headers? We should fix that.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:40:26 +0000 (13:40 +0100)]
uterm: remove unused pciaccess helpers
We now detect primary GPUs via udev so the pciaccess helpers are no longer
needed.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:37:17 +0000 (13:37 +0100)]
uterm: video: remove drm_get_id() helper
This helper is no longer used so remove it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:34:44 +0000 (13:34 +0100)]
uterm: monitor: read boot_vga via uterm
Instead of using the pciaccess helpers, we now read the boot_vga flag via
uterm. This makes the whole process a lot simpler and removes a lot of
duplicated code that is already provided by the kernel.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:24:50 +0000 (13:24 +0100)]
uterm: move uterm_systemd.h to uterm_systemd_internal.h
Same as uterm_input.h, we want internal headers to have the *_internal
suffix.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:24:09 +0000 (13:24 +0100)]
uterm: move uterm_video.h to uterm_video_internal.h
Same as uterm_input.h, we want internal headers to have the *_internal
suffix.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 7 Jan 2013 12:18:06 +0000 (13:18 +0100)]
uterm: move uterm_input.h to uterm_input_internal.h
We will split the public uterm header soon to avoid big headers. Hence,
rename internal headers to *_internal.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 5 Jan 2013 23:50:12 +0000 (00:50 +0100)]
build: fix build without libfont.la
We still have dead dependencies on libfont.la but don't build it anymore.
Remove the dependency as it is directly linked now.
Reported-by: Vladimir Kravets
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sat, 5 Jan 2013 23:49:38 +0000 (00:49 +0100)]
build: remove getty@.service from makefiles
We removed this service unit earlier this week but the EXTRA_DIST variable
still mentions it. Remove it so kmscon builds cleanly again.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:49:39 +0000 (17:49 +0100)]
text: remove old init/deinit helpers
We no longer need these helpers so remove them. We require each backend to
register itself as part of module-loading so no need to keep these
helpers.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:48:23 +0000 (17:48 +0100)]
kmscon: make bblit mandatory
Similar to the font backends we now require one backend to be always
available as safe fallback. The bblit backend is the most basic backend so
make it mandatory and link it unconditionally.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:47:42 +0000 (17:47 +0100)]
build: remove libfont.la and link directly
We no longer share libfont.la so link it directly into kmscon.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:41:50 +0000 (17:41 +0100)]
kmscon: move gltex renderer into module
Provide the gltex renderer via a module to allow loading it during
runtime.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:36:23 +0000 (17:36 +0100)]
kmscon: move bbulk renderer into module
Provide the bbulk renderer via mod-bbulk.so so it can be loaded during
runtime.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:24:41 +0000 (17:24 +0100)]
text: add owner field to text-ops
When text-ops are registered via modules, we need an owner field so
they're correctly tracked. Hence, add this field to all text-ops and
correctly keep module references.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:15:54 +0000 (17:15 +0100)]
COPYING: update copyright to 2013
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:09:18 +0000 (17:09 +0100)]
build: disable freetype2 by default
The freetype2 backend is no longer recommended. You should always prefer
the pango backend. Pango provides a lot more advanced font options and
internationalization.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:04:55 +0000 (17:04 +0100)]
kmscon: add freetype2 module
The freetype2 module register the freetype2 font backend with kmscon core.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:04:33 +0000 (17:04 +0100)]
kmscon: add unifont module
The unifont module registers the unifont font backend with kmscon core.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 16:03:31 +0000 (17:03 +0100)]
text: remove old font definitions
All font definitions have been moved to font.h so remove the old
definitions and include font.h instead.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 15:55:56 +0000 (16:55 +0100)]
text: move font layer into top-level font_* namespace
The font layer does not longer depend on the text layer so move it into
its own namespace.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 15:30:40 +0000 (16:30 +0100)]
kmscon: add pango module
The pango module registers the pango font-backend with kmscon.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 15:23:52 +0000 (16:23 +0100)]
text: font: add owner field to font_ops
The owner fields specifies the module that provides the code for the given
backend. The font-core is responsible of ref/unref'ing the module so its
code is always available as long as the module exists.
We cannot push this into the modules as modules _must_ never call
kmscon_module_unref(KMSCON_THIS_MODULE)! Because this might drop the last
reference and hence the function might disallocate the module. However,
this means that it cannot return because the caller is _part_ of the
module and so no longer valid.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 15:21:18 +0000 (16:21 +0100)]
kmscon: add module support
Several parts of kmscon have huge external dependencies. However, we allow
them to be disabled during build-time. But this is not enough as it
requires distributions to choose which options to use. Therefore, we now
allow dynamicly loadable modules that can optionally be installed and
kmscon automatically picks them up.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 14:53:01 +0000 (15:53 +0100)]
build: disable wlterm by default
wlterm hasn't been updated for long and it will take some more time to get
it to work with recent Wayland protocol. Hence, disable it so it doesn't
matter if it breaks for now.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 13:03:58 +0000 (14:03 +0100)]
text: font: add .finalize callback
Each font-backend now also gets a .finalize callback that is called when
the last font-user drops its font. This will allow modules to destroy
themself when the last reference is dropped.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Thu, 3 Jan 2013 13:00:57 +0000 (14:00 +0100)]
shl: register: add destroy callback
The new destroy callback is called whenever an entries last reference is
dropped. This will allow modules to keep reference of its code users.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 17:14:48 +0000 (18:14 +0100)]
text: remove load/unload helpers for text-font backends
With modules we no longer need to conditionally load backends. Instead
each module will register the backend with the main application on load.
This will temporarily break pango, freetype2 and unifont backends as they
are not registered until we introduce full module support.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 17:00:14 +0000 (18:00 +0100)]
build: link each text-font backend separately
We want to modularize the text-font library, so we need each backend as a
different library. This step links each of them into a different static
library so we can now link them either into the binary or into modules.
This step also makes 8x16 always compiled into the text-font backend so we
always have a working implementation even though no modules might be
loaded.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 16:34:47 +0000 (17:34 +0100)]
docs: remove getty@.service
This is no longer used and was replaced by kmsconvt@.service some time
ago.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 16:34:07 +0000 (17:34 +0100)]
build: include kmsconvt@.service in EXTRA_DIST
We need the new kmsconvt@.service file instead of the old kmscon@.service.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 2 Jan 2013 16:32:49 +0000 (17:32 +0100)]
build: fix man-page compilation
The man_fixup_aliases thingy was a horrible hack. Replace it with a
temporary .man_fixup file that saves compilation timestamps so we have
post-recipies for man-fixups.
Also fix some minor out-of-tree build problems.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 31 Dec 2012 15:40:51 +0000 (16:40 +0100)]
build: provide git-head revision via githead.h
We need the git-revision for module-version checks so provide the
infrastructure now and print it in log_init().
Note that the git-describe string is distributed with the tarballs so
end-users will not have to generate it themself. But when building from
git, the revision will be automatically updated whenever something
changes.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 31 Dec 2012 14:41:00 +0000 (15:41 +0100)]
build: fix libuterm dependency typo
We didn't set the dependencies correctly for uterm libraries as a
backslash was missing. Fix this typo.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 31 Dec 2012 14:40:06 +0000 (15:40 +0100)]
build: mark man_fixup_aliases as PHONY target
We need to mark it as PHONY target as it has no corresponding source file.
It's unlikely that it causes problems, but lets be safe.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 18:41:08 +0000 (19:41 +0100)]
shl: misc: add shl_ends_with() helper
This helper checks whether a string has the given suffix.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 18:40:04 +0000 (19:40 +0100)]
shl: misc: add shl_dirent() helper
"struct dirent" has always been a mess. As its size may differ between
systems, we need to dynamically allocate it. This helper does that for us.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 15:21:27 +0000 (16:21 +0100)]
text: use new shl-registry objects
Instead of implementing our own thread-safe backend-storage, we now use
the generic shl-registry object.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 15:20:51 +0000 (16:20 +0100)]
text: font: use new shl-registry objects
Instead of implementing a thread-safe backend-system we can now use the
new shl-registry storage module.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 15:18:25 +0000 (16:18 +0100)]
shl: add new register helper
The shl-register module is used to create registries of named-objects. The
main purpose for it will be for module-systems were we have different
backends implementing an interface. The registry can then be used to find
a specific module (or the default module).
No sophisticated filter/search mechanism is used as this cannot be done
efficiently in a generic way.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Sun, 30 Dec 2012 11:50:47 +0000 (12:50 +0100)]
COPYING: add missing contributor's names
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Hoàng Đức Hiếu [Sat, 29 Dec 2012 14:05:57 +0000 (21:05 +0700)]
docs: fix systemd-unit name typo
We forgot to rename the templates from kmscon to kmsconvt in the comments.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 21 Dec 2012 14:30:19 +0000 (15:30 +0100)]
text: gltex: fix y-inversion with new gbm-surfaces
The standard OpenGL surfaces are y-inverted (which we didn't implement
correctly previously when using our own gbm-surfaces). Therefore, we need
to flip the y-coordinates now as we use correct GL surfaces with the new
drm-uterm backend.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 21 Dec 2012 14:15:16 +0000 (15:15 +0100)]
uterm: video: drm: use gbm surfaces
Until now we always created our buffers via gbm_bo_create() and used
surfaceless EGL contexts so we can schedule buffer-flips manually.
However, recent gbm and EGL mesa releases include gbm-surfaces that allow
us to ignore all this an let EGL manage the buffers.
This introduces some problems as we are no longer under control of the
buffers so we cannot know which buffer is active. That means, applications
that use the uterm-drm devices must redraw the screen on each frame.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Fri, 21 Dec 2012 13:13:00 +0000 (14:13 +0100)]
docs: fix default font-size=12 documentation
We used font-size=15 in the past but changed it long ago. However, the
documentation still used 15 so fix this now.
Reported-by: James Buren <ryu0@ymail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 17 Dec 2012 12:25:52 +0000 (13:25 +0100)]
docs: add kmsconvt@.service systemd template
This new template can be used as replacement for getty@.service. It has
the same semantics and can be used as drop-in replacement. It even uses
getty@.service as fallback if kmscon fails.
See the comments in the files for more information.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 20:29:23 +0000 (21:29 +0100)]
terminal: use COLORTERM=kmscon as default
We now set COLORTERM to "kmscon" so applications can identify their
controlling terminal. Note that COLORTERM is not used for terminfo/termcap
detection (unlike TERM).
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 20:24:51 +0000 (21:24 +0100)]
kmscon: use /bin/login -p as default login program
We must pass "-p" to make "login" preserve the environment. We make sure
the environment is correctly reset before calling it so it is safe.
Furthermore, this allows us to pass additional environment variables to
the child without having /bin/login reset it.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 20:24:15 +0000 (21:24 +0100)]
kmscon: add --reset-env option
This option controls whether we reset the environment before spawning the
PTY child.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 20:20:45 +0000 (21:20 +0100)]
pty: add env_reset property
This property controls whether the environment should be reset before
spawning the child process. Defaults to "no" and affects whether "-p" is
passed as default argument to /bin/login.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Wed, 12 Dec 2012 19:12:21 +0000 (20:12 +0100)]
pty: add "colorterm" property
The colorterm property is used (if set) as COLORTERM environment variable.
Note that this variable (despite the name) is not used with
terminfo/termcap. Instead, it's solely used to identify the running
terminal.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann [Mon, 10 Dec 2012 15:21:32 +0000 (16:21 +0100)]
build: check for udev >=172
We need udev_device_has_tag() which was introduced in version 172.
Document that in README file.
Reported-by: Manuel Rüger <mrueg@rueg.eu>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>