drmmode: Destroy the output on shutdown

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2010-07-09 14:06:43 +01:00
parent 6ff369cd26
commit 5ce3f536b7
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -278,6 +278,7 @@ typedef struct intel_screen_private {
long FbMapSize;
long GTTMapSize;
xf86OutputPtr output;
xf86CrtcPtr crtc;
drm_intel_bo *front_buffer;