diff options
author | Keith Packard <keithp@keithp.com> | 2012-08-07 17:49:48 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-08-14 17:14:55 -0700 |
commit | c0540b4c8db676d18a9a09828f1590b0b16f9ebc (patch) | |
tree | 9dd8611c4ec049259558a812a61104883f87f261 | |
parent | 288b87e42cbb5db34cda848143655e84af8455da (diff) |
Kludge -- Call RandR screen before cleaning up xf86 crtcs
The core RandR screen cleanup now involves cleaning up any GPU screen
associations, and those call down into DDX to clean up the driver. If
the pointers from the xf86 structures back to the core randr
structures are set to NULL at that point, bad things happen.
This patch "knows" that the core RandR close screen is underneath the
xf86 randr close screen function, and so makes sure it gets called
first.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index 154f684c4..1947c5be9 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -726,6 +726,12 @@ xf86CrtcCloseScreen(ScreenPtr screen) xf86RotateCloseScreen(screen); + xf86RandR12CloseScreen(screen); + + free(config->name); + + screen->CloseScreen(screen); + for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; @@ -749,10 +755,7 @@ xf86CrtcCloseScreen(ScreenPtr screen) else if (screen->current_master) DetachUnboundGPU(screen); } - xf86RandR12CloseScreen(screen); - - free(config->name); - return screen->CloseScreen(screen); + return TRUE; } /* |