[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: XFree86 4.1.0: call for help



On Wed, 20 Jun 2001, Ani Joshi wrote:

>
>
> On Wed, 20 Jun 2001, Kostas Gewrgiou wrote:
>
> > The #ifdef __powerpc__ isn't right (and we can't use os specific
> > code in the drivers) so the fix has to go in another layer,
> > crippling another os to fix our problems isn't the right solution.
>
> Well, that's not really true.  There's already lots of os specific code
> in drivers, look at fbdevhw for instance.   Anyhow, the patch was for
> testing purposes, the real fix is to vgaHW and #undef'ing NEED_SAVED_CMAP.
>

Well the PReP people use the vga driver from what i heard (with hardcoded
values for isa io/mem) and they will need this part of the code i imagine.

I think that the crash in vgaHW is because of isa mem accesses, if this is
the case a better fix will be to mmap the right memory range for the
machines that have one and to handle the lack of one in pmacs.

Maybe something like the following in lnx_video.c will help

mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags)
{
....
#if defined(__powerpc__)
 if(Base < 0xffffff) {
   SYSCALL(isa_mem_base = syscall(__NR_pciconfig_iobase, IOBASE_ISA_MEM, 0, 0));
   if(isa_mem_base != -1) {
     Base += isa_mem_base;
   } else {
     /*   Not sure how to handle this maybe return some malloced memory ? /*
     ........
   }
 }
#endif
...
}

  Kostas




Reply to: