linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrea Mazzoleni <amadvance@users.sourceforge.net>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Possible Bug in radeonfb (?)
Date: Tue, 25 Feb 2003 19:21:15 +0100	[thread overview]
Message-ID: <20030225182115.GB2487@elitel.biz> (raw)

In radeonfb (2.4.20) I have found a possible inconsistency.

In the PLL clock computation the initial range check compares the
requested clock with the value pll_min/12. But immeditially later
I see that the higher PLL post divider is 16 and not 12.

Is it correct ? Or the check should use 16 instead of 12 ?

This is the code :

	if (freq > rinfo->pll.ppll_max)
		freq = rinfo->pll.ppll_max;
	if (freq*12 < rinfo->pll.ppll_min)
		freq = rinfo->pll.ppll_min / 12;

	{
		struct {
			int divider;
			int bitvalue;
		} *post_div,
		  post_divs[] = {
			{ 1,  0 },
			{ 2,  1 },
			{ 4,  2 },
			{ 8,  3 },
			{ 3,  4 },
			{ 16, 5 },
			{ 6,  6 },
			{ 12, 7 },
			{ 0,  0 },
		};

		for (post_div = &post_divs[0]; post_div->divider; ++post_div) {
			rinfo->pll_output_freq = post_div->divider * freq;
			if (rinfo->pll_output_freq >= rinfo->pll.ppll_min  &&
			    rinfo->pll_output_freq <= rinfo->pll.ppll_max)
				break;
		}


-- 
Andrea Mazzoleni
935A 2D3C 5C70 BCD6 CB0C  ED89 7C19 4321 6340 3F6D




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

             reply	other threads:[~2003-02-25 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-25 18:21 Andrea Mazzoleni [this message]
2003-02-26  8:02 ` Possible Bug in radeonfb (?) Antonino Daplas
2003-02-27 18:00   ` Andrea Mazzoleni

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=20030225182115.GB2487@elitel.biz \
    --to=amadvance@users.sourceforge.net \
    --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).