From: Ville Syrjala <syrjala@sci.fi>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: ben@simtec.co.uk, vince@simtec.co.uk, Ville Syrjala <syrjala@sci.fi>
Subject: [PATCH 4/7] sm501fb: Fix timing limits
Date: Sun, 25 Nov 2007 22:01:29 +0200 [thread overview]
Message-ID: <11960208932561-git-send-email-syrjala@sci.fi> (raw)
In-Reply-To: <1196020892591-git-send-email-syrjala@sci.fi>
Vertical sync height register can only hold 6 bits. Fix the hsync start
test to use > instead of >=. Also add a few clarifying comments.
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
---
drivers/video/sm501fb.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index 66e2ae9..c92a255 100644
--- a/drivers/video/sm501fb.c
+++ b/drivers/video/sm501fb.c
@@ -237,12 +237,14 @@ static int sm501fb_check_var(struct fb_var_screeninfo *var,
/* check we can fit these values into the registers */
- if (var->hsync_len > 255 || var->vsync_len > 255)
+ if (var->hsync_len > 255 || var->vsync_len > 63)
return -EINVAL;
- if ((var->xres + var->right_margin) >= 4096)
+ /* hdisplay end and hsync start */
+ if ((var->xres + var->right_margin) > 4096)
return -EINVAL;
+ /* vdisplay end and vsync start */
if ((var->yres + var->lower_margin) > 2048)
return -EINVAL;
--
1.5.2.5
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2007-11-25 20:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-25 20:01 [PATCH 0/7] sm501 patches Ville Syrjala
2007-11-25 20:01 ` [PATCH 1/7] sm501fb: Direct color visual does not work Ville Syrjala
2007-12-28 3:21 ` Magnus Damm
2007-11-25 20:01 ` [PATCH 2/7] sm501fb: RGB offsets are reversed in 16bpp modes Ville Syrjala
2007-11-25 20:01 ` [PATCH 3/7] sm501fb: Set transp.offset to 0 in 8bpp and " Ville Syrjala
2007-11-25 20:01 ` Ville Syrjala [this message]
2007-11-25 20:01 ` [PATCH 5/7] sm501: Remove a duplicated table Ville Syrjala
2007-11-25 20:01 ` [PATCH 6/7] sm501: Remove a misplaced x character Ville Syrjala
2007-11-26 16:18 ` Ben Dooks
2007-11-25 20:01 ` [PATCH 7/7] sm501: Add support for the SM502 programmable PLL Ville Syrjala
2007-12-07 18:35 ` [PATCH 0/7] sm501 patches Ben Dooks
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=11960208932561-git-send-email-syrjala@sci.fi \
--to=syrjala@sci.fi \
--cc=ben@simtec.co.uk \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=vince@simtec.co.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).