Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c31c4ba3 authored by Keith Packard's avatar Keith Packard
Browse files

drm/i915: add per-output hotplug callback for KMS



This allows each output to deal with plug/unplug events as needed.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
parent 308cd3a2
Loading
Loading
Loading
Loading
+11 −1
Original line number Original line Diff line number Diff line
@@ -232,7 +232,17 @@ static void i915_hotplug_work_func(struct work_struct *work)
	drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t,
	drm_i915_private_t *dev_priv = container_of(work, drm_i915_private_t,
						    hotplug_work);
						    hotplug_work);
	struct drm_device *dev = dev_priv->dev;
	struct drm_device *dev = dev_priv->dev;
	struct drm_mode_config *mode_config = &dev->mode_config;
	struct drm_connector *connector;


	if (mode_config->num_connector) {
		list_for_each_entry(connector, &mode_config->connector_list, head) {
			struct intel_output *intel_output = to_intel_output(connector);
	
			if (intel_output->hot_plug)
				(*intel_output->hot_plug) (intel_output);
		}
	}
	/* Just fire off a uevent and let userspace tell us what to do */
	/* Just fire off a uevent and let userspace tell us what to do */
	drm_sysfs_hotplug_event(dev);
	drm_sysfs_hotplug_event(dev);
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -83,6 +83,7 @@ struct intel_output {
	bool load_detect_temp;
	bool load_detect_temp;
	bool needs_tv_clock;
	bool needs_tv_clock;
	void *dev_priv;
	void *dev_priv;
	void (*hot_plug)(struct intel_output *);
};
};


struct intel_crtc {
struct intel_crtc {