From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugeni Dodonov Subject: Re: [PATCH 05/29] drm/i915: prevent NULL pointer exception when using gmbus Date: Fri, 13 Apr 2012 21:26:14 -0300 Message-ID: References: <1334347745-11743-1-git-send-email-eugeni.dodonov@intel.com> <1334347745-11743-6-git-send-email-eugeni.dodonov@intel.com> <1334348304_415235@CP5-2952> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1954763512==" Return-path: Received: from mail-gx0-f177.google.com (mail-gx0-f177.google.com [209.85.161.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 63FC69EBCD for ; Fri, 13 Apr 2012 17:26:55 -0700 (PDT) Received: by ggnk1 with SMTP id k1so2180780ggn.36 for ; Fri, 13 Apr 2012 17:26:55 -0700 (PDT) In-Reply-To: <1334348304_415235@CP5-2952> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, Eugeni Dodonov List-Id: intel-gfx@lists.freedesktop.org --===============1954763512== Content-Type: multipart/alternative; boundary=485b397dccbd6e873c04bd98a519 --485b397dccbd6e873c04bd98a519 Content-Type: text/plain; charset=ISO-8859-1 On Fri, Apr 13, 2012 at 17:18, Chris Wilson wrote: > On Fri, 13 Apr 2012 17:08:41 -0300, Eugeni Dodonov < > eugeni.dodonov@intel.com> wrote: > > Prevent a NULL pointer exception when we are trying to retrieve EDID data > > from non-existent adapter. > > This just means that a HDMI with a garbage ddc_bus is never detected. > Since we control ddc_bus entirely, it means that the initialisation is > completely bogus. Please fix the root cause and not paper over > programming bugs. > Sorry, I think I wasn't clear in my cover letter about this one.. I am not hitting any issue with this current branch I sent; but the nature of the code we have after the gmbus refactoring made me a bit paranoid about accessing properties of something that could potential be NULL. As far as I can see, we should not hit this with any combination of outputs on any hardware that is already covered by the wikipedia :). So I am fine with dropping this patch if you also think that it does not adds anything relevant to us. Or perhaps I should refactor it into adding some WARN's instead? -- Eugeni Dodonov --485b397dccbd6e873c04bd98a519 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Fri, Apr 13, 2012 at 17:18, Chris Wilson <chris@chris-w= ilson.co.uk> wrote:
On Fri, 13 Apr 2012 17:08:41 -0300, Eugeni Dodonov <eugeni.dodonov@intel.com> = wrote:
> Prevent a NULL pointer exception when we are trying to retrieve EDID d= ata
> from non-existent adapter.

This just means that a HDMI with a garbage ddc_bus is never detected.=
Since we control ddc_bus entirely, it means that the initialisation is
completely bogus. Please fix the root cause and not paper over
programming bugs.

Sorry, I think I= wasn't clear in my cover letter about this one.. I am not hitting any = issue with this current branch I sent; but the nature of the code we have a= fter the gmbus refactoring made me a bit paranoid about accessing propertie= s of something that could potential be NULL.

As far as I can see, we should not hit this with any co= mbination of outputs on any hardware that is already covered by the wikiped= ia :). So I am fine with dropping this patch if you also think that it does= not adds anything relevant to us. Or perhaps I should refactor it into add= ing some WARN's instead?

--
Eugeni Dodonov

--485b397dccbd6e873c04bd98a519-- --===============1954763512== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1954763512==--