Index: [thread] [date] [subject] [author]
  From: Andrew Apted <ajapted@netspace.net.au>
  To  : ggi-develop@eskimo.com
  Date: Sun, 2 Aug 1998 13:35:17 +1000

Re: More progress with kgicon

Jonas writes:

>  On Sun, Aug 02, 1998 at 01:21:27AM +1000, Andrew Apted wrote:
>  > Hi !
>  > 
>  > I've committed a new'n'improved fbcon-kgi.c which fixes many bugs
>  > (palette setting, panning, splitline) but more importantly changes the
>  > way initialization works : it is no longer "init_kgi() sets mode and
>  > then we create a var_screeninfo" it is now "first create a var_screeninfo 
>  > and then set the mode in kgifb_set_var()".
>  
>  This change broke the Matrox Millennium driver. It says MMIO == NULL.

Oh, sorry I thought everything was supposed to set up the MMIO
information probably (except maybe the stock VGA driver).

I made the switch to using kgi_display.mmio->size because
kgi_display.mode.fb_size was wrong (just the size of the current mode,
which hasn't been set yet so the driver assumes text mode and we get a
value like 131072 -- what is needed is the total size of the linear
area -- e.g. 2 MB).

>  This version seems to use the defmode from the driver instead of the defmode
>  structure in fbcon-kgi.c, but the Matrox driver

No previously we would set KGIFB_640x400 as the default mode in
init_kgi(), and fill out the default_var structure from that, but now we
first set up the default_var structure, and *then* convert that to a
ggi_mode (via convert_to_ggimode) when kgifb_set_var() calls
kgi_do_set_mode().  The old way was not the right way.

>  doesn't save any defmode, because the driver is MMIO only and can't use the
>  ordinary VGA text mode, it uses the real framebuffer with a different layout
>  and doesn't use the vga framebuffer.
>  
>  I tried to set the mode->mmio to the correct value, but then insmod crashed
>  with "unable to handle kernel NULL pointer dereference at virtual
>  address 00000000"
>  
>  Any Idea?

I'm thinking that setting up kgi_display.mmio should always be done --
is that right ?

(Note the current code assumes *1* mmio structure which is the
framebuffer -- if there are others then they would need to be *after*
the first one.  Probably kgicon should scan the list looking for the
FRAMEBUFFER tag...).

Cheers,
_____________________________________________  ____
                                               \  /
  Andrew Apted   <andrew@ggi-project.org>       \/
  

Index: [thread] [date] [subject] [author]