[PATCH] drm: ignore disconnected <-> unknown status changes

From: Knut Petersen
Date: Thu Aug 02 2012 - 02:52:04 EST


Only generate a hotplug event if the status changed
to / from connector_status_connected.

On some hardware the connector status is oscillating
between disconnected and unknown, and the hotplug
events mirroring these transitions cause screen
distortions. As the only reasonable action on such
a status change is to ignore it, it also is safe
not to genereate a hotplug event at all.

Needed for / tested on AOpen i915GMm-hfs mobo.

Signed-off-by: Knut Petersen <Knut_Petersen@xxxxxxxxxxx>
---
drivers/gpu/drm/drm_crtc_helper.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 3252e70..fb6160b 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -954,7 +954,11 @@ static void output_poll_execute(struct work_struct *work)
connector->base.id,
drm_get_connector_name(connector),
old_status, connector->status);
- if (old_status != connector->status)
+ /* changes are only relevant if previous or
+ current status is connector_status_connected */
+ if (old_status != connector->status &&
+ (old_status == connector_status_connected ||
+ connector->status == connector_status_connected))
changed = true;
}

--
1.7.7


--------------090608040106050907050606--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/