<div dir="ltr">From 6553ed3ad9845113f3b2280e6fc94e2b326a7eca Mon Sep 17 00:00:00 2001<br>From: mchalain <<a href="mailto:marc.chalain@gmail.com">marc.chalain@gmail.com</a>><br>Date: Fri, 7 Jun 2013 17:18:23 +0200<br>
Subject: [PATCH 2/2] [fbdev_backend] initialization of the first frame buffer<br><br>---<br> src/compositor-fbdev.c | 8 +++++++-<br> 1 file changed, 7 insertions(+), 1 deletion(-)<br><br>diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c<br>
index d6d911a..e6c761f 100644<br>--- a/src/compositor-fbdev.c<br>+++ b/src/compositor-fbdev.c<br>@@ -277,7 +277,7 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,<br> if (finfo->visual == FB_VISUAL_DIRECTCOLOR)<br>
build_cmap(vinfo, cmap);<br> else<br>- /* We only handle true-colour frame buffers at the moment. */<br>+ /* We only handle true-colour frame buffers at the moment. */<br> if (finfo->visual != FB_VISUAL_TRUECOLOR || vinfo->grayscale != 0)<br>
return 0;<br> <br>@@ -373,6 +373,11 @@ fbdev_query_screen_info(struct fbdev_output *output, int fd,<br> return -1;<br> }<br> <br>+ if (varinfo.yoffset != 0) {<br>+ varinfo.yoffset = 0;<br>
+ if (ioctl(fd, FBIOPAN_DISPLAY, &varinfo) < 0)<br>+ return -1;<br>+ }<br> return 1;<br> }<br> <br>@@ -409,6 +414,7 @@ fbdev_set_screen_info(struct fbdev_output *output, int fd,<br> varinfo.blue.length = 8;<br>
varinfo.blue.msb_right = 0;<br> <br>+ varinfo.yoffset = 0;<br> /* Set the device's screen information. */<br> if (ioctl(fd, FBIOPUT_VSCREENINFO, &varinfo) < 0) {<br> return -1;<br>-- <br>
1.7.9.5<br><br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/6/7 Marc Chalain <span dir="ltr"><<a href="mailto:marc.chalain@gmail.com" target="_blank">marc.chalain@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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.<br>
</div>
</blockquote></div><br></div>