Commit f2684f44 authored by Lyude's avatar Lyude Committed by Tim Gardner

drm/i915/vlv: Make intel_crt_reset() per-encoder

BugLink: http://bugs.launchpad.net/bugs/1616894

This lets call intel_crt_reset() in contexts where IRQs are disabled and
as such, can't hold the locks required to work with the connectors.

Cc: stable@vger.kernel.org
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarLyude <cpaul@redhat.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit 28cf71ce)
(backported from commit 4570d833)
Signed-off-by: default avatarTimo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Acked-by: default avatarKamal Mostafa <kamal@canonical.com>
parent b7d07601
...@@ -708,11 +708,11 @@ static int intel_crt_set_property(struct drm_connector *connector, ...@@ -708,11 +708,11 @@ static int intel_crt_set_property(struct drm_connector *connector,
return 0; return 0;
} }
static void intel_crt_reset(struct drm_connector *connector) static void intel_crt_reset(struct drm_encoder *encoder)
{ {
struct drm_device *dev = connector->dev; struct drm_device *dev = encoder->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crt *crt = intel_attached_crt(connector); struct intel_crt *crt = intel_encoder_to_crt(to_intel_encoder(encoder));
if (INTEL_INFO(dev)->gen >= 5) { if (INTEL_INFO(dev)->gen >= 5) {
u32 adpa; u32 adpa;
...@@ -734,7 +734,6 @@ static void intel_crt_reset(struct drm_connector *connector) ...@@ -734,7 +734,6 @@ static void intel_crt_reset(struct drm_connector *connector)
*/ */
static const struct drm_connector_funcs intel_crt_connector_funcs = { static const struct drm_connector_funcs intel_crt_connector_funcs = {
.reset = intel_crt_reset,
.dpms = drm_atomic_helper_connector_dpms, .dpms = drm_atomic_helper_connector_dpms,
.detect = intel_crt_detect, .detect = intel_crt_detect,
.fill_modes = drm_helper_probe_single_connector_modes, .fill_modes = drm_helper_probe_single_connector_modes,
...@@ -752,6 +751,7 @@ static const struct drm_connector_helper_funcs intel_crt_connector_helper_funcs ...@@ -752,6 +751,7 @@ static const struct drm_connector_helper_funcs intel_crt_connector_helper_funcs
}; };
static const struct drm_encoder_funcs intel_crt_enc_funcs = { static const struct drm_encoder_funcs intel_crt_enc_funcs = {
.reset = intel_crt_reset,
.destroy = intel_encoder_destroy, .destroy = intel_encoder_destroy,
}; };
...@@ -876,5 +876,5 @@ void intel_crt_init(struct drm_device *dev) ...@@ -876,5 +876,5 @@ void intel_crt_init(struct drm_device *dev)
dev_priv->fdi_rx_config = I915_READ(FDI_RX_CTL(PIPE_A)) & fdi_config; dev_priv->fdi_rx_config = I915_READ(FDI_RX_CTL(PIPE_A)) & fdi_config;
} }
intel_crt_reset(connector); intel_crt_reset(&crt->base.base);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment