From: Egbert Eich Subject: Re: [PATCH v2 05/18] DRM/KMS/EDID: Test EDDC if EDID announces more than one Extension Block (v2) Date: Thu, 22 Nov 2012 14:18:11 +0100 Message-ID: <20654.9747.55686.261628@linux-qknr.site> References: <1353356598-10634-1-git-send-email-eich@suse.de> <1353579788-30637-1-git-send-email-eich@suse.com> <1353579788-30637-6-git-send-email-eich@suse.com> <20121122112009.GE3296@intel.com> <20654.5504.513136.392670@linux-qknr.site> <20121122122945.GF3296@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0641730477==" Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id 2066CE5EB2 for ; Thu, 22 Nov 2012 05:24:20 -0800 (PST) In-Reply-To: ville.syrjala@linux.intel.com wrote on Thursday, 22 November 2012 at 14:29:45 +0200 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: Egbert Eich , tiwai@suse.com, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0641730477== Content-Type: text/plain; charset=unknown Content-Transfer-Encoding: quoted-printable Ville Syrj=E4l=E4 writes: > = > Me neither. I just figured it might reduce the chance of false > positives. But if you say that can't happen, I'll take your word > for it. > = > > Regarding memcmp() you are definitely right, I will change the code.= > > = > > > = > > > Also the comment is somehow misleading. It talks about the base b= lock > > > even though we're looking at the extension block. > > = > > = > > Reason for this patch: > > I had a bug report for a monitor announcing extension blocks in the = extension > > block flag of the base block (over 200!) although it wasn't EDDC cap= able. = > > For some reason it got past the ACK check when the segment number wa= s written > > to address 0x30 and happily transferred the base block for any odd n= umbered = > > block and some garbage for even ones. > = > That's nasty. When I saw your patch I was immediately thinking that th= is > is caused by the IGNORE_NAK flag, but then I read the current code, an= d > realized that we're not using that flag. It was used in the original > EDDC patch, and I was worried that this kind of bad behaviour would be= > possible if use the flag. But it seems I underestimated how crappy the= > monitor hardwar can be. Right. = This flag would only make sense for the base block (to reset = an EDDC capable monitor but not fail on non-EDDC capable ones). = In fact I had a patch to add this, but then I realized that none of the I2C implemenations in the gfx drivers honored this flag. But then I reread the VESA spec for EDDC, this requires that the segment address in the monitor has to be reset on a STOP condition. So if there ever is the case that a monitor has a segment > 0 = selected when drm_read_edid() is called for the first time (because = of a system crash for instance) the validation will fail and causes = a 2nd read attempt for which the segment address should be reset by = the previous transfer. Regarding crappiness of monitor hardware: catch me at a bar and I can tell you more stories ... ;p > = > > The only reliable way we found to catch this condition early was to = check if = > > block 2 had the header of a base block which will happen when the di= splay > > cannot deal with the segment number. > > = > > This was what I tried to summarize in very few words - maybe i shoul= d reword > > it a bit. > = > Right. The idea seems reasonable, I just found the comment somehow a > bit confusing when I was reading the code following it. > = > So maybe something like 'Test if base block ..., by checking whether t= he > extension block is a duplicate the base block.' Although the use of > memcmp() will already make things much clearer. Right. I've already reworked it. Will send out. Cheers, Egbert. --===============0641730477== 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 --===============0641730477==--