Re: [PATCH] drm/i915: preserve pipe A quirk in i9xx_set_pipeconf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 24, 2013 at 11:05:57AM +0200, Daniel Vetter wrote:
> On Mon, Sep 23, 2013 at 10:55:35AM +0100, Chris Wilson wrote:
> > On Mon, Sep 23, 2013 at 10:37:02AM +0200, Daniel Vetter wrote:
> > > On Mon, Sep 23, 2013 at 10:17 AM, Ville Syrjälä
> > > <ville.syrjala@xxxxxxxxxxxxxxx> wrote:
> > > > Hmm. Why not just this?
> > > >
> > > > pipeconf = 0;
> > > > if (pipe == PIPE_A && QUIRK)
> > > >  pipeconf |= PIPECONF_ENABLE;
> > > 
> > > After resume the bios might or might not have enabled pipe A already.
> > > We have a bit of magic to make sure that on resume we set up a decent
> > > mode for pipe A, but I fear if I just smash pipe A to always on we'd
> > > enable it in a bogus state and hang the hw. Hence the readback.
> > 
> > Yet, the
> > 
> > if (A)
> >   pipeconf = READ() & MAGIC;
> > else
> >   pipeconf = 0;
> > if (B)
> >   pipeconf = READ() & MAGIC2;
> 
> I don't see that 2nd READ() you're seeing ... Where is it?

Memory is failing, the pattern you propose is

if (A)
  pipeconf = READ() & MAGIC;
else
  pipeconf = 0;
if (B)
  pipeconf |= DOUBLE_WIDE;
if (C)
  pipeconf |= switch(bit);
if (D)
  pipeconf |= ...
if (E)
  pipeconf |= ...
if (F)
  pipeconf |= ...

The smaller patch would lead to a more consistent style:

pipeconf = 0;
if (A)
  pipeconf |= READ() & MAGIC;
if (B)
  pipeconf |= DOUBLE_WIDE;
if (C)
  pipeconf |= switch(bit);
...

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux