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

Commit 930a9e28 authored by Chris Wilson's avatar Chris Wilson Committed by Dave Airlie
Browse files

drm: Use a nondestructive mode for output detect when polling (v2)



v2: Julien Cristau pointed out that @nondestructive results in
double-negatives and confusion when trying to interpret the parameter,
so use @force instead. Much easier to type as well. ;-)

And fix the miscompilation of vmgfx reported by Sedat Dilek.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent a41ceb1c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
		if (connector->funcs->force)
			connector->funcs->force(connector);
	} else {
		connector->status = connector->funcs->detect(connector, false);
		connector->status = connector->funcs->detect(connector, true);
		drm_kms_helper_poll_enable(dev);
	}

@@ -866,7 +866,7 @@ static void output_poll_execute(struct work_struct *work)
		    !(connector->polled & DRM_CONNECTOR_POLL_HPD))
			continue;

		status = connector->funcs->detect(connector, true);
		status = connector->funcs->detect(connector, false);
		if (old_status != status)
			changed = true;
	}
+2 −3
Original line number Diff line number Diff line
@@ -401,8 +401,7 @@ intel_crt_load_detect(struct drm_crtc *crtc, struct intel_encoder *intel_encoder
}

static enum drm_connector_status
intel_crt_detect(struct drm_connector *connector,
		 bool nondestructive)
intel_crt_detect(struct drm_connector *connector, bool force)
{
	struct drm_device *dev = connector->dev;
	struct drm_encoder *encoder = intel_attached_encoder(connector);
@@ -421,7 +420,7 @@ intel_crt_detect(struct drm_connector *connector,
	if (intel_crt_detect_ddc(encoder))
		return connector_status_connected;

	if (nondestructive)
	if (!force)
		return connector->status;

	/* for pre-945g platforms use load detect */
+1 −2
Original line number Diff line number Diff line
@@ -1386,8 +1386,7 @@ ironlake_dp_detect(struct drm_connector *connector)
 * \return false if DP port is disconnected.
 */
static enum drm_connector_status
intel_dp_detect(struct drm_connector *connector,
		bool nondestructive)
intel_dp_detect(struct drm_connector *connector, bool force)
{
	struct drm_encoder *encoder = intel_attached_encoder(connector);
	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
+1 −2
Original line number Diff line number Diff line
@@ -222,8 +222,7 @@ static void intel_dvo_mode_set(struct drm_encoder *encoder,
 * Unimplemented.
 */
static enum drm_connector_status
intel_dvo_detect(struct drm_connector *connector,
		 bool nondestructive)
intel_dvo_detect(struct drm_connector *connector, bool force)
{
	struct drm_encoder *encoder = intel_attached_encoder(connector);
	struct intel_dvo *intel_dvo = enc_to_intel_dvo(encoder);
+1 −2
Original line number Diff line number Diff line
@@ -139,8 +139,7 @@ static bool intel_hdmi_mode_fixup(struct drm_encoder *encoder,
}

static enum drm_connector_status
intel_hdmi_detect(struct drm_connector *connector,
		  bool nondestructive)
intel_hdmi_detect(struct drm_connector *connector, bool force)
{
	struct drm_encoder *encoder = intel_attached_encoder(connector);
	struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
Loading