summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_edid.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-06-21 17:47:44 +0900
committerPaul Mundt <lethal@linux-sh.org>2011-06-21 17:47:44 +0900
commit9dd056e9eba106ef622795b566f769a9ab0a49a8 (patch)
tree390c07ea2c3b9631c2e8fe64c1a6feba0b503e8b /drivers/gpu/drm/drm_edid.c
parent08ef2e427b59393d68a65b16e97e894b662a5573 (diff)
parentf2b9726105824fdeea32a339e5072a358f89a25b (diff)
downloadop-kernel-dev-9dd056e9eba106ef622795b566f769a9ab0a49a8.zip
op-kernel-dev-9dd056e9eba106ef622795b566f769a9ab0a49a8.tar.gz
Merge branch 'sh/stable-updates' into sh-latest
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r--drivers/gpu/drm/drm_edid.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 0a9357c..0929219 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -184,9 +184,9 @@ drm_edid_block_valid(u8 *raw_edid)
bad:
if (raw_edid) {
- DRM_ERROR("Raw EDID:\n");
+ printk(KERN_ERR "Raw EDID:\n");
print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE, raw_edid, EDID_LENGTH);
- printk("\n");
+ printk(KERN_ERR "\n");
}
return 0;
}
@@ -258,6 +258,17 @@ drm_do_probe_ddc_edid(struct i2c_adapter *adapter, unsigned char *buf,
return ret == 2 ? 0 : -1;
}
+static bool drm_edid_is_zero(u8 *in_edid, int length)
+{
+ int i;
+ u32 *raw_edid = (u32 *)in_edid;
+
+ for (i = 0; i < length / 4; i++)
+ if (*(raw_edid + i) != 0)
+ return false;
+ return true;
+}
+
static u8 *
drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
{
@@ -273,6 +284,10 @@ drm_do_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter)
goto out;
if (drm_edid_block_valid(block))
break;
+ if (i == 0 && drm_edid_is_zero(block, EDID_LENGTH)) {
+ connector->null_edid_counter++;
+ goto carp;
+ }
}
if (i == 4)
goto carp;
OpenPOWER on IntegriCloud