|
From: Michel <mi...@da...> - 2003-03-12 15:56:28
|
On Mit, 2003-03-12 at 09:24, Geert Uytterhoeven wrote: > On 12 Mar 2003, Michel [ISO-8859-1] Dänzer wrote: > > On Mit, 2003-03-12 at 02:02, Antonino Daplas wrote: > > > On Wed, 2003-03-12 at 08:07, Michel Dänzer wrote: > > > > On Die, 2003-03-11 at 23:51, Antonino Daplas wrote: > > > > > On Wed, 2003-03-12 at 06:23, Thomas Winischhofer wrote: > > > > > > > > > > > > > > I actually prefer #3, and I already have working code for this. We can > > > > > > > also make this driver switchable (ie, drivers that are not affected by X > > > > > > > can disable this, and only drivers that are affected such as the riva, > > > > > > > aty, radeon, etc can turn this on). > > > > > > > > > > > > What exactly is a "trusted" console? > > > > > > > > > > By default, the pid of each vt is -1. When X loads, it installs its own > > > > > VT (ie vt7), which in that case the pid of that particular vt == X's > > > > > pid. We can check this pid, and if switching from a vt with pid == -1, > > > > > we can safely assume that the hardware state is still sane, and if not, > > > > > assume the hardware state is undefined. > > > > > > > > Can you also detect when the app has opened the framebuffer device, and > > > > assume it's playing nice when it has? (for Option "UseFBDev") > > > > > > X using fbdev will also have the same limitation. I have implemented > > > something like this before. For each fb_open, the current->pid can be > > > saved into a "white list" and removed for each fb_close. fbcon can then > > > compare this to the pid of the vt it's switching from. > > The application cannot play not nice unless it mmap()s the MMIO registers. To > be able to do that, it first has to clear FB_ACCELF_TEXT in var.accel_flags. X will map the MMIO registers with Option "UseFBDev" and still play nice (hopefully :). > > > This is becoming to sound very ugly though. I guess, the best way is to > > > really support Option "UseFBDev", or at least have the user decide if > > > he/she wants to have the hardware refreshed. > > > > I'm afraid I don't understand what you're saying here. > > But I think you do agree :-) He says that if fbdev is active, the X server has > to be fbdev compliant and thus not mess with the hardware where it's not > allowed to. I agree that's how it should be. -- Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer XFree86 and DRI project member / CS student, Free Software enthusiast |