aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-11-26 13:45:59 -0500
committerDave Airlie <airlied@redhat.com>2010-11-29 01:27:57 -0500
commitc5027dec02c96964847fa68d512318ee5f6f7a19 (patch)
tree185fdc72db34190a9f1da054a42890124472b85d /drivers/gpu
parentbf9dc102e284a5aa78c73fc9d72e11d5ccd8669f (diff)
drm: record monitor status in output_poll_execute
In order to correctly report monitor connected status changes, the previous monitor status must be recorded in the connector->status value instead of being discarded. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 232ee931b4da..7ca59359fee2 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -848,7 +848,7 @@ static void output_poll_execute(struct work_struct *work)
848 struct delayed_work *delayed_work = to_delayed_work(work); 848 struct delayed_work *delayed_work = to_delayed_work(work);
849 struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_work); 849 struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_work);
850 struct drm_connector *connector; 850 struct drm_connector *connector;
851 enum drm_connector_status old_status, status; 851 enum drm_connector_status old_status;
852 bool repoll = false, changed = false; 852 bool repoll = false, changed = false;
853 853
854 if (!drm_kms_helper_poll) 854 if (!drm_kms_helper_poll)
@@ -873,8 +873,9 @@ static void output_poll_execute(struct work_struct *work)
873 !(connector->polled & DRM_CONNECTOR_POLL_HPD)) 873 !(connector->polled & DRM_CONNECTOR_POLL_HPD))
874 continue; 874 continue;
875 875
876 status = connector->funcs->detect(connector, false); 876 connector->status = connector->funcs->detect(connector, false);
877 if (old_status != status) 877 DRM_DEBUG_KMS("connector status updated to %d\n", connector->status);
878 if (old_status != connector->status)
878 changed = true; 879 changed = true;
879 } 880 }
880 881