[RFC] don't DPMS off outputs & crtcs from server

Aaron Plattner aplattner at nvidia.com
Mon Mar 3 16:56:39 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I second this, and while we're at it could we also get rid of the calls to
xf86DisableUnusedFunctions?  nv hardware automagically knows when to turn
the displays on and off without the driver fiddling with the DPMS bits to
tell it.

- -- Aaron

On Mon, Mar 03, 2008 at 04:01:18PM -0800, Jesse Barnes wrote:
> This stuff doesn't quite work (due to what may be unrelated reasons) but I 
> wanted to get it out there for comment.
> 
> Currently, the server disables every CRTC and output at SetDesiredModes time 
> to make sure that the hardware is in a known state prior to actually going 
> off to set the configuration desired.  Having a known state is good, but due 
> to the DPMS off calls, there's unnecessary flicker and delay at server 
> startup time.
> 
> This patch removes those calls, and relies on the driver to properly get the 
> CRTC and output configuration (mapping & enabled status, see followup mail) 
> so that the server's SetDesiredModes call will work correctly w/o the DPMS 
> calls.
> 
> The patch also requires an ABI bump (not included), since drivers will need to 
> do this to avoid potential crashes...
> 
> Any thoughts on this?
> 
> Now to hack up the randr ->get_property hook.
> 
> Thanks,
> Jesse

> diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
> index 14b6049..026aadc 100644
> --- a/hw/xfree86/modes/xf86Crtc.c
> +++ b/hw/xfree86/modes/xf86Crtc.c
> @@ -1807,24 +1807,6 @@ xf86SetDesiredModes (ScrnInfoPtr scrn)
>      xf86CrtcConfigPtr   config = XF86_CRTC_CONFIG_PTR(scrn);
>      int			c, o;
>  
> -    /*
> -     * Turn off everything so mode setting is done
> -     * with hardware in a consistent state
> -     */
> -    for (o = 0; o < config->num_output; o++) 
> -    {
> -	xf86OutputPtr  output = config->output[o];
> -	(*output->funcs->dpms)(output, DPMSModeOff);
> -    }
> -
> -    for (c = 0; c < config->num_crtc; c++) 
> -    {
> -	xf86CrtcPtr crtc = config->crtc[c];
> -
> -	crtc->funcs->dpms(crtc, DPMSModeOff);
> -	memset(&crtc->mode, 0, sizeof(crtc->mode));
> -    }
> -    
>      for (c = 0; c < config->num_crtc; c++)
>      {
>  	xf86CrtcPtr	crtc = config->crtc[c];

> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)

iQEVAwUBR8yeR3YgpP6LHaLQAQLexQgAmYfOdEYU4+XXT/FyEtVVi+zshLlrpBbT
4+W66O9EkgedsAiZYx7VlVm1aF/BZWhvUvDxHhQnvaz1eIXE4u14pnQyiygUxU8P
XLaPeTYOKRcMNsLcrtTzFdnUWP54YGlGnCwz8fEsviKqjHLPNC7o8zOt/9JpgLfs
n4TEwwdLOcdYI7oY94OGEfOw5JGQII0r3Ed0LsW2ZIUeFNg8nskBHovJ/Ky9RhUS
HwsXJTe3UuWHdlESVzO5bUKgGp6khK/hcFt6knOnfGj/Q2st0LupqApk+iMaOjY8
VKtZgS4CnhPqlWDZYgLOUO9QFym1fQesxVI9F797r952wwRwKqmC7g==
=BT5X
-----END PGP SIGNATURE-----



More information about the xorg mailing list