+static void i915_hotplug_tv(struct drm_device *dev)
+{
+ struct drm_output *output;
+ struct intel_output *iout;
+ enum drm_output_status status;
+
+ mutex_lock(&dev->mode_config.mutex);
+
+ /* find the crt output */
+ list_for_each_entry(output, &dev->mode_config.output_list, head) {
+ iout = output->driver_private;
+ if (iout->type == INTEL_OUTPUT_TVOUT)
+ break;
+ else
+ iout = 0;
+ }
+
+ if (iout == 0)
+ goto unlock;
+
+ /* may need to I915_WRITE(TVDAC, 1<<31) to ack the interrupt */
+ status = output->funcs->detect(output);
+ drm_hotplug_stage_two(dev, output,
+ status == output_status_connected ? 1 : 0);
+
+unlock:
+ mutex_unlock(&dev->mode_config.mutex);
+}
+