Disable all outputs and crtcs at startup.
Leaving devices enabled during server startup can cause problems during the initial mode setting in the server, especially when they are used for different purposes by the X server than by the BIOS. Disabling all of them before any mode setting is attempted provides a stable base upon which the remaining mode setting operations can be built.
This commit is contained in:
parent
0375009a97
commit
915563eba5
@ -1723,7 +1723,25 @@ Bool
|
|||||||
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
xf86SetDesiredModes (ScrnInfoPtr scrn)
|
||||||
{
|
{
|
||||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
int c;
|
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++)
|
for (c = 0; c < config->num_crtc; c++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user