[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DPMS, Screen blanking with Sun Creator3D (sun4u systems)



On Mon, 3 Dec 2001, David S. Miller wrote:

(... snip ... Lots of stuff)
>    
> You won't find creator headers in anything Sun publishes.
> 
>    > What doesn't work is any sort of DPMS power management, even though
>    > Solaris knows how (so it is possible).
>    
>    
> It just kills the VSYNC signal, we do that in the Creator3D kernel FB
> driver.   It's DAC fiddling:
> 
> 	tmp = read_dac(0x6000);
> 	tmp &= ~0x1;
> 	write_dac(0x6000, tmp);
> 
> Just set that bit when you want it back.  I'm pretty sure I even
> document these registers in the ffb_dac.h header file in the
> xfree86 sources.

David,
  Yes, it is documented in ffb_dac.h, thanks a lot.

  That said, this solves my problem, and I'll start looking for something
else to complain about.  The short answer is that with David Miller's
hint, I have been able to put both screen blanking (xset s on s blank)
and DPMS support (xset dpms p q r) into the sunffb_drv.o driver for
the Creator3D, FFB2+/Vertical.  I'll keep playing with it, and if it
seems to keep on working, I'll make it available to anyone who wants
it.  I hesitate to suggest something like this as a change for the
driver in general because this driver has to handle various Creator and
Elite cards, and I am able to play with exactly one possible
configuration, which is <Creator3D, FFB2+/Vertical, GDM-20E20 monitor>.

*****************

  For those interested and for anyone who can set me right if what I
am trying is a bad thing, here is how I interpreted Miller's advice:

  1.  In the driver, ffb_driver.c, add DPMS to the option list, and
    if it there, do something like
	xf86DPMSInit(pScreen, FFBDPMSMode, 0); /* in FFBScreenInit */
    where you have a signature
	static void FFBDPMSMode(ScrnInfoPtr pScrn, int M, int f)

    FFBDPMSMode just does
	FFBDacDPMSMode(GET_FFB_FROM_SCRN(pScrn), M, f);

  2.  In ffb_dac.c, you add something like
	void FFBDPmsMode(FFBPtr pFfb, int DPMSMode, int flags) {
	  int tmp;
	  ffb_dacPtr dac = pFfb -> dac;
	  tmp = DACCFG_READ(dac, FFBDAC_CFG_TGEN); /* Get timing reg. */

    And, say, if you want to go into suspend mode, what finally seems
    to work for me looks like:
     
     case DPMSModeSuspend:
	tmp |=  FFBDAC_CFG_TGEN_VSD;  /* VSYNC Disable */
	tmp &= ~FFBDAC_CFG_TGEN_HSD;  /* HSYNC Enable  */
	tmp &= ~FFBDAC_CFG_TGEN_VIDE; /* Kill the video */
	break;

    (Turning the monitor on looks like:)

      case DPMSModeOn:
	tmp &= ~(FFBDAC_CFG_TGEN_VSD | FFBDAC_CFG_TGEN_HSD); /*
				Un-disable Vsync, Hsync */
	tmp |= FFBDAC_CFG_TGEN_VIDE; /* Turn video on */
	break;

    And, finally, change the mode with
	DACFFG_WRITE(dac, FFBDAC_CFG_TGEN, tmp);

  In fact, what I sketched out above is about 1/3 the total changes
I have needed so far.  As I said, I can exercise this in only one specific
configuration, but it's my interpretation of Miller's suggestion.

Regards,
Ferris

--
Ferris McCormick (P44646, MI) <fmccor@inforead.com>
Phone: (703) 392-0303
Fax:   (703) 392-0401




Reply to: