[PATCH v4 1/5] fsl-diu-fb: fix issue with re-enabling DIU area descriptor

Anatolij Gustschin agust at denx.de
Wed Jul 28 17:56:55 EST 2010


On Wed, 28 Jul 2010 01:02:59 -0600
Grant Likely <grant.likely at secretlab.ca> wrote:
...
> >  drivers/video/fsl-diu-fb.c |   38 +++++++++++++++++++++++---------------
> >  1 files changed, 23 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
> > index 27455ce..9b8c991 100644
> > --- a/drivers/video/fsl-diu-fb.c
> > +++ b/drivers/video/fsl-diu-fb.c
> > @@ -317,6 +317,17 @@ static void fsl_diu_free(void *virt, size_t size)
> >                free_pages_exact(virt, size);
> >  }
> >
> > +/*
> > + * Workaround for failed writing desc register of planes.
> > + * Needed with MPC5121 DIU rev 2.0 silicon.
> > + */
> > +void wr_reg_wa(u32 *reg, u32 val)
> > +{
> > +       do {
> > +               out_be32(reg, val);
> > +       } while (in_be32(reg) != val);
> > +}
> 
> I'll apply this one, but it looks like a potential problem.  What
> happens if the write never succeeds?  The kernel then gets stuck in a
> forever busy loop.  You should look at reworking it.

I'll submit an incremental patch that prevents looping forever in
the case if the write never succeeds. Thanks!

Anatolij


More information about the devicetree-discuss mailing list