Re: X and intelfb fight over videomode

From: Antonino A. Daplas
Date: Thu Nov 17 2005 - 20:08:22 EST


David Härdeman wrote:
> On Thu, Nov 17, 2005 at 12:49:54PM +0800, Antonino A. Daplas wrote:
>> Ignore the hack I mentioned in the previous thread. Try this patch
>> instead.
>
> Didn't help, the messages remain the same (tried with vga=0x318 and
> video=intelfb:1024x768-32@60,mtrr=0 vga=0x318).
>
> Boot:
> intelfb: 00:02.0: Intel(R) 852GM, aperture size 128MB, stolen memory 8060kB
> intelfb: Non-CRT device is enabled ( LVDS port ). Disabling mode
> switching.
> intelfb: Initial video mode is 1024x768-32@60.
> intelfb: Changing the video mode is not supported.
> Console: switching to colour frame buffer device 128x48
>
> Starting X:
> mtrr: base(0xe0020000) is not aligned on a size(0x300000) boundary
> [drm:drm_unlock] *ERROR* Process 2976 using kernel context 0
>
> First time I switch from X to VC:
> intelfb: Changing the video mode is not supported.
> intelfb: ring buffer : space: 6024 wanted 65472
> intelfb: lockup - turning off hardware acceleration
>

Well, intelfb is at the mercy of X if it's in 'fixed mode'.

> Other suggestions?

I'm adding Sylvain, the intelfb maintainer, to the CC list.

How about this one? It also resets the ringbuffer before re-initializing
it again.

Tony

diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 427689e..f1e7778 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -1283,6 +1283,16 @@ intelfb_set_par(struct fb_info *info)

if (FIXED_MODE(dinfo)) {
ERR_MSG("Changing the video mode is not supported.\n");
+
+ /*
+ * We need to at least initialize the 2D engine even
+ * if changing the mode is not allowed
+ */
+ if (ACCEL(dinfo, info)) {
+ intelfbhw_2d_stop(dinfo);
+ intelfbhw_2d_start(dinfo);
+ }
+
return -EINVAL;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/