• Aaron Plattner's avatar
    xfree86: detach scanout pixmaps when detaching output GPUs · bdd1e22c
    Aaron Plattner authored
    Commit 8f4640bd fixed a bit of a
    chicken-and-egg problem by detaching GPU screens when their providers
    are destroyed, which happens before CloseScreen is called.  However,
    this created a new problem: the GPU screen tears down its RandR crtc
    objects during CloseScreen and if one of them is active, it tries to
    detach the scanout pixmap then.  This crashes because
    RRCrtcDetachScanoutPixmap tries to get the master screen's screen
    pixmap, but crtc->pScreen->current_master is already NULL at that
    It doesn't make sense for an unbound GPU screen to still be scanning
    out its former master screen's pixmap, so detach them first when the
    provider is destroyed.
    Signed-off-by: Aaron Plattner's avatarAaron Plattner <aplattner@nvidia.com>
    Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
    Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
xf86RandR12.c 59.6 KB