[PATCH] video: imxfb: Fix the maximum value for yres

Sergei Shtylyov sshtylyov at mvista.com
Thu Dec 23 13:42:22 EST 2010


Hello.

Fabio Estevam wrote:

> MX27 and MX25 have 10 bits in the YMAX field of LCDC Size Register.

> Fix the maximum value for yres.

> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
[...]

> diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
> index 5c363d0..5d2d337 100644
> --- a/drivers/video/imxfb.c
> +++ b/drivers/video/imxfb.c
> @@ -55,8 +55,10 @@
>  
>  #ifdef CONFIG_ARCH_MX1
>  #define SIZE_YMAX(y)	((y) & 0x1ff)
> +#define YMAX_MASK	0x1ff
>  #else
>  #define SIZE_YMAX(y)	((y) & 0x3ff)
> +#define YMAX_MASK	0x3ff
>  #endif

    I'd done the following, to avoid the code duplication:

#ifdef CONFIG_ARCH_MX1
#define YMAX_MASK	0x1ff
#else
#define YMAX_MASK	0x3ff
#endif
#define SIZE_YMAX(y)	((y) & YMAX_MASK)

WBR, Sergei



More information about the linux-arm-kernel mailing list