sna: Make the disable-unused after vt switch distinct from DPMS off
So that we do not lose control over dpms on/off! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
b415ca05c2
commit
3a56a0b10e
|
|
@ -304,6 +304,7 @@ Bool sna_mode_pre_init(ScrnInfoPtr scrn, struct sna *sna);
|
|||
void sna_mode_adjust_frame(struct sna *sna, int x, int y);
|
||||
extern void sna_mode_remove_fb(struct sna *sna);
|
||||
extern void sna_mode_update(struct sna *sna);
|
||||
extern void sna_mode_disable_unused(struct sna *sna);
|
||||
extern void sna_mode_fini(struct sna *sna);
|
||||
|
||||
extern int sna_crtc_id(xf86CrtcPtr crtc);
|
||||
|
|
|
|||
|
|
@ -515,9 +515,20 @@ sna_crtc_dpms(xf86CrtcPtr crtc, int mode)
|
|||
{
|
||||
DBG(("%s(pipe %d, dpms mode -> %d):= active=%d\n",
|
||||
__FUNCTION__, to_sna_crtc(crtc)->pipe, mode, mode == DPMSModeOn));
|
||||
}
|
||||
|
||||
if (mode == DPMSModeOff)
|
||||
sna_crtc_disable(crtc);
|
||||
void sna_mode_disable_unused(struct sna *sna)
|
||||
{
|
||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(sna->scrn);
|
||||
int i;
|
||||
|
||||
DBG(("%s\n", __FUNCTION__));
|
||||
|
||||
/* Force consistency between kernel and ourselves */
|
||||
for (i = 0; i < xf86_config->num_crtc; i++) {
|
||||
if (!xf86_config->crtc[i]->enabled)
|
||||
sna_crtc_disable(xf86_config->crtc[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static struct kgem_bo *sna_create_bo_for_fbcon(struct sna *sna,
|
||||
|
|
|
|||
|
|
@ -988,6 +988,8 @@ static Bool sna_enter_vt(VT_FUNC_ARGS_DECL)
|
|||
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
|
||||
"failed to restore desired modes on VT switch\n");
|
||||
|
||||
sna_mode_disable_unused(sna);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue