Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	intel-gfx@lists.freedesktop.org,
	Rodrigo Vivi <rodrigo.vivi@gmail.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/i915: Do not dereference NULL crtc or fb until after checking
Date: Fri, 2 Aug 2013 20:20:45 -0700	[thread overview]
Message-ID: <20130803032045.GA1998@bwidawsk.net> (raw)
In-Reply-To: <20130802201647.GC4878@cantiga.alporthouse.com>

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 <rodrigo.vivi@gmail.com>
> > 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 <chris@chris-wilson.co.uk>
> > Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> > Cc: Ben Widawsky <ben@bwidawsk.net>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> >  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

      reply	other threads:[~2013-08-03  3:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 19:39 [PATCH] drm/i915: Do not dereference NULL crtc or fb until after checking Chris Wilson
2013-08-02 20:16 ` Chris Wilson
2013-08-03  3:20   ` Ben Widawsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130803032045.GA1998@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox