From: Fabio Estevam <fabio.estevam@freescale.com> To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] video: imxfb: Fix the maximum value for yres Date: Thu, 23 Dec 2010 17:17:51 +0000 [thread overview] Message-ID: <1293124671-29426-1-git-send-email-fabio.estevam@freescale.com> (raw) 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> --- drivers/video/imxfb.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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 #define LCDC_VPW 0x08 @@ -623,7 +625,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf if (var->right_margin > 255) printk(KERN_ERR "%s: invalid right_margin %d\n", info->fix.id, var->right_margin); - if (var->yres < 1 || var->yres > 511) + if (var->yres < 1 || var->yres > YMAX_MASK) printk(KERN_ERR "%s: invalid yres %d\n", info->fix.id, var->yres); if (var->vsync_len > 100) -- 1.6.0.4
WARNING: multiple messages have this Message-ID (diff)
From: fabio.estevam@freescale.com (Fabio Estevam) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] video: imxfb: Fix the maximum value for yres Date: Thu, 23 Dec 2010 15:17:51 -0200 [thread overview] Message-ID: <1293124671-29426-1-git-send-email-fabio.estevam@freescale.com> (raw) 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> --- drivers/video/imxfb.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) 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 #define LCDC_VPW 0x08 @@ -623,7 +625,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf if (var->right_margin > 255) printk(KERN_ERR "%s: invalid right_margin %d\n", info->fix.id, var->right_margin); - if (var->yres < 1 || var->yres > 511) + if (var->yres < 1 || var->yres > YMAX_MASK) printk(KERN_ERR "%s: invalid yres %d\n", info->fix.id, var->yres); if (var->vsync_len > 100) -- 1.6.0.4
next reply other threads:[~2010-12-23 17:17 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-12-23 17:17 Fabio Estevam [this message] 2010-12-23 17:17 ` [PATCH] video: imxfb: Fix the maximum value for yres Fabio Estevam 2010-12-23 18:42 ` Sergei Shtylyov 2010-12-23 18:42 ` Sergei Shtylyov
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=1293124671-29426-1-git-send-email-fabio.estevam@freescale.com \ --to=fabio.estevam@freescale.com \ --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: linkBe 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.