|
From: Antonino D. <ad...@po...> - 2002-05-04 18:02:43
|
On Sat, 2002-05-04 at 05:47, James Simmons wrote:
>
> > I have a few observations on fbgen and fbcon-accel.
>
One more thing I've noticed with gen_set_var. Basically, gen_set_var
will proceed if it satisfies 2 conditions -- during initialization (con
< 0) and if the new var is different from the old var.
The above is fine if everything is done in the console. However,
problems may arise if an app that touches the graphics hardware (ie X)
is launched. From the point of view of fbcon, the hardware state hasn't
changed (compare of newvar with oldvar is false) when display is
switched back to console. And if that app did not fully restore the
hardware state, we will be left with a corrupted display.
So, it's probably better if set_par() and pan_display() are allowed to
proceed unconditionally within gen_set_var. It might take a few more
milliseconds to switch consoles each time, but we are assured that the
hardware state is always coherent with the current var.
What do you think?
Tony
--- fbgen.c.orig Sun May 5 01:38:57 2002
+++ fbgen.c Sun May 5 01:38:55 2002
@@ -172,14 +172,8 @@
if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
info->var = *var;
-
- if (con == info->currcon) {
- if (info->fbops->fb_set_par)
- info->fbops->fb_set_par(info);
-
- if (info->fbops->fb_pan_display)
- info->fbops->fb_pan_display(&info->var, con, info);
+ if (con == info->currcon) {
gen_set_disp(con, info);
fb_set_cmap(&info->cmap, 1, info);
}
@@ -187,6 +181,13 @@
if (info->changevar)
info->changevar(con);
}
+ }
+ if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW &&
+ con == info->currcon) {
+ if (info->fbops->fb_set_par)
+ info->fbops->fb_set_par(info);
+ if (info->fbops->fb_pan_display)
+ info->fbops->fb_pan_display(&info->var, con, info);
}
return 0;
}
|