linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Smirl <jonsmirl@gmail.com>
To: Andrew Morton <akpm@osdl.org>,
	fbdev <linux-fbdev-devel@lists.sourceforge.net>
Subject: Third repost: freq_rounding.patch
Date: Wed, 13 Jul 2005 18:22:03 -0400	[thread overview]
Message-ID: <9e47339105071315225ebfe20b@mail.gmail.com> (raw)

Can we get this into the kernel? 

--
Jon Smirl
jonsmirl@gmail.com

#Fix rounding error when mode frequency is very close to monitor limit
#Signed-off-by: Jon Smirl <jonsmirl@gmail.com>
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c
--- a/drivers/video/fbmon.c
+++ b/drivers/video/fbmon.c
@@ -1241,6 +1241,8 @@ int fb_validate_mode(const struct fb_var
               vtotal *= 2;

       hfreq = pixclock/htotal;
+       hfreq = (hfreq + 500) / 1000 * 1000;
+
       vfreq = hfreq/vtotal;

       return (vfreq < vfmin || vfreq > vfmax ||


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar

             reply	other threads:[~2005-07-13 22:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-13 22:22 Jon Smirl [this message]
2005-07-13 22:37 ` Third repost: freq_rounding.patch Andrew Morton
2005-07-14 17:38   ` James Simmons

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=9e47339105071315225ebfe20b@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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).