2212,7 → 2212,6 |
connector->connector_type = DRM_MODE_CONNECTOR_HDMIA; |
intel_sdvo->is_hdmi = true; |
} |
intel_sdvo->base.cloneable = true; |
|
intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo); |
if (intel_sdvo->is_hdmi) |
2243,7 → 2242,6 |
|
intel_sdvo->is_tv = true; |
intel_sdvo->base.needs_tv_clock = true; |
intel_sdvo->base.cloneable = false; |
|
intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo); |
|
2286,8 → 2284,6 |
intel_sdvo_connector->output_flag = SDVO_OUTPUT_RGB1; |
} |
|
intel_sdvo->base.cloneable = true; |
|
intel_sdvo_connector_init(intel_sdvo_connector, |
intel_sdvo); |
return true; |
2318,9 → 2314,6 |
intel_sdvo_connector->output_flag = SDVO_OUTPUT_LVDS1; |
} |
|
/* SDVO LVDS is not cloneable because the input mode gets adjusted by the encoder */ |
intel_sdvo->base.cloneable = false; |
|
intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo); |
if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector)) |
goto err; |
2393,6 → 2386,18 |
return true; |
} |
|
static void intel_sdvo_output_cleanup(struct intel_sdvo *intel_sdvo) |
{ |
struct drm_device *dev = intel_sdvo->base.base.dev; |
struct drm_connector *connector, *tmp; |
|
list_for_each_entry_safe(connector, tmp, |
&dev->mode_config.connector_list, head) { |
if (intel_attached_encoder(connector) == &intel_sdvo->base) |
intel_sdvo_destroy(connector); |
} |
} |
|
static bool intel_sdvo_tv_create_property(struct intel_sdvo *intel_sdvo, |
struct intel_sdvo_connector *intel_sdvo_connector, |
int type) |
2716,9 → 2721,20 |
intel_sdvo->caps.output_flags) != true) { |
DRM_DEBUG_KMS("SDVO output failed to setup on %s\n", |
SDVO_NAME(intel_sdvo)); |
goto err; |
/* Output_setup can leave behind connectors! */ |
goto err_output; |
} |
|
/* |
* Cloning SDVO with anything is often impossible, since the SDVO |
* encoder can request a special input timing mode. And even if that's |
* not the case we have evidence that cloning a plain unscaled mode with |
* VGA doesn't really work. Furthermore the cloning flags are way too |
* simplistic anyway to express such constraints, so just give up on |
* cloning for SDVO encoders. |
*/ |
intel_sdvo->base.cloneable = false; |
|
/* Only enable the hotplug irq if we need it, to work around noisy |
* hotplug lines. |
*/ |
2729,12 → 2745,12 |
|
/* Set the input timing to the screen. Assume always input 0. */ |
if (!intel_sdvo_set_target_input(intel_sdvo)) |
goto err; |
goto err_output; |
|
if (!intel_sdvo_get_input_pixel_clock_range(intel_sdvo, |
&intel_sdvo->pixel_clock_min, |
&intel_sdvo->pixel_clock_max)) |
goto err; |
goto err_output; |
|
DRM_DEBUG_KMS("%s device VID/DID: %02X:%02X.%02X, " |
"clock range %dMHz - %dMHz, " |
2754,6 → 2770,9 |
(SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N'); |
return true; |
|
err_output: |
intel_sdvo_output_cleanup(intel_sdvo); |
|
err: |
drm_encoder_cleanup(&intel_encoder->base); |
// i2c_del_adapter(&intel_sdvo->ddc); |