From: Jani Nikula <jani.nikula@intel.com>
To: Dave Airlie <airlied@gmail.com>
Cc: jani.nikula@intel.com, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/i915/dp: use drm_edid_duplicate
Date: Tue, 1 Oct 2013 10:38:54 +0300 [thread overview]
Message-ID: <1380613134-16712-1-git-send-email-jani.nikula@intel.com> (raw)
In-Reply-To: <87bo394f2z.fsf@intel.com>
v2: duplicate intel_connector->edid, not uninitialized edid (Dave Airlie).
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 5614365..6030394 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2969,19 +2969,11 @@ intel_dp_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
/* 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);
--
1.7.9.5
next prev parent reply other threads:[~2013-10-01 7:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 12:08 [PATCH 1/3] drm/edid: add drm_edid_duplicate Jani Nikula
2013-09-27 12:08 ` [PATCH 2/3] drm/i915/dp: use drm_edid_duplicate Jani Nikula
2013-10-01 0:33 ` Dave Airlie
2013-10-01 7:37 ` [Intel-gfx] " Jani Nikula
2013-10-01 7:38 ` Jani Nikula [this message]
2013-10-09 5:30 ` [PATCH] " Dave Airlie
2013-09-27 12:08 ` [PATCH 3/3] drm/exynos: " Jani Nikula
2013-09-27 12:24 ` [PATCH 1/3] drm/edid: add drm_edid_duplicate Chris Wilson
2013-09-27 12:42 ` Damien Lespiau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380613134-16712-1-git-send-email-jani.nikula@intel.com \
--to=jani.nikula@intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).