@@ -1018,6 +1018,9 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid)
}
}
+ if (!drm_edid_strict)
+ return 1;
+
for (i = 0; i < EDID_LENGTH; i++)
csum += raw_edid[i];
if (csum) {
@@ -2021,7 +2024,7 @@ do_inferred_modes(struct detailed_timing *timing, void *c)
closure->modes += drm_dmt_modes_for_range(closure->connector,
closure->edid,
timing);
-
+
if (!version_greater(closure->edid, 1, 1))
return; /* GTF not defined yet */
@@ -2258,7 +2261,7 @@ do_cvt_mode(struct detailed_timing *timing, void *c)
static int
add_cvt_modes(struct drm_connector *connector, struct edid *edid)
-{
+{
struct detailed_mode_closure closure = {
connector, edid, 0, 0, 0
};
@@ -49,6 +49,9 @@ EXPORT_SYMBOL(drm_vblank_offdelay);
unsigned int drm_timestamp_precision = 20; /* Default to 20 usecs. */
EXPORT_SYMBOL(drm_timestamp_precision);
+int drm_edid_strict = 1; /* 0 to disable strict edid conformance */
+EXPORT_SYMBOL(drm_edid_strict);
+
/*
* Default to use monotonic timestamps for wait-for-vblank and page-flip
* complete events.
@@ -63,12 +66,14 @@ MODULE_PARM_DESC(rnodes, "Enable experimental render nodes API");
MODULE_PARM_DESC(vblankoffdelay, "Delay until vblank irq auto-disable [msecs]");
MODULE_PARM_DESC(timestamp_precision_usec, "Max. error on timestamps [usecs]");
MODULE_PARM_DESC(timestamp_monotonic, "Use monotonic timestamps");
+MODULE_PARM_DESC(edid_strict, "Strict EDID checks (0 = disable)");
module_param_named(debug, drm_debug, int, 0600);
module_param_named(rnodes, drm_rnodes, int, 0600);
module_param_named(vblankoffdelay, drm_vblank_offdelay, int, 0600);
module_param_named(timestamp_precision_usec, drm_timestamp_precision, int, 0600);
module_param_named(timestamp_monotonic, drm_timestamp_monotonic, int, 0600);
+module_param_named(edid_strict, drm_edid_strict, int, 0600);
struct idr drm_minors_idr;
@@ -1462,6 +1462,7 @@ extern unsigned int drm_rnodes;
extern unsigned int drm_vblank_offdelay;
extern unsigned int drm_timestamp_precision;
extern unsigned int drm_timestamp_monotonic;
+extern int drm_edid_strict;
extern struct class *drm_class;
extern struct dentry *drm_debugfs_root;