Commit 88bc02bf authored by Dave Airlie's avatar Dave Airlie

xf86/crtc: add new interface to detach slave crtcs

This will detach any scanout pixmaps attached to slave crtcs.
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 9b8217f9
...@@ -3228,3 +3228,23 @@ xf86ProviderSetup(ScrnInfoPtr scrn, ...@@ -3228,3 +3228,23 @@ xf86ProviderSetup(ScrnInfoPtr scrn,
#endif #endif
} }
void
xf86DetachAllCrtc(ScrnInfoPtr scrn)
{
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
int i;
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];
if (crtc->randr_crtc)
RRCrtcDetachScanoutPixmap(crtc->randr_crtc);
/* dpms off */
(*crtc->funcs->dpms) (crtc, DPMSModeOff);
/* force a reset the next time its used */
crtc->randr_crtc->mode = NULL;
crtc->mode.HDisplay = 0;
crtc->x = crtc->y = 0;
}
}
...@@ -1014,4 +1014,7 @@ extern _X_EXPORT void ...@@ -1014,4 +1014,7 @@ extern _X_EXPORT void
xf86ProviderSetup(ScrnInfoPtr scrn, xf86ProviderSetup(ScrnInfoPtr scrn,
const xf86ProviderFuncsRec * funcs, const char *name); const xf86ProviderFuncsRec * funcs, const char *name);
extern _X_EXPORT void
xf86DetachAllCrtc(ScrnInfoPtr scrn);
#endif /* _XF86CRTC_H_ */ #endif /* _XF86CRTC_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment