drm/i915: call drm_encoder_init first

Later initialisation of the encoder often requires that
drm_encoder_init() has already been called, for instance, initialiasing
the DDC buses.

Yet another recent regression, as 819f3fb7 depended upon these fixes
which I missed when cherry-picking.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2010-09-15 12:03:59 +01:00
parent 2f551c8456
commit 373a3cf744
4 changed files with 18 additions and 12 deletions

View File

@@ -548,6 +548,10 @@ void intel_crt_init(struct drm_device *dev)
if (!intel_encoder->ddc_bus) {
dev_printk(KERN_ERR, &dev->pdev->dev, "DDC bus registration "
"failed.\n");
drm_connector_cleanup(&intel_connector->base);
kfree(intel_connector);
drm_encoder_cleanup(&intel_encoder->base);
kfree(intel_encoder);
return;
}