<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2013/6/21 David Herrmann <span dir="ltr"><<a href="mailto:dh.herrmann@gmail.com" target="_blank">dh.herrmann@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi<br>
<div><br>
On Fri, Jun 21, 2013 at 10:49 AM, mchalain [<a href="mailto:marc.chalain@gmail.com" target="_blank">marc.chalain@gmail.com</a>]<br>
<<a href="mailto:marc.chalain@gmail.com" target="_blank">marc.chalain@gmail.com</a>> wrote:<br>
> From: mchalain <<a href="mailto:marc.chalain@gmail.com" target="_blank">marc.chalain@gmail.com</a>><br>
><br>
>  it initializes varinfo.yoffset. varinfo.yoffset has to<br>
>  point on the beginning of the video memory.<br>
>  The card uses this value to push on the screen a part of<br>
>  the video memory when this one is larger than the screen.<br>
><br>
> ---<br>
>  weston/src/compositor-fbdev.c |    6 ++++++<br>
>  1 file changed, 6 insertions(+)<br>
><br>
> diff --git a/weston/src/compositor-fbdev.c b/weston/src/compositor-fbdev.c<br>
> index adfb67a..d2aee9b 100644<br>
> --- a/weston/src/compositor-fbdev.c<br>
> +++ b/weston/src/compositor-fbdev.c<br>
> @@ -368,6 +368,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>
<br>
</div>Why do you need this? It's unnecessary. We call FBIOPUT_VSCREENINFO<br>
after fbdev_query_screen_info(), anyway. Furthermore, not all drivers<br>
support panning even though the yoffset may be non-zero (you need<br>
FBIOPUT_VSCREENINFO then).<br>
<br>
I think you can just drop this here but keep the yoffset=0 below.<br>
<div><br></div></blockquote><div><br>where do you use  FBIOPUT_VSCREENINFO ? I only find inside fbdev_set_screen_info but this function is called only when the output is reenable not at the startup.<br>It seems strange that FBIOPAN_DISPLAY is not supported by some devices. I used this one to not set all the varinfo on the device and to be faster.<br>
If yoffset may be non-zero this backend shouldn't work this kind of devices and we have to change the painting functions.<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
>         return 1;<br>
>  }<br>
><br>
> @@ -404,6 +409,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>
<br>
</div>Yep, this is definitely needed.<br>
<br>
Regards<br>
David<br>
<div><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>
</div>> _______________________________________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</blockquote></div><br></div></div>