projects
/
profile
/
ivi
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ffb89d4
)
drm: check edid data, so we deal well with broken driver.
author
Jerome Glisse
<glisse@freedesktop.org>
Fri, 9 Nov 2007 16:28:56 +0000
(17:28 +0100)
committer
Jerome Glisse
<glisse@freedesktop.org>
Fri, 9 Nov 2007 16:28:56 +0000
(17:28 +0100)
linux-core/drm_edid.c
patch
|
blob
|
history
diff --git
a/linux-core/drm_edid.c
b/linux-core/drm_edid.c
index
b8eee1a
..
7068cef
100644
(file)
--- a/
linux-core/drm_edid.c
+++ b/
linux-core/drm_edid.c
@@
-469,6
+469,14
@@
int drm_add_edid_modes(struct drm_output *output, struct edid *edid)
{
int num_modes = 0;
+ if (edid == NULL) {
+ return 0;
+ }
+ if (!edid_valid(edid)) {
+ dev_warn(&output->dev->pdev->dev, "%s: EDID invalid.\n",
+ output->name);
+ return 0;
+ }
num_modes += add_established_modes(output, edid);
num_modes += add_standard_modes(output, edid);
num_modes += add_detailed_info(output, edid);