diff mbox

[23/23] drm/i915: Make force_load_detect effective even w/ DMI quirks/hotplug

Message ID 20180322152313.6561-24-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä March 22, 2018, 3:23 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

When doing forced load detection testing we should totally ignore any
hotplug status for the connector. This is mostly relevant for machines
where we already ignore the hotplug status based on the DMI quirks. On
other machines we would currently skip the force load detection tests
on account of the connector already being connected.

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

Comments

Maarten Lankhorst March 22, 2018, 4:49 p.m. UTC | #1
Op 22-03-18 om 16:23 schreef Ville Syrjala:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> When doing forced load detection testing we should totally ignore any
> hotplug status for the connector. This is mostly relevant for machines
> where we already ignore the hotplug status based on the DMI quirks. On
> other machines we would currently skip the force load detection tests
> on account of the connector already being connected.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_crt.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
> index c0a8805b277f..ee2324bba82e 100644
> --- a/drivers/gpu/drm/i915/intel_crt.c
> +++ b/drivers/gpu/drm/i915/intel_crt.c
> @@ -748,6 +748,11 @@ intel_crt_detect(struct drm_connector *connector,
>  		      connector->base.id, connector->name,
>  		      force);
>  
> +	if (i915_modparams.load_detect_test) {
> +		intel_display_power_get(dev_priv, intel_encoder->power_domain);
> +		goto load_detect;
> +	}
> +
>  	/* Skip machines without VGA that falsely report hotplug events */
>  	if (dmi_check_system(intel_spurious_crt_detect))
>  		return connector_status_disconnected;
> @@ -781,6 +786,7 @@ intel_crt_detect(struct drm_connector *connector,
>  		goto out;
>  	}
>  
> +load_detect:
>  	if (!force) {
>  		status = connector->status;
>  		goto out;

This makes another reference to load_detect_test obsolete, the other one should be removed since its unreachable now. :)

~Maarten
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index c0a8805b277f..ee2324bba82e 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -748,6 +748,11 @@  intel_crt_detect(struct drm_connector *connector,
 		      connector->base.id, connector->name,
 		      force);
 
+	if (i915_modparams.load_detect_test) {
+		intel_display_power_get(dev_priv, intel_encoder->power_domain);
+		goto load_detect;
+	}
+
 	/* Skip machines without VGA that falsely report hotplug events */
 	if (dmi_check_system(intel_spurious_crt_detect))
 		return connector_status_disconnected;
@@ -781,6 +786,7 @@  intel_crt_detect(struct drm_connector *connector,
 		goto out;
 	}
 
+load_detect:
 	if (!force) {
 		status = connector->status;
 		goto out;