summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-07-09 14:06:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-07-09 14:12:43 +0100
commit5ce3f536b7169a1ee9eadf830e61bab230dd7239 (patch)
treea77be094b322105c0e295e622cf7ef79a695c08b /src
parent6ff369cd2602497ee11273b50f76d1a7bf25991d (diff)
drmmode: Destroy the output on shutdown
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/drmmode_display.c9
-rw-r--r--src/intel.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 906cd71a..37463ffa 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1194,6 +1194,7 @@ static const char *output_names[] = { "None",
static void
drmmode_output_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, int num)
{
+ intel_screen_private *intel = intel_get_screen_private(scrn);
xf86OutputPtr output;
drmModeConnectorPtr koutput;
drmModeEncoderPtr kencoder;
@@ -1256,7 +1257,8 @@ drmmode_output_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, int num)
output->possible_crtcs = kencoder->possible_crtcs;
output->possible_clones = kencoder->possible_clones;
- return;
+
+ intel->output = output;
}
static Bool
@@ -1494,6 +1496,11 @@ drmmode_close_screen(intel_screen_private *intel)
xf86CrtcDestroy(intel->crtc);
intel->crtc = NULL;
}
+
+ if (intel->output) {
+ xf86OutputDestroy(intel->output);
+ intel->output = NULL;
+ }
}
int
diff --git a/src/intel.h b/src/intel.h
index bd24708d..5342dca1 100644
--- a/src/intel.h
+++ b/src/intel.h
@@ -278,6 +278,7 @@ typedef struct intel_screen_private {
long FbMapSize;
long GTTMapSize;
+ xf86OutputPtr output;
xf86CrtcPtr crtc;
drm_intel_bo *front_buffer;