This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 92cadf14e3dddf0bc97848999152f3ae2e8d53a5 (commit) from e6ffc65a598d5e457fab45f6f968642e3036be08 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/92cadf14e3dddf0bc97848999152f3ae2e8d5...
commit 92cadf14e3dddf0bc97848999152f3ae2e8d53a5 Author: Cyril Hrubis metan@ucw.cz Date: Sat May 12 21:17:02 2012 +0200
backends: A few fixes for linux fb.
* Back at tty1 (tty0 has root root permissions while tty1 is root tty)
* Added O_NONBLOCK for console open() (so that poll wouldn't block)
* Added more debug messages
diff --git a/libs/backends/GP_LinuxFB.c b/libs/backends/GP_LinuxFB.c index 654989d..3a2cf7e 100644 --- a/libs/backends/GP_LinuxFB.c +++ b/libs/backends/GP_LinuxFB.c @@ -58,25 +58,29 @@ static int allocate_console(struct fb_priv *fb, int flag) char buf[255];
/* allocate and switch to new console */ - fd = open("/dev/tty0", O_WRONLY); + GP_DEBUG(1, "Allocating new console"); + + fd = open("/dev/tty1", O_WRONLY);
if (fd < 0) { - GP_DEBUG(1, "Opening console /dev/tty0 failed: %s", + GP_DEBUG(1, "Opening console /dev/tty1 failed: %s", strerror(errno)); return -1; } if (ioctl(fd, VT_OPENQRY, &nr) < 0) { - GP_DEBUG(1, "Failed to ioctl VT_OPENQRY /dev/tty0: %s", + GP_DEBUG(1, "Failed to ioctl VT_OPENQRY /dev/tty1: %s", strerror(errno)); close(fd); return -1; }
+ GP_DEBUG(1, "Has been granted tty%i", nr); + close(fd);
snprintf(buf, sizeof(buf), "/dev/tty%i", nr); - fd = open(buf, O_RDWR); + fd = open(buf, O_RDWR | O_NONBLOCK);
if (fd < 0) { GP_DEBUG(1, "Opening console %s failed: %s", @@ -97,6 +101,8 @@ static int allocate_console(struct fb_priv *fb, int flag) return -1; }
+ GP_DEBUG(1, "Waiting for tty%i to activate", nr); + if (ioctl(fd, VT_WAITACTIVE, nr) < 0) { GP_DEBUG(1, "Failed to ioctl VT_WAITACTIVE %s: %s", buf, strerror(errno)); @@ -205,6 +211,8 @@ GP_Backend *GP_BackendLinuxFBInit(const char *path, int flag) goto err1;
/* open and mmap framebuffer */ + GP_DEBUG(1, "Opening framebuffer '%s'", path); + fd = open(path, O_RDWR); if (fd < 0) { @@ -224,6 +232,9 @@ GP_Backend *GP_BackendLinuxFBInit(const char *path, int flag) goto err3; }
+ GP_DEBUG(1, "Have framebufer %ix%i %s %ibpp", vscri.xres, vscri.yres, + vscri.grayscale ? "Gray" : "RGB", vscri.bits_per_pixel); + /* * Framebuffer is grayscale. */
-----------------------------------------------------------------------
Summary of changes: libs/backends/GP_LinuxFB.c | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.