blob: 28200724eda737f17ffac87e8627ee4e05be33eb [file] [log] [blame]
From e7c4d122bdcb3abe3fb63c54f783b7a402497573 Mon Sep 17 00:00:00 2001
From: Jani Nikula <jani.nikula@intel.com>
Date: Tue, 1 Oct 2013 10:38:54 +0300
Subject: drm/i915/dp: use drm_edid_duplicate
v2: duplicate intel_connector->edid, not uninitialized edid (Dave Airlie).
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 55e9edeb57ed9dd9be6773c5230187d701b14a46)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2988,19 +2988,11 @@ intel_dp_get_edid(struct drm_connector *
/* use cached edid if we have one */
if (intel_connector->edid) {
- struct edid *edid;
- int size;
-
/* invalid edid */
if (IS_ERR(intel_connector->edid))
return NULL;
- size = (intel_connector->edid->extensions + 1) * EDID_LENGTH;
- edid = kmemdup(intel_connector->edid, size, GFP_KERNEL);
- if (!edid)
- return NULL;
-
- return edid;
+ return drm_edid_duplicate(intel_connector->edid);
}
return drm_get_edid(connector, adapter);