drm/i915: Fix the old vs. new epoch counter check during hotplug detect
The old epoch counter was left uninited, so the function returned a
changed state always.
While at it debug print the old epoch counter as well.
Fixes: 35205ee9ba
("drm/i915: Send hotplug event if edid had changed")
Cc: Kunal Joshi <kunal1.joshi@intel.com>
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200701180001.15857-1-imre.deak@intel.com
This commit is contained in:
parent
cdf01268bc
commit
c3bad0c7e5
|
@ -279,6 +279,7 @@ intel_encoder_hotplug(struct intel_encoder *encoder,
|
||||||
|
|
||||||
drm_WARN_ON(dev, !mutex_is_locked(&dev->mode_config.mutex));
|
drm_WARN_ON(dev, !mutex_is_locked(&dev->mode_config.mutex));
|
||||||
old_status = connector->base.status;
|
old_status = connector->base.status;
|
||||||
|
old_epoch_counter = connector->base.epoch_counter;
|
||||||
|
|
||||||
connector->base.status =
|
connector->base.status =
|
||||||
drm_helper_probe_detect(&connector->base, NULL, false);
|
drm_helper_probe_detect(&connector->base, NULL, false);
|
||||||
|
@ -287,11 +288,12 @@ intel_encoder_hotplug(struct intel_encoder *encoder,
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s(epoch counter %llu)\n",
|
DRM_DEBUG_KMS("[CONNECTOR:%d:%s] status updated from %s to %s (epoch counter %llu->%llu)\n",
|
||||||
connector->base.base.id,
|
connector->base.base.id,
|
||||||
connector->base.name,
|
connector->base.name,
|
||||||
drm_get_connector_status_name(old_status),
|
drm_get_connector_status_name(old_status),
|
||||||
drm_get_connector_status_name(connector->base.status),
|
drm_get_connector_status_name(connector->base.status),
|
||||||
|
old_epoch_counter,
|
||||||
connector->base.epoch_counter);
|
connector->base.epoch_counter);
|
||||||
return INTEL_HOTPLUG_CHANGED;
|
return INTEL_HOTPLUG_CHANGED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue