* problem with gen_update_var
@ 2002-06-10 16:41 Antonino Daplas
2002-06-17 19:27 ` James Simmons
0 siblings, 1 reply; 4+ messages in thread
From: Antonino Daplas @ 2002-06-10 16:41 UTC (permalink / raw)
To: fbdev
[-- Attachment #1: Type: text/plain, Size: 144 bytes --]
Hi,
gen_update_var will break panning/wrapping since it passes info->var to
fb_pan_display. However, fbcon updates display->var.
Tony
[-- Attachment #2: fbgen.c.diff --]
[-- Type: text/plain, Size: 430 bytes --]
--- fbgen.c.orig Mon Jun 10 06:30:29 2002
+++ fbgen.c Mon Jun 10 06:26:44 2002
@@ -514,6 +514,9 @@
if (con == info->currcon) {
if (info->fbops->fb_pan_display) {
+ info->var.xoffset = fb_display[con].var.xoffset;
+ info->var.yoffset = fb_display[con].var.yoffset;
+ info->var.vmode = fb_display[con].var.vmode;
if ((err = info->fbops->fb_pan_display(&info->var, con, info)))
return err;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem with gen_update_var
2002-06-10 16:41 problem with gen_update_var Antonino Daplas
@ 2002-06-17 19:27 ` James Simmons
2002-06-17 19:58 ` Antonino Daplas
0 siblings, 1 reply; 4+ messages in thread
From: James Simmons @ 2002-06-17 19:27 UTC (permalink / raw)
To: Antonino Daplas; +Cc: fbdev
> Hi,
>
> gen_update_var will break panning/wrapping since it passes info->var to
> fb_pan_display. However, fbcon updates display->var.
It works. The var info struct fb_info is always the foreground console.
Notice gen_update_var is only called when it is the foreground console.
_______________________________________________________________
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem with gen_update_var
2002-06-17 19:27 ` James Simmons
@ 2002-06-17 19:58 ` Antonino Daplas
2002-06-17 20:38 ` James Simmons
0 siblings, 1 reply; 4+ messages in thread
From: Antonino Daplas @ 2002-06-17 19:58 UTC (permalink / raw)
To: James Simmons; +Cc: fbdev
On Tue, 2002-06-18 at 03:27, James Simmons wrote:
>
> > Hi,
> >
> > gen_update_var will break panning/wrapping since it passes info->var to
> > fb_pan_display. However, fbcon updates display->var.
>
> It works. The var info struct fb_info is always the foreground console.
> Notice gen_update_var is only called when it is the foreground console.
>
>
In ywrap_up in fbcon.c, it has this code:
p->var.xoffset = 0;
p->var.yoffset = p->yscroll*fontheight(p);
p->var.vmode |= FB_VMODE_YWRAP;
p->fb_info->updatevar(unit, p->fb_info);
(*p is struct display). gen_update_var will call pan_display(info->var,
con, info). But as can be seen, info->var is not updated by ywrap_up.
Unless, the low-level driver's implementation is to get the offsets
from fb_display[con].var, that's the only time it will work. But it
will break userland apps that will call pan_display(var, con, info)
expecting that the offsets contained in the passed var parameter will be
updated.
Tony
_______________________________________________________________
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: problem with gen_update_var
2002-06-17 19:58 ` Antonino Daplas
@ 2002-06-17 20:38 ` James Simmons
0 siblings, 0 replies; 4+ messages in thread
From: James Simmons @ 2002-06-17 20:38 UTC (permalink / raw)
To: Antonino Daplas; +Cc: fbdev
> In ywrap_up in fbcon.c, it has this code:
>
> p->var.xoffset = 0;
> p->var.yoffset = p->yscroll*fontheight(p);
> p->var.vmode |= FB_VMODE_YWRAP;
> p->fb_info->updatevar(unit, p->fb_info);
>
> (*p is struct display). gen_update_var will call pan_display(info->var,
> con, info).
Only if con == currcon.
> But as can be seen, info->var is not updated by ywrap_up.
Your right. I will fix that.
> Unless, the low-level driver's implementation is to get the offsets
> from fb_display[con].var, that's the only time it will work. But it
> will break userland apps that will call pan_display(var, con, info)
> expecting that the offsets contained in the passed var parameter will be
> updated.
Don't worry about userland apps. They can't pan non foreground consoles.
Only fbcon inside the kernel can.
_______________________________________________________________
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-06-17 20:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-10 16:41 problem with gen_update_var Antonino Daplas
2002-06-17 19:27 ` James Simmons
2002-06-17 19:58 ` Antonino Daplas
2002-06-17 20:38 ` James Simmons
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).