[03/11] drm/i915/crt: Configure connector->polled and encoder->hpd_pin consistently
diff mbox series

Message ID 20200121171100.4370-4-ville.syrjala@linux.intel.com
State New
Headers show
Series
  • drm/i915: Hotplug cleanups
Related show

Commit Message

Ville Syrjälä Jan. 21, 2020, 5:10 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Let's make sure encoder->hpd_pin and connector->polled are mirror
images of each other (when we want to use polling). The other
potentially polled connectors (sdvo and tv) already get this right.

Also nuke the rudundant force_hotplug_required initialization
(the thing is kzalloc()ed).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_crt.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

Comments

Jani Nikula Jan. 28, 2020, 8:23 a.m. UTC | #1
On Tue, 21 Jan 2020, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Let's make sure encoder->hpd_pin and connector->polled are mirror
> images of each other (when we want to use polling). The other
> potentially polled connectors (sdvo and tv) already get this right.
>
> Also nuke the rudundant force_hotplug_required initialization
> (the thing is kzalloc()ed).
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_crt.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_crt.c b/drivers/gpu/drm/i915/display/intel_crt.c
> index f976b800b245..ba8f92c1ead9 100644
> --- a/drivers/gpu/drm/i915/display/intel_crt.c
> +++ b/drivers/gpu/drm/i915/display/intel_crt.c
> @@ -1027,6 +1027,8 @@ void intel_crt_init(struct drm_i915_private *dev_priv)
>  	    !dmi_check_system(intel_spurious_crt_detect)) {
>  		crt->base.hpd_pin = HPD_CRT;
>  		crt->base.hotplug = intel_encoder_hotplug;
> +	} else {
> +		intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT;
>  	}
>  
>  	if (HAS_DDI(dev_priv)) {
> @@ -1057,14 +1059,6 @@ void intel_crt_init(struct drm_i915_private *dev_priv)
>  
>  	drm_connector_helper_add(connector, &intel_crt_connector_helper_funcs);
>  
> -	if (!I915_HAS_HOTPLUG(dev_priv))
> -		intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT;
> -
> -	/*
> -	 * Configure the automatic hotplug detection stuff
> -	 */
> -	crt->force_hotplug_required = false;
> -
>  	/*
>  	 * TODO: find a proper way to discover whether we need to set the the
>  	 * polarity and link reversal bits or not, instead of relying on the

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_crt.c b/drivers/gpu/drm/i915/display/intel_crt.c
index f976b800b245..ba8f92c1ead9 100644
--- a/drivers/gpu/drm/i915/display/intel_crt.c
+++ b/drivers/gpu/drm/i915/display/intel_crt.c
@@ -1027,6 +1027,8 @@  void intel_crt_init(struct drm_i915_private *dev_priv)
 	    !dmi_check_system(intel_spurious_crt_detect)) {
 		crt->base.hpd_pin = HPD_CRT;
 		crt->base.hotplug = intel_encoder_hotplug;
+	} else {
+		intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT;
 	}
 
 	if (HAS_DDI(dev_priv)) {
@@ -1057,14 +1059,6 @@  void intel_crt_init(struct drm_i915_private *dev_priv)
 
 	drm_connector_helper_add(connector, &intel_crt_connector_helper_funcs);
 
-	if (!I915_HAS_HOTPLUG(dev_priv))
-		intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT;
-
-	/*
-	 * Configure the automatic hotplug detection stuff
-	 */
-	crt->force_hotplug_required = false;
-
 	/*
 	 * TODO: find a proper way to discover whether we need to set the the
 	 * polarity and link reversal bits or not, instead of relying on the