On Wed, 27 Mar 2013 00:52:47 +0100
Daniel Vetter <dan...@ffwll.ch> wrote:

> On Tue, Mar 26, 2013 at 04:24:48PM -0700, Jesse Barnes wrote:
> > On Wed, 20 Mar 2013 14:36:25 +0200
> > Imre Deak <imre.d...@intel.com> wrote:
> > 
> > > > +               pipe = -1;
> > > >  
> > > >                 if (encoder->get_hw_state(encoder, &pipe)) {
> > > > -                       encoder->base.crtc =
> > > > -                               dev_priv->pipe_to_crtc_mapping[pipe];
> > > > -               } else {
> > > > +                       crtc = 
> > > > to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);  
> > > 
> > > get_hw_state() can return true and still leave pipe at -1, causing an
> > > invalid access here.
> > 
> > Fixed, thanks.
> 
> That shouldn't actually be possible - if encoder->get_hw_state returns
> true but doesn't set the pipe, that's a bug in the callback. So maybe yell
> with a WARN?

I'll just check all the callbacks; I thought I remembered one case
where it seemed to make sense, but yeah a WARN at least would be nice
if not.

-- 
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to