Subject: Whoever compiler madhatter#35
To: None <port-mac68k@NetBSD.ORG>
From: Duncan McQueen <duncan@visionary.com>
List: port-mac68k
Date: 01/14/1997 11:50:05
Would whoever compiled Madhatter#35 apply this patch??
----------
> 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);
>  }