From: Paul Mundt <lethal@linux-sh.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] video: imxfb: Fix the maximum value for yres
Date: Fri, 24 Dec 2010 00:39:13 +0000 [thread overview]
Message-ID: <20101224003913.GE28151@linux-sh.org> (raw)
In-Reply-To: <1293131490-2747-1-git-send-email-fabio.estevam@freescale.com>
On Thu, Dec 23, 2010 at 05:11:30PM -0200, 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@freescale.com>
> ---
> Changes since v1:
> - factor out SIZE_YMAX definition
> drivers/video/imxfb.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
> index 5c363d0..4cddd3b 100644
> --- a/drivers/video/imxfb.c
> +++ b/drivers/video/imxfb.c
> @@ -54,10 +54,11 @@
> #define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20)
>
> #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
> +#define SIZE_YMAX(y) ((y) & YMAX_MASK)
>
> #define LCDC_VPW 0x08
> #define VPW_VPW(x) ((x) & 0x3ff)
Do you really want to restrict this by the build-time check? Presumably
you could just do this as:
#define YMAX_MASK (cpu_is_mx1() ? 0x1ff : 0x3ff)
to support multiple configurations.
WARNING: multiple messages have this Message-ID (diff)
From: lethal@linux-sh.org (Paul Mundt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] video: imxfb: Fix the maximum value for yres
Date: Fri, 24 Dec 2010 09:39:13 +0900 [thread overview]
Message-ID: <20101224003913.GE28151@linux-sh.org> (raw)
In-Reply-To: <1293131490-2747-1-git-send-email-fabio.estevam@freescale.com>
On Thu, Dec 23, 2010 at 05:11:30PM -0200, 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@freescale.com>
> ---
> Changes since v1:
> - factor out SIZE_YMAX definition
> drivers/video/imxfb.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
> index 5c363d0..4cddd3b 100644
> --- a/drivers/video/imxfb.c
> +++ b/drivers/video/imxfb.c
> @@ -54,10 +54,11 @@
> #define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20)
>
> #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
> +#define SIZE_YMAX(y) ((y) & YMAX_MASK)
>
> #define LCDC_VPW 0x08
> #define VPW_VPW(x) ((x) & 0x3ff)
Do you really want to restrict this by the build-time check? Presumably
you could just do this as:
#define YMAX_MASK (cpu_is_mx1() ? 0x1ff : 0x3ff)
to support multiple configurations.
next prev parent reply other threads:[~2010-12-24 0:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-23 19:11 [PATCH v2] video: imxfb: Fix the maximum value for yres Fabio Estevam
2010-12-23 19:11 ` Fabio Estevam
2010-12-24 0:39 ` Paul Mundt [this message]
2010-12-24 0:39 ` Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101224003913.GE28151@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.