Subject: Son of Quadra Video Patch
To: None <port-mac68k@NetBSD.ORG>
From: Michael R Zucca <mrz5149@cs.rit.edu>
List: port-mac68k
Date: 04/20/1998 00:12:20
Ok, no attempts at speeding up video this time! Just honest to goodness
bug fixing!
You only need this patch, no others. It simply patches grf_iv.c to
compute the frame buffer base address from hardware. If this doesn't
work I don't know what will!
Please let me know if this fixes the X "wraparound".
Thanks!
*** grf_iv.c.orig Sat Apr 18 10:04:56 1998
--- grf_iv.c Mon Apr 20 00:05:32 1998
***************
*** 82,87 ****
--- 82,88 ----
bus_space_handle_t bsh;
int found, sense;
u_int base;
+ u_int32_t vbase1, vbase2 ;
found = 1;
***************
*** 121,126 ****
--- 122,133 ----
bus_space_write_4(oa->oa_tag, bsh, 0x10C, 0);
bus_space_write_4(oa->oa_tag, bsh, 0x110, 0);
bus_space_write_4(oa->oa_tag, bsh, 0x114, 0);
+
+ /* Compute the current frame buffer base address */
+ vbase1 = bus_space_read_4(oa->oa_tag, bsh, 0x0) & 0xfff ;
+ vbase2 = bus_space_read_4(oa->oa_tag, bsh, 0x4) & 0xf ;
+ mac68k_vidphys = 0xf9000000 | ((vbase1 << 9) | (vbase2 << 5)) ;
+ mac68k_vidlog = mac68k_vidphys ;
bus_space_unmap(oa->oa_tag, bsh, 0x1000);
break;