aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-01-17 14:21:45 -0500
committerLyude Paul <lyude@redhat.com>2018-03-06 17:56:29 -0500
commit1b2cb026dc8b6f5cc4043031896a27745ad6f898 (patch)
treebb25f6c2b601eb3caa6a756c681d9b4f5d6c39b6
parent470e7c6189dbce4c0d1beb8cce7e38a9bd5f5144 (diff)
drm/i915: Convert intel_hpd_irq_event() into an encoder hotplug hook
Allow encoders to customize their hotplug processing by moving the intel_hpd_irq_event() code into an encoder hotplug vfunc. Currently only SDVO needs this to re-enable hotplug signalling in the SDVO chip. We'll use this same hook for DP/HDMI link management later. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180117192149.17760-1-ville.syrjala@linux.intel.com
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 0c14d1c04cbd..96e213ec202d 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1705,7 +1705,15 @@ static void intel_sdvo_enable_hotplug(struct intel_encoder *encoder)
1705 struct intel_sdvo *intel_sdvo = to_sdvo(encoder); 1705 struct intel_sdvo *intel_sdvo = to_sdvo(encoder);
1706 1706
1707 intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_ACTIVE_HOT_PLUG, 1707 intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_ACTIVE_HOT_PLUG,
1708 &intel_sdvo->hotplug_active, 2); 1708 &intel_sdvo->hotplug_active, 2);
1709}
1710
1711static bool intel_sdvo_hotplug(struct intel_encoder *encoder,
1712 struct intel_connector *connector)
1713{
1714 intel_sdvo_enable_hotplug(encoder);
1715
1716 return intel_encoder_hotplug(encoder, connector);
1709} 1717}
1710 1718
1711static bool 1719static bool
@@ -2516,7 +2524,7 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device)
2516 * Some SDVO devices have one-shot hotplug interrupts. 2524 * Some SDVO devices have one-shot hotplug interrupts.
2517 * Ensure that they get re-enabled when an interrupt happens. 2525 * Ensure that they get re-enabled when an interrupt happens.
2518 */ 2526 */
2519 intel_encoder->hot_plug = intel_sdvo_enable_hotplug; 2527 intel_encoder->hotplug = intel_sdvo_hotplug;
2520 intel_sdvo_enable_hotplug(intel_encoder); 2528 intel_sdvo_enable_hotplug(intel_encoder);
2521 } else { 2529 } else {
2522 intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT; 2530 intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;