All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Gerd Knorr <kraxel@bytesex.org>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: MTRR vesafb and wrong X performance
Date: Mon, 29 Nov 2004 11:57:01 -0500	[thread overview]
Message-ID: <20041129165701.GA903@redhat.com> (raw)
In-Reply-To: <20041129162242.GA25668@bytesex>

(loony with broken SPF mailfilter removed from Cc)
		
On Mon, Nov 29, 2004 at 05:22:42PM +0100, Gerd Knorr wrote:

 > > vesafb is assuming that the memory used in the current screen mode
 > > xres*yres*depth rounded up to nearest power of 2, is the amount of
 > > ram the card has, which is not just wrong, it's dumb.
 > 
 > It used to do that, but doesn't any more in 2.6.10-rc2.  Check the
 > current code please.

ah, I was looking at a 2.6.9 tree, my apologies.

but..

    if (mtrr) {
        int temp_size = size_total;
        /* Find the largest power-of-two */
        while (temp_size & (temp_size - 1))
                    temp_size &= (temp_size - 1);

                /* Try and find a power of two to add */
        while (temp_size && mtrr_add(vesafb_fix.smem_start, temp_size, MTRR_TYPE_WRCOMB, 1)==-EINVAL) {
            temp_size >>= 1;
        }
    }

size_total is calculated thus:

    size_total = screen_info.lfb_size * 65536;
    if (vram_total)
        size_total = vram_total * 1024 * 1024;
    if (size_total < size_vmode)
        size_total = size_vmode;


where is screen_info.lfb_size set ?

 > > If vesafb can't get it right, maybe it shouldn't be
 > > attempted to do it in the half-assed way it currently does.
 > 
 > Well, 2.6.10-rc1 + newer should get it right now.  We can't do much
 > about BIOS bugs through, other than maybe disabling mtrr by default
 > if too many machines are affected.

or blacklist if there aren't too many perhaps?

		Dave


  reply	other threads:[~2004-11-29 16:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-24 23:15 MTRR vesafb and wrong X performance Pawel Fengler
2004-11-25  1:18 ` Andrew Morton
2004-11-25 21:56   ` Pawel Fengler
2004-11-29 11:12     ` Gerd Knorr
2004-11-29 15:40       ` Dave Jones
2004-11-29 16:22         ` Gerd Knorr
2004-11-29 16:57           ` Dave Jones [this message]
2004-11-29 17:34             ` Gerd Knorr
2004-11-29 17:22               ` Alan Cox
2004-11-29 18:17               ` Dave Jones
2004-11-29 17:23                 ` Alan Cox
2004-11-29 16:24         ` Alan Cox
2004-11-25  8:49 ` Gerd Knorr
  -- strict thread matches above, loose matches on Subject: below --
2004-11-26 16:48 Pawel Fengler

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=20041129165701.GA903@redhat.com \
    --to=davej@redhat.com \
    --cc=akpm@osdl.org \
    --cc=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.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.