Skip to content

Commit

Permalink
drm: record monitor status in output_poll_execute
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Keith Packard authored and Dave Airlie committed Nov 29, 2010
1 parent bf9dc10 commit c5027de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/gpu/drm/drm_crtc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ static void output_poll_execute(struct work_struct *work)
struct delayed_work *delayed_work = to_delayed_work(work);
struct drm_device *dev = container_of(delayed_work, struct drm_device, mode_config.output_poll_work);
struct drm_connector *connector;
enum drm_connector_status old_status, status;
enum drm_connector_status old_status;
bool repoll = false, changed = false;

if (!drm_kms_helper_poll)
Expand All @@ -873,8 +873,9 @@ static void output_poll_execute(struct work_struct *work)
!(connector->polled & DRM_CONNECTOR_POLL_HPD))
continue;

status = connector->funcs->detect(connector, false);
if (old_status != status)
connector->status = connector->funcs->detect(connector, false);
DRM_DEBUG_KMS("connector status updated to %d\n", connector->status);
if (old_status != connector->status)
changed = true;
}

Expand Down

0 comments on commit c5027de

Please sign in to comment.