Re: X and intelfb fight over videomode

Antonino A. Daplas
2005-11-17T02:04:07Z

> On Thu, Nov 17, 2005 at 09:11:53AM +0800, Antonino A. Daplas wrote:
>> David Härdeman wrote:
>>> intelfb: Changing the video mode is not supported.
>
>> Try booting with video=intelfb:1024x768-16@60,mtrr=0. Do not include
>> the vga=0x318 option. This prevents intelfb from changing the videomode.
>
> It seems that intelfb can't change it no matter what....booting with
> video=intelfb:1024x768-16@60,mtrr=0 gives me the usual vga console and
> no framebuffer. The following is printed during boot:
>

Ah, okay, you have a flatpanel display, so you really need vesa to program
the mode.

> Suggestions?
>

The main problem is that when check_var fails, set_par is not called
which means that the ringbuffer is not set up correctly after switching
from X.

Try this first, then we'll think of a definitive solution later.

Open drivers/video/intelfb/intelfbdrv.c and look at intelfb_check_var().

Look for this particular snippet...

if (FIXED_MODE(dinfo) &&
(change_var ||
var->yres_virtual > dinfo->initial_var.yres_virtual ||
var->yres_virtual < dinfo->initial_var.yres ||
var->xoffset || var->nonstd)) {
if (first) {
ERR_MSG("Changing the video mode is not supported.\n");
first = 0;
}
return -EINVAL;
}

And then insert a line so it looks like this:

if (FIXED_MODE(dinfo) &&
(change_var ||
var->yres_virtual > dinfo->initial_var.yres_virtual ||
var->yres_virtual < dinfo->initial_var.yres ||
var->xoffset || var->nonstd)) {
if (first) {
ERR_MSG("Changing the video mode is not supported.\n");
first = 0;
}
intelfb_set_par(info); /* insert this line */
return -EINVAL;
}