mirror of
https://github.com/X11Libre/xf86-video-vmware.git
synced 2026-03-23 17:19:24 +00:00
Disable the kernel CRTC when DPMS Mode OFF is called
If the CRTC is supposed to be disabled we need to inform the kernel. Fixes a bug where a secondary screen is left blank, but enabled, when switching from two displays to one. Signed-off-by: Ian Forbes <ian.forbes@broadcom.com>
This commit is contained in:
@@ -72,7 +72,8 @@ static void
|
||||
crtc_dpms(xf86CrtcPtr crtc, int mode)
|
||||
{
|
||||
struct crtc_private *crtcp = crtc->driver_private;
|
||||
/* ScrnInfoPtr pScrn = crtc->scrn; */
|
||||
modesettingPtr ms = modesettingPTR(crtc->scrn);
|
||||
drmModeCrtcPtr drm_crtc = crtcp->drm_crtc;
|
||||
|
||||
switch (mode) {
|
||||
case DPMSModeOn:
|
||||
@@ -93,6 +94,7 @@ crtc_dpms(xf86CrtcPtr crtc, int mode)
|
||||
* another dpms call, so don't release the scanout pixmap ref.
|
||||
*/
|
||||
if (!crtc->enabled && crtcp->entry.pixmap) {
|
||||
drmModeSetCrtc(ms->fd, drm_crtc->crtc_id, 0, 0, 0, NULL, 0, NULL);
|
||||
vmwgfx_scanout_unref(&crtcp->entry);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user