Dave Airlie <[email protected]> writes: > From: Dave Airlie <[email protected]> > > This just hooks up a simple role change to go from unattached > to slave output and back. > > Signed-off-by: Dave Airlie <[email protected]> > --- > hw/xfree86/modes/xf86RandR12.c | 27 ++++++++++++++++++++++++++- > 1 file changed, 26 insertions(+), 1 deletion(-) > > diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c > index 78cad63..5a85ed1 100644 > --- a/hw/xfree86/modes/xf86RandR12.c > +++ b/hw/xfree86/modes/xf86RandR12.c > @@ -1763,7 +1763,32 @@ xf86RandR15ProviderSetRole(ScreenPtr pScreen, > RRProviderPtr provider, > uint32_t new_role) > { > - /* do nothing so far */ > + ScreenPtr master; > + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); > + > + master = pScreen->current_master; > + > + assert(!master->isGPU); > + SetRootClip(master, FALSE); > + > + if (new_role == RR_Role_Slave_Output) { > + if (provider->current_role == 0) > + DetachUnboundGPU(pScreen); > + AttachOutputGPU(master, pScreen);
Perhaps what's needed is for there to be a generic DetachGPU function which pulls the provider out of whatever screen list it's currently in. Otherwise, switching a slave from one master to another will break stuff badly. -- [email protected]
pgpIlQX62WKMr.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
