[PATCH v2 3/8] randr: Add ability to turn PRIME sync off
Alex Goins
agoins at nvidia.com
Fri Jan 15 17:53:22 PST 2016
Thanks Adam.
> > +static void
> > +RRFiniPrimeSyncProps(ScreenPtr pScreen)
> > +{
> > + rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
> > + int i;
> > +
> > + const char *syncStr = PRIME_SYNC_PROP;
> > + Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE);
> > + if (syncProp == None)
> > + return;
> > +
> > + for (i = 0; i < pScrPriv->numOutputs; i++) {
> > + RRDeleteOutputProperty(pScrPriv->outputs[i], syncProp);
> > + }
> > +}
>
> This is sort of academic, but you're tearing down the output prop for
> every output, which isn't really correct if we ever had different
> sources for different outputs. That's not really an issue since the
> old per-crtc scanout pixmap work never landed [1], so we still have the
> notion of _the_ screen pixmap.
>
> But I suppose if we ever _did_ try to make that go, you could set the
> property value to the XID of the source you wanted, and for
> compatibility TRUE would mean "pick one". And at that point we'd have
> enough info to walk backwards to detach only the right properties at
> provider destroy.
Good point. I will take this into account in the next revision, to avoid
introducing a potential future bug.
Thanks,
Alex
More information about the xorg-devel
mailing list