[fbdev_backend] initialization of the first frame buffer

Marc Chalain marc.chalain at gmail.com
Fri Jun 7 08:20:23 PDT 2013


>From 6553ed3ad9845113f3b2280e6fc94e2b326a7eca Mon Sep 17 00:00:00 2001
From: mchalain <marc.chalain at gmail.com>
Date: Fri, 7 Jun 2013 17:18:23 +0200
Subject: [PATCH 2/2] [fbdev_backend] initialization of the first frame
buffer

---
 src/compositor-fbdev.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
index d6d911a..e6c761f 100644
--- a/src/compositor-fbdev.c
+++ b/src/compositor-fbdev.c
@@ -277,7 +277,7 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
     if (finfo->visual == FB_VISUAL_DIRECTCOLOR)
         build_cmap(vinfo, cmap);
     else
-     /* We only handle true-colour frame buffers at the moment. */
+    /* We only handle true-colour frame buffers at the moment. */
     if (finfo->visual != FB_VISUAL_TRUECOLOR || vinfo->grayscale != 0)
         return 0;

@@ -373,6 +373,11 @@ fbdev_query_screen_info(struct fbdev_output *output,
int fd,
         return -1;
     }

+    if (varinfo.yoffset != 0) {
+        varinfo.yoffset    = 0;
+        if (ioctl(fd, FBIOPAN_DISPLAY, &varinfo) < 0)
+            return -1;
+    }
     return 1;
 }

@@ -409,6 +414,7 @@ fbdev_set_screen_info(struct fbdev_output *output, int
fd,
     varinfo.blue.length = 8;
     varinfo.blue.msb_right = 0;

+    varinfo.yoffset = 0;
     /* Set the device's screen information. */
     if (ioctl(fd, FBIOPUT_VSCREENINFO, &varinfo) < 0) {
         return -1;
-- 
1.7.9.5




2013/6/7 Marc Chalain <marc.chalain at gmail.com>

> Often the frame buffer device allows the double buffering, In this case
> the displayed buffer could not be initialized. This is done by yoffset of
> the varinfo.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20130607/e5f62f71/attachment.html>


More information about the wayland-devel mailing list