summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-03-04shl: move log.[ch] to shl_log.[ch]David Herrmann47-54/+50
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>
2013-03-04log: move includes to topDavid Herrmann1-4/+2
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>
2013-03-04build: mark font-unifont as noexecstackDavid Herrmann1-0/+1
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>
2013-02-28Release kmscon-7kmscon-7David Herrmann3-2/+9
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>
2013-02-27build: fix empty --with-*= argumentsDavid Herrmann1-12/+20
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>
2013-02-27build: enable static libraries by defaultDavid Herrmann1-1/+1
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>
2013-02-27uvt: new library implementing VTs in user-spaceDavid Herrmann11-0/+2170
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>
2013-02-18shl: misc: provide shl_next_pow2()David Herrmann2-16/+18
Move the next_pow2() helper to shl_misc.h so we can use it everywhere. Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
2013-02-16tests: fix compilation with new eloop APIDavid Herrmann1-1/+1
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>
2013-02-16README: update build-instructionsDavid Herrmann1-16/+17
The build-system changed slightly so update the build-instructions. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-02-16NEWS: add kmscon-7 notesDavid Herrmann1-0/+59
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>
2013-02-16build: check for fuse >= 2.9.0David Herrmann1-1/+1
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>
2013-02-16build: enable unifont by defaultDavid Herrmann1-2/+2
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>
2013-02-11docs: remove pixman commentsDavid Herrmann1-47/+0
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>
2013-02-11Fix several typosJakub Wilk19-49/+49
Provided via github. Fixes typos in documentation and comments. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-02-08llog: add "data" parameter to pass contextDavid Herrmann20-104/+163
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>
2013-02-06build: add --enable-wlterm to distcheck flagsDavid Herrmann1-0/+1
We should test wlterm when running distcheck so make in mandatory. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-02-06font: freetype2: include tsm_unicode.hDavid Herrmann1-0/+1
We use TSM symbols so include the right headers. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-02-06font: unifont: compress binary data and link via ld directlyDavid Herrmann4-198/+254
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>
2013-02-06build: major cleanupDavid Herrmann22-113/+767
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>
2013-02-05conf: remove unused CONF_DONEDavid Herrmann2-7/+1
This flag was never used and is mostly useless, so remove it. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-02-05conf: fix include-protection nameDavid Herrmann2-7/+8
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>
2013-02-05conf: perform aftercheck on ctx-copyDavid Herrmann1-1/+10
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>
2013-01-27wlt: toolkit: fix stuck key repeat bugMartin Minarik1-2/+1
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>
2013-01-24wlt: link font library staticallyDavid Herrmann3-2/+31
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>
2013-01-24wlt: fix shl_hook API changesDavid Herrmann2-2/+2
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>
2013-01-24wlt: toolkit: fix resize window stuck in need_resize=trueMartin Minarik1-20/+14
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>
2013-01-24uterm: drm: rename to drm3dDavid Herrmann11-539/+660
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>
2013-01-24uterm: rename drm-dumb backend into drm2d moduleDavid Herrmann11-248/+347
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>
2013-01-24text: pixman: add support for non x4-stride glyphsDavid Herrmann1-4/+39
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>
2013-01-24text: pixman: remove debug testsDavid Herrmann1-1/+1
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>
2013-01-24text: pixman: special case rendering for known bg/fg colorsDavid Herrmann1-21/+59
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>
2013-01-24uterm: dumb: optimize division by 255 in rendering pathDavid Herrmann1-9/+19
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>
2013-01-24text: cairo: fix debug message to print correct valuesDavid Herrmann1-2/+3
We need to print the actual stride+buffer instead of the first set values. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-24kmscon: add pixman rendererDavid Herrmann5-0/+551
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>
2013-01-24uterm: fbdev: fix wakeing up displaysDavid Herrmann2-8/+23
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>
2013-01-23uterm: video: print debug messages on wakeup/sleepDavid Herrmann1-0/+4
This helps debugging video sleep/wakeup issues. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-15kmscon: add cairo-renderer moduleDavid Herrmann6-0/+589
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>
2013-01-15uterm: fbdev: map FBs for read accessDavid Herrmann1-1/+1
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>
2013-01-14uterm: video: return buffer information on display_use()David Herrmann8-17/+46
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>
2013-01-14uterm: video: return information for all buffers on get_buffers()David Herrmann6-32/+39
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>
2013-01-13shl: hook: fix invalid memory access for non-oneshot entriesDavid Herrmann1-3/+5
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>
2013-01-13uterm: video: add uterm_display_get_buffer()David Herrmann7-2/+74
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>
2013-01-13COPYING: add 'Swift Geek'David Herrmann1-0/+1
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>
2013-01-13uterm: video: add support for immediate buffer-swapsDavid Herrmann9-23/+19
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>
2013-01-13pty: reset signal-handlers for childsDavid Herrmann1-1/+4
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>
2013-01-13uterm: drm: share mode-setting between dumb+drmDavid Herrmann6-146/+256
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>
2013-01-13eloop: add EV_ONESHOT and EV_SINGLE flags for idle sourcesDavid Herrmann6-22/+51
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>
2013-01-13shl: hook: add 'oneshot' flagDavid Herrmann4-15/+28
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>
2013-01-13shl: hook: add helpers to add callbacks only onceDavid Herrmann1-0/+40
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>