Re: [Xpert]I830M memory/bios/vidmode problem?

2002-01-01 Thread Manuel M. T. Chakravarty

I have done some more experimenting with the video driver
and the agpgart kernel module.

By now, I am fairly sure that the BIOS is the main problem.
More precisely, the BIOS refuses to use the VESA mode 0x0117
(ie, 1024x768x64k).  This is obvious as 

  mode = I830VESAGetModeInfo (pScrn, 0x0117);

returns with 

  mode-ModeAttributes  1

*not* being set (ie, it indicates that this mode is not
supported by the hardware).  This is, of course, nonsense as
Intel's i830M driver for Win98 doesn't have any problems
using this mode on the same hardware.

So, the only explanation that is left is that the BIOS
assumes that with 1MB of stolen memory, the given mode
cannot be supported (which makes some sense as the
framebuffer needs to be about 1.5MB, but doesn't take into
account the dynamically allocated video memory).  I tried to
trick the BIOS by adding (yet another exception) to
I830VESASetVBEMode() and switch to 0x0117 using the legacy
int10 BIOS call 0x0045.  However, this didn't seem to help;
the X server died with a lockup message somewhat later
during initialisation.

As the insufficient amount of stolen memory seems to be what
prevents the BIOS from allowing VESA mode 0x0117, I tried to
switch the GMCH into a mode where it steals 8MB instead of
only one.  This worked after booting Linux with an explicit
mem=... boot parameter to leave enough room to steal seven
more MB at the time when the agpgart kernel module is
initialised.  The I830_GMCH_CTRL register originally
contains the value 0x34 (indicating 1MB of stolen memory),
which I changed to 0x44 in intel_i830_configure().

Unfortunately, this didn't have any effect on what the BIOS
regards as valid video modes; ie, it still didn't allow VESA
mode 0x0117.  In other words, the BIOS doesn't seem to
inspect the GMCH control register, but instead seems to
store the parameters of the current video configuration
somewhere else.  (This didn't surprise me too much, but it
was worth a try.)

To me, the question seems to be how Intel's driver using
their Dynamic Video Memory

  http://developer.intel.com/design/chipsets/applnots/298638.htm

convinces the BIOS to allow VESA mode 0x0117.  Via a special
BIOS function?

Cheers,
Manuel

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]I830M memory/bios/vidmode problem?

2001-12-30 Thread Manuel M. T. Chakravarty

Manuel M. T. Chakravarty [EMAIL PROTECTED] wrote,

 As I have tried to explain before, I believe that the
 problem is NOT in the driver actually having a problem with
 only 1MB stolen memory.  The problem - as far as I
 understand it - is that the BIOS *assumes* that only a
 restricted number of video modes are available.
[..]
 It seems to me
 that the BIOS here simply does not provide a video mode with
 a resolution higher than 640x480 at depth 16 and 24.  In
 other words, I don't think that the problem is really in the
 driver, but that it is in what the BIOS reports.  Is it
 possible that the BIOS determines the available video modes
 in dependence on the GMCH setting of the amount of stolen
 memory?

As the 1MB stolen memory seems to be the problem, I tried to
coax the machine into actually using 8MB stolen memory
instead of only 1MB.  I did so by editing the function
intel_i830_configure() in `linux/drivers/char/agp/agpgart_be.c'
by adding the lines marked by a `+':

pci_read_config_word(agp_bridge.dev,I830_GMCH_CTRL,gmch_ctrl);
gmch_ctrl |= I830_GMCH_ENABLED;
+   gmch_ctrl = ~I830_GMCH_GMS_MASK;
+   gmch_ctrl |= I830_GMCH_GMS_STOLEN_8192;
pci_write_config_word(agp_bridge.dev,I830_GMCH_CTRL,gmch_ctrl);

Unfortunately, this resulted in the machine freezing as soon
as I load the `agpgart' module.

Any ideas on what the right method is to change this setting?

Cheers,
Manuel
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert