[PATCH] pxafb: correct the vertical back porch macro

Marek Vasut marek.vasut at gmail.com
Sat Oct 23 10:18:38 EDT 2010


Dne So 23. října 2010 03:07:34 Eric Miao napsal(a):
> On Sat, Oct 23, 2010 at 5:26 AM, Matt Reimer <mreimer at sdgsystems.com> wrote:
> > Fix an off-by-one bug in the LCCR2_BegFrmDel() macro. The vertical back
> > porch knob LCCR2[BFW] specifies the number of clock periods minus one,
> > but the macro wasn't doing the subtraction.
> > ---
> >  arch/arm/mach-pxa/include/mach/regs-lcd.h |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/arch/arm/mach-pxa/include/mach/regs-lcd.h
> > b/arch/arm/mach-pxa/include/mach/regs-lcd.h index f82dcea..5074d18
> > 100644
> > --- a/arch/arm/mach-pxa/include/mach/regs-lcd.h
> > +++ b/arch/arm/mach-pxa/include/mach/regs-lcd.h
> > @@ -107,7 +107,7 @@
> >  #define LCCR2_EndFrmDel(Tln)   ((Tln) << FShft (LCCR2_EFW))
> > 
> >  #define LCCR2_BFW      Fld (8, 24)     /* Beginning-of-Frame line clock
> > */ -#define LCCR2_BegFrmDel(Tln)   ((Tln) << FShft (LCCR2_BFW))
> > +#define LCCR2_BegFrmDel(Tln)   (((Tln) - 1) << FShft (LCCR2_BFW))
> 
> Nothing in the spec suggests that this minus 1 is necessary. Could you
> please double check?

It doesn't fit the settings in U-Boot or something ... it's a long known thing. I 
remember in U-Boot, one had to actually subtract one in the LCD configuration 
data structure so it'd be programmer correctly.

> 
> >  #define LCCR3_API      (0xf << 16)     /* AC Bias pin trasitions per
> > interrupt */ #define LCCR3_API_S    16
> > --
> > 1.7.0.4
> > 
> > 
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



More information about the linux-arm-kernel mailing list