[Nouveau] [PATCH 2/4] i915: fall back to ACPI EDID retrieval
Daniel Dadap
ddadap at nvidia.com
Mon Jul 27 20:53:55 UTC 2020
Fall back to retrieving the EDID via the ACPI _DDC method, when present
for notebook internal panels, when EDID retrieval via the standard EDID
paths is unsuccessful.
Signed-off-by: Daniel Dadap <ddadap at nvidia.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 8 +++++++-
drivers/gpu/drm/i915/display/intel_lvds.c | 4 ++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 804b1d966f66..ff402cef8183 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5657,6 +5657,7 @@ static struct edid *
intel_dp_get_edid(struct intel_dp *intel_dp)
{
struct intel_connector *intel_connector = intel_dp->attached_connector;
+ struct edid *edid;
/* use cached edid if we have one */
if (intel_connector->edid) {
@@ -5666,8 +5667,13 @@ intel_dp_get_edid(struct intel_dp *intel_dp)
return drm_edid_duplicate(intel_connector->edid);
} else
- return drm_get_edid(&intel_connector->base,
+ edid = drm_get_edid(&intel_connector->base,
&intel_dp->aux.ddc);
+
+ if (!edid && intel_dp_is_edp(intel_dp))
+ edid = drm_get_edid_acpi();
+
+ return edid;
}
static void
diff --git a/drivers/gpu/drm/i915/display/intel_lvds.c b/drivers/gpu/drm/i915/display/intel_lvds.c
index 9a067effcfa0..811eea3f5d9f 100644
--- a/drivers/gpu/drm/i915/display/intel_lvds.c
+++ b/drivers/gpu/drm/i915/display/intel_lvds.c
@@ -946,6 +946,10 @@ void intel_lvds_init(struct drm_i915_private *dev_priv)
else
edid = drm_get_edid(connector,
intel_gmbus_get_adapter(dev_priv, pin));
+
+ if (!edid)
+ edid = drm_get_edid_acpi();
+
if (edid) {
if (drm_add_edid_modes(connector, edid)) {
drm_connector_update_edid_property(connector,
--
2.18.4
More information about the Nouveau
mailing list