mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
drm/probe-helper: Check epoch counter in output_poll_execute()
[ Upstream commitdc659a4e85] drm_helper_hpd_irq_event() checks the epoch counter to determine connector status change. This was introduced in commit5186421cbf("drm: Introduce epoch counter to drm_connector"). Do the same for output_poll_execute() so it can detect other changes beside connection status value changes. v2: - Add Fixes tag (Daniel) Fixes:5186421cbf("drm: Introduce epoch counter to drm_connector") Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210313112545.37527-3-noralf@tronnes.org Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a59d01384c
commit
0741a8f2e5
|
|
@ -623,6 +623,7 @@ static void output_poll_execute(struct work_struct *work)
|
||||||
struct drm_connector_list_iter conn_iter;
|
struct drm_connector_list_iter conn_iter;
|
||||||
enum drm_connector_status old_status;
|
enum drm_connector_status old_status;
|
||||||
bool repoll = false, changed;
|
bool repoll = false, changed;
|
||||||
|
u64 old_epoch_counter;
|
||||||
|
|
||||||
if (!dev->mode_config.poll_enabled)
|
if (!dev->mode_config.poll_enabled)
|
||||||
return;
|
return;
|
||||||
|
|
@ -659,8 +660,9 @@ static void output_poll_execute(struct work_struct *work)
|
||||||
|
|
||||||
repoll = true;
|
repoll = true;
|
||||||
|
|
||||||
|
old_epoch_counter = connector->epoch_counter;
|
||||||
connector->status = drm_helper_probe_detect(connector, NULL, false);
|
connector->status = drm_helper_probe_detect(connector, NULL, false);
|
||||||
if (old_status != connector->status) {
|
if (old_epoch_counter != connector->epoch_counter) {
|
||||||
const char *old, *new;
|
const char *old, *new;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -689,6 +691,9 @@ static void output_poll_execute(struct work_struct *work)
|
||||||
connector->base.id,
|
connector->base.id,
|
||||||
connector->name,
|
connector->name,
|
||||||
old, new);
|
old, new);
|
||||||
|
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] epoch counter %llu -> %llu\n",
|
||||||
|
connector->base.id, connector->name,
|
||||||
|
old_epoch_counter, connector->epoch_counter);
|
||||||
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user