Subject: Re: Whoever compiler madhatter#35
To: Duncan McQueen <duncan@visionary.com>
From: Stephen C. Brown <sbrown@shellx.best.com>
List: port-mac68k
Date: 01/14/1997 22:41:21
>Would whoever compiled Madhatter#35 apply this patch??

I compiled madhatter#35.  But, the patch given here is not likely
to work without some changes to my source.  The patch seems to
depend on both variables mac68k_vidphys and mac68k_vidlog having
been mapped correctly(something that would be done with get_phys(),
if it wasn't broken).  The whole crux of the "madhatter" patch
was to get around the fact that these were not being mapped correctly.

I'll take a look at things this weekend and let you know if I come
up with something that works, but I won't promise anything before then.

Steve Brown,
sbrown@best.com

>----------
>> From: Dave Huang <khym@bga.com>
>> To: Duncan McQueen <duncan>
>> Subject: Re: X Problems...on Quadra
>> Date: Monday, January 13, 1997 12:32 PM
>>
>> Okay, apply this to grf_iv.c and ite.c in /usr/src/sys/arch/mac68k/dev
>and
>> recompile your kernel and you should be able to run X in any
>resolution...
>> (you might need to get whoever compiled madhatter#35 to compile a kernel
>> for you, actually, since his sources have other patches to make X work on
>> the Q700, I think).
>>
>>
>> --- /usr/src/sys/arch/mac68k/dev/grf_iv.c     Tue Dec 17 06:18:39 1996
>> +++ grf_iv.c  Thu Jan  2 13:49:25 1997
>> @@ -107,8 +107,8 @@
>>       gm->hres = 80;          /* XXX Hack */
>>       gm->vres = 80;          /* XXX Hack */
>>       gm->fbsize = gm->rowbytes * gm->height;
>> -     gm->fbbase = (caddr_t) mac68k_vidlog;
>> -     gm->fboff = 0;
>> +     gm->fbbase = (caddr_t) (mac68k_vidlog & ~PGOFSET);
>> +     gm->fboff = mac68k_vidlog & PGOFSET;
>>
>>       /* Perform common video attachment. */
>>       grf_establish(sc, NULL, grfiv_mode, grfiv_phys);
>> @@ -143,5 +143,5 @@
>>        * If we're using IIsi or similar, this will be 0.
>>        * If we're using IIvx or similar, this will be correct.
>>        */
>> -     return (caddr_t) mac68k_vidphys;
>> +     return (caddr_t) (mac68k_vidphys + addr - mac68k_vidlog);
>>  }
>> --- /usr/src/sys/arch/mac68k/dev/ite.c        Wed Dec 18 06:19:03 1996
>> +++ ite.c     Thu Jan  9 00:18:52 1997
>> @@ -859,7 +859,7 @@
>>
>>       if (strcmp(ga->ga_name, "ite"))
>>               return 0;
>> -     pa = pmap_extract(pmap_kernel(), (vm_offset_t) gm->fbbase);
>> +     pa = pmap_extract(pmap_kernel(), (vm_offset_t) gm->fbbase + gm->fboff);
>>
>>       return (pa == (vm_offset_t) mac68k_vidphys);
>>  }