From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH] drm/i915: Do not dereference NULL crtc or fb until after checking Date: Fri, 2 Aug 2013 20:20:45 -0700 Message-ID: <20130803032045.GA1998@bwidawsk.net> References: <1375472389-4423-1-git-send-email-chris@chris-wilson.co.uk> <20130802201647.GC4878@cantiga.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.bwidawsk.net (bwidawsk.net [166.78.191.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A520E6172 for ; Fri, 2 Aug 2013 20:20:51 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130802201647.GC4878@cantiga.alporthouse.com> 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 , intel-gfx@lists.freedesktop.org, Rodrigo Vivi , Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Fri, Aug 02, 2013 at 09:16:47PM +0100, Chris Wilson wrote: > On Fri, Aug 02, 2013 at 08:39:49PM +0100, Chris Wilson wrote: > > Fixes regression from > > commit 4906557eb37b7fef84fad4304acef6dedf919880 > > Author: Rodrigo Vivi > > Date: Thu Jul 11 18:45:05 2013 -0300 > > > > drm/i915: Hook PSR functionality > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67526 > > Signed-off-by: Chris Wilson > > Cc: Rodrigo Vivi > > Cc: Ben Widawsky > > Cc: Daniel Vetter > > --- > > drivers/gpu/drm/i915/intel_dp.c | 17 +++++++++++++---- > > 1 file changed, 13 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > > index 928b42f..7e16c6e 100644 > > --- a/drivers/gpu/drm/i915/intel_dp.c > > +++ b/drivers/gpu/drm/i915/intel_dp.c > > @@ -1514,10 +1514,10 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp) > > struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); > > struct drm_device *dev = dig_port->base.base.dev; > > struct drm_i915_private *dev_priv = dev->dev_private; > > - struct drm_crtc *crtc = dig_port->base.base.crtc; > > - struct intel_crtc *intel_crtc = to_intel_crtc(crtc); > > - struct drm_i915_gem_object *obj = to_intel_framebuffer(crtc->fb)->obj; > > - struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base; > > + struct drm_crtc *crtc; > > + struct intel_crtc *intel_crtc; > > + struct drm_i915_gem_object *obj; > > + struct intel_encoder *intel_encoder; > > Sigh. I didn't mean to move the intel_encoder in the end. That can be > still be set up during the init as it not part of the bug fix. > -Chris > Merged to the Daniel temp tree. -- Ben Widawsky, Intel Open Source Technology Center