From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Lisandro =?ISO-8859-1?Q?Dami=E1n_Nicanor_P=E9rez?= Meyer" Subject: Re: Bug#622993: every 10s I get "[drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid ..." Date: Mon, 17 Feb 2014 00:39:41 -0300 Message-ID: <6090341.IquQv0jnHJ@luna> References: <201104292156.32388.perezmeyer@gmail.com> <20110430040921.GA7942@elie> <4DBD7B90.8080509@pook.it> Reply-To: 622993@bugs.debian.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1967915073==" Return-path: Received: from mail-yh0-f44.google.com (mail-yh0-f44.google.com [209.85.213.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 029DAFA378 for ; Sun, 16 Feb 2014 19:39:55 -0800 (PST) Received: by mail-yh0-f44.google.com with SMTP id f73so13842819yha.31 for ; Sun, 16 Feb 2014 19:39:55 -0800 (PST) In-Reply-To: <4DBD7B90.8080509@pook.it> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: 622993@bugs.debian.org, Stuart Pook Cc: Jonathan Nieder , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1967915073== Content-Type: multipart/signed; boundary="nextPart1995684.td23Ht8JIR"; micalg="pgp-sha256"; protocol="application/pgp-signature" --nextPart1995684.td23Ht8JIR Content-Type: multipart/mixed; boundary="nextPart1707384.WDPpQ5NUxF" Content-Transfer-Encoding: quoted-printable This is a multi-part message in MIME format. =2D-nextPart1707384.WDPpQ5NUxF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" (Sorry if I'm spawning a very old thread here). After all this time I have been patching my kernels to workaround [0][1= ] [0] [1] Some time ago I found [2] and today I finally solved the problem. [2] Some stuff I learned: the kernel does ignores checksums mismatches by 8= ... in=20 the positive side! My mismatch was exactly -1, ie, 255. I have been modifying the original patch to workaround this since 2011.= I'm=20 attaching my last patch in case someone else needs it. It does adds a k= ernel=20 parameter to ignore edid mismatches. Kinds regards, Lisandro. =2D-=20 Theory and practice sometimes clash. And when that happens, theory lose= s. Every single time. Linus Benedict Torvalds. Lisandro Dami=E1n Nicanor P=E9rez Meyer http://perezmeyer.com.ar/ http://perezmeyer.blogspot.com/ =2D-nextPart1707384.WDPpQ5NUxF Content-Disposition: attachment; filename="drm-kms-add-a-module-param-to-disable-strict-EDID-3.12.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="drm-kms-add-a-module-param-to-disable-strict-EDID-3.12.patch" diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 830f750..773c5d0 100644 =2D-- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -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); =2D + 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) =2D{ +{ struct detailed_mode_closure closure = { connector, edid, 0, 0, 0 }; diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 39d8645..487a6ef 100644 =2D-- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -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; diff --git a/include/drm/drmP.h b/include/drm/drmP.h index b46fb45..b86d239 100644 =2D-- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -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; =2D-nextPart1707384.WDPpQ5NUxF-- This is a multi-part message in MIME format. --nextPart1707384.WDPpQ5NUxF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" (Sorry if I'm spawning a very old thread here). After all this time I have been patching my kernels to workaround [0][1= ] [0] [1] Some time ago I found [2] and today I finally solved the problem. [2] Some stuff I learned: the kernel does ignores checksums mismatches by 8= ... in=20 the positive side! My mismatch was exactly -1, ie, 255. I have been modifying the original patch to workaround this since 2011.= I'm=20 attaching my last patch in case someone else needs it. It does adds a k= ernel=20 parameter to ignore edid mismatches. Kinds regards, Lisandro. --=20 Theory and practice sometimes clash. And when that happens, theory lose= s. Every single time. Linus Benedict Torvalds. Lisandro Dami=E1n Nicanor P=E9rez Meyer http://perezmeyer.com.ar/ http://perezmeyer.blogspot.com/ --nextPart1707384.WDPpQ5NUxF Content-Disposition: attachment; filename="drm-kms-add-a-module-param-to-disable-strict-EDID-3.12.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="drm-kms-add-a-module-param-to-disable-strict-EDID-3.12.patch" diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 830f750..773c5d0 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -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 }; diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 39d8645..487a6ef 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c @@ -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; diff --git a/include/drm/drmP.h b/include/drm/drmP.h index b46fb45..b86d239 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -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; --nextPart1707384.WDPpQ5NUxF-- --nextPart1995684.td23Ht8JIR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABCAAGBQJTAYSEAAoJEKtkX0BihqfQPsIQALuKQb82qsYxAIyccjBXKZpo 0nxDx2PzDsY1vfDXanzO86NMO1FsmFSr8PzpXUWkgzQ0WjW3Uwi7ldu7p98aZjEe alvSC5vW9nOWOcy51Uea/w6RUe687gzkME2oIqu9F5I3IUXqbs+zhyPbaY5s9WK2 +tJPxyVwi5JZLdbow4YhAkrlQVVT+TW3Hm/5fLb5b90Or1mZ8NS8asDivfDZFNo7 dbzy2eGISZ6tpzJcTsvsYO6g7J62gVac9XYrAdhSMFXiB1J8Gp8owI1nNF2kDx3T cJSA4FQsU8LstmMjUQEdd2SfZPbT1WvbtKhOsTUbrHDVpFJIsVmLtaxvYLs2Uv+/ Z0nE1EesClbKloHGobdafa797NSYqfXJAdrJvOpqvqOSU2ZEeCcCzVHtsRL3+4k+ BsFero4scFbjCxNPHiJ/ZtMvbJtcYrbK4BuGxKvfaYS/mPwrOc6bSsySFpg1p7ct t3TSTCrdy7kFy04q4P7nhAXtFq2lpAdosSyctHiWIrz1rrc3NhEo6Wndfau3DQmd G2Y68rBLva10wRVUWPIvjcEvLEGqzStK+kKG6FouMST7N9tAtRv/tZ/HtWUfjnM1 Ibr0SqTFwUKmtq88CwULOBnjAPm1dc9bRdyJLMaABwVim6speRDX+HuguBObFA7S I81WYuSQj/cGV7T/Wq5T =6usl -----END PGP SIGNATURE----- --nextPart1995684.td23Ht8JIR-- --===============1967915073== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1967915073==--