<br><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><div class="h5"><br>
On Fri, Jun 21, 2013 at 11:43 AM, Marc Chalain <<a href="mailto:marc.chalain@gmail.com">marc.chalain@gmail.com</a>> wrote:<br>
><br>
> 2013/6/21 David Herrmann <<a href="mailto:dh.herrmann@gmail.com">dh.herrmann@gmail.com</a>><br>
>><br>
>> Hi<br>
>><br>
>> On Fri, Jun 21, 2013 at 10:49 AM, mchalain [<a href="mailto:marc.chalain@gmail.com">marc.chalain@gmail.com</a>]<br>
>> <<a href="mailto:marc.chalain@gmail.com">marc.chalain@gmail.com</a>> wrote:<br>
>> > From: mchalain <<a href="mailto:marc.chalain@gmail.com">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<br>
>> > 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<br>
>> > *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>
>> 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>
>><br>
><br>
> where do you use FBIOPUT_VSCREENINFO ? I only find inside<br>
> fbdev_set_screen_info but this function is called only when the output is<br>
> reenable not at the startup.<br>
<br>
</div></div>My bad!<br>
But still, you now call FBIOPAN_DISPLAY on _every_<br>
fbdev_query_screen_info() while it is only needed during initial setup<br>
as VT_ENTER calls fbdev_set_screen_info(), anyway. So instead, I'd<br>
recommend to just call fbdev_set_screen_info() during initial setup as<br>
well.<br>
<div class="im"><br></div></blockquote><div><br>No I call FBIOPAN_DISPLAY only at startup after yoffset is set to 0<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
> It seems strange that FBIOPAN_DISPLAY is not supported by some devices. I<br>
> used this one to not set all the varinfo on the device and to be faster.<br>
<br>
</div>See ./drivers/video/fbmem.c fb_pan_display(). Trivial fbdev drivers<br>
might not support it, but user-space can still set the offset via<br>
FBIOPUT_VSCREENINFO. If you want, you can call FBIOPAN_DISPLAY and if<br>
it fails, you use FBIOPUT_VSCREENINFO.<br>
<div class="im"><br></div></blockquote><div>I read the yoffset hasn't to be null in FB_VMODE_YWRAP . But yoffset is only used for panning.<br>It's useless to set it if it doesn't use (fbmem.c uses yoffset only for panning in your example too)<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> If yoffset may be non-zero this backend shouldn't work this kind of devices<br>
> and we have to change the painting functions.<br>
<br>
</div>yoffset=0; is the correct thing to do.<br>
<br>
Cheers<br>
<span class="HOEnZb"><font color="#888888">David<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
>> > return 1;<br>
>> > }<br>
>> ><br>
>> > @@ -404,6 +409,7 @@ fbdev_set_screen_info(struct fbdev_output *output,<br>
>> > int fd,<br>
>> > varinfo.blue.length = 8;<br>
>> > varinfo.blue.msb_right = 0;<br>
>> ><br>
>> > + varinfo.yoffset = 0;<br>
>><br>
>> Yep, this is definitely needed.<br>
>><br>
>> Regards<br>
>> David<br>
>><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>
>> > wayland-devel mailing list<br>
>> > <a href="mailto:wayland-devel@lists.freedesktop.org">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>
><br>
><br>
</div></div></blockquote></div><br>