Subject: half-baked SFB patch
To: None <port-pmax@NetBSD.ORG>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 03/18/1998 17:04:02
...The following patch, for sys/arch/pmax/dev/sfb.c, may not even
compile, but if it does, it should get the correct screen size on the
PMAGB-BB and other variants.

The kernel will probably need additional work to get the console size
correct, but it'd be very helpful to know if this is approximately
right.




*** /sys/arch/pmax/dev/sfb.c	Mon Jul 21 04:19:36 1997
--- sfb.c	Wed Mar 18 16:48:26 1998
***************
*** 270,275 ****
--- 266,283 ----
  	fi->fi_type.fb_cmsize = 256;
  	fi->fi_type.fb_size = SFB_FB_SIZE;
  
+ #if 1
+ 	{
+ 	  int h_setup = * (u_int32*) ( ((caddr_t)fi->fi_base) + 0064);
+ 	  int v_setup = * (u_int32*) ( ((caddr_t)fi->fi_base) + 0068);
+ 
+ 	  fi->fi_type.fb_height = (h_setup & 0x01ff) << 2;
+ 	  fi->fi_type.fb_width = (v_setup & 0x07ff);
+ 	  printf("\nComputed FB as %d x %d\n", 
+ 		 fi->fi_type.fb_height, fi->fi_type.fb_width);
+ 	}
+ 	
+ #endif
  	/* Initialize the RAMDAC. */
  	bt459init (fi);