Subject: x server
To: None <port-pmax@NetBSD.ORG>
From: None <rick@snowhite.cis.uoguelph.ca>
List: port-pmax
Date: 05/13/1995 15:14:31
I meant to mail this to the person that just built Xcfbpmax, but dropped his
message on the floor, so you are all stuck seeing it... (sorry)

You might want to try the following patch, which used to make Xcfbpmax work
on a few of the turbochannel frame buffers as well. (It just sets the screen
dimensions from ioctl info..)

It shouldn't affect operation on a DS3100, but.. Good luck, rick
This patch must be applied to the file mit/server/ddx/dec/cfbpmax/cfbpmax_io.c
in X11R5 so that the Xcfbpmax server works with the xcfb (Personal DECstation)
and mfb (MX monochrome turbochannel display) for the 4.4BSD pmax port.

Note that Xcfbpmax is used for the following displays:
	DECstation 3100 Colour Frame Buffer
	CX Turbochannel Colour Frame Buffer (PMAG-BA)
	Personal DECstation 5000/xx Colour Frame Buffer (on motherboard)
	MX Turbochannel Monochrome Frame Buffer (PMAG-AA)

and the Xmfbpmax server is used for
	DECstation 3100 Monochrome Frame Buffer

It would take a significant amount of work to get the Xdec server working,
since there are quite a few ioctl's that will have to be supported by the
kernel.

*** cfbpmax_io.c.sav	Wed Nov 11 15:40:23 1992
--- cfbpmax_io.c	Wed Mar 10 16:10:29 1993
***************
*** 104,111 ****
  #define MAX_LED 3	/* only 3 LED's can be set by user; Lock LED
  			   is controlled by server */
  
- #define FRAMEWIDTH      1024
- #define FRAMEHEIGHT     864
  #define DEPTH           8
  #define BITS_PER_CHAR   8
  
--- 104,109 ----
***************
*** 250,255 ****
--- 248,254 ----
      ColormapPtr pColormap;
      int		i;
      static int  mapOnce = FALSE;
+     int		scrpixwidth;
  
  /* for initializing color map entries */
      u_int blackred      = 0x0000;
***************
*** 345,351 ****
      cursorRange.y1 = -15;
      cursorRange.y2 = info->max_y - 1;
  
- /* XXX FRAMEWIDTH is bogus.  Don't we get this with initial IOCTL?? */
  
      if (dpi == -1) /* dpi has not been set */
      {
--- 344,349 ----
***************
*** 388,395 ****
      pScreen->UninstallColormap = cfbpmaxUninstallColormap;
      pScreen->ListInstalledColormaps = cfbpmaxListInstalledColormaps;
  
!     if (!cfbScreenInit(pScreen, info->bitmap, FRAMEWIDTH,
! 			FRAMEHEIGHT, dpix, dpiy, FRAMEWIDTH, class, FRAMEWIDTH) ||
  	!cfbCreateDefColormap (pScreen))
      {
  	close (fdPM);
--- 386,394 ----
      pScreen->UninstallColormap = cfbpmaxUninstallColormap;
      pScreen->ListInstalledColormaps = cfbpmaxListInstalledColormaps;
  
!     scrpixwidth = ((info->max_x + 1023) / 1024) * 1024;
!     if (!cfbScreenInit(pScreen, info->bitmap, (int)info->max_x,
! 			(int)info->max_y, dpix, dpiy, scrpixwidth) ||
  	!cfbCreateDefColormap (pScreen))
      {
  	close (fdPM);
***************
*** 415,421 ****
      unsigned int result;
  
      result = currentmask;
!     currentmask = *(info->planemask) = planemask;
      return result;
  }
  
--- 414,423 ----
      unsigned int result;
  
      result = currentmask;
!     if (info->planemask)
! 	currentmask = *(info->planemask) = planemask;
!     else
! 	currentmask = planemask;
      return result;
  }