[v2] drm/i915: Support HDMI EDID injection

Submitted by marius vlad on Feb. 3, 2016, 4:49 p.m.

Details

Message ID 1454518149-10421-1-git-send-email-marius.c.vlad@intel.com
State New
Headers show
Series "drm/i915: Support HDMI EDID injection" ( rev: 2 ) in Intel GFX

Not browsing as part of any series.

Commit Message

marius vlad Feb. 3, 2016, 4:49 p.m.
Make a copy of drm_property_blob data for user-supplied EDID blobs.

v2: Allocate and memcopy drm_property_blob->data instead of pointing
to it.

Signed-off-by: Marius Vlad <marius.c.vlad@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 8698a64..4c9bb5f 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1355,6 +1355,16 @@  intel_hdmi_set_edid(struct drm_connector *connector, bool force)
 				    intel_gmbus_get_adapter(dev_priv,
 				    intel_hdmi->ddc_bus));
 
+		/*
+		 * Use the user-supplied EDID blob in case we don't have an
+		 * EDID from the display.
+		 */
+		if (!edid && connector->override_edid) {
+			edid = kmemdup(connector->edid_blob_ptr->data,
+				       connector->edid_blob_ptr->length,
+				       GFP_KERNEL);
+		}
+
 		intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS);
 	}