From: Bryan Mayland <bmayland@leoninedev.com>
To: David Wragg <dpw@doc.ic.ac.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
kraxel@goldbach.in-berlin.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VESA framebuffer w/MTRR locks 2.4.0 on init
Date: Sat, 06 Jan 2001 12:08:20 -0500 [thread overview]
Message-ID: <3A575104.F06D87BC@leoninedev.com> (raw)
In-Reply-To: <E14EZMf-0007vp-00@the-village.bc.nu> <y7rk889wk6o.fsf@sytry.doc.ic.ac.uk>
David Wragg wrote:
> Something like this would be better:
> if (mtrr_add(video_base, temp_size, MTRR_TYPE_WRCOMB, 1) == -EINVAL) {
> /* Find the largest power-of-two */
> while (temp_size & (temp_size - 1))
> temp_sze &= (temp_size - 1);
> mtrr_add(video_base, temp_size, MTRR_TYPE_WRCOMB, 1);
> }
> (But this is just a very crude way to work around the inflexibility of
> the MTRRs. Rather than cluttering up calls to mtrr_add, it would be
> better to fix this properly
I agree. VesaFB is the only code (as far as I know) which attempts to grab
an MTRR more than once. The restrictions on MTRR size and alignment are too
numerous to attempt a logical resizing in a small amount of code-- especially
since the retrictions are different depending on the processor. Might I suggest
that the looping code be taken out entirely, perhaps outputting success or
failure like:
#ifdef CONFIG_MTRR
if (mtrr)
if (mtrr_add(video_base, video_size, MTRR_TYPE_WRCOMB, 1) == -EINVAL)
printk(KERN_INFO "vesafb: Could not allocate MTRR\n");
else
printk(KERN_INFO "vesafb: MTRR Write-Combining enabled\n");
#endif /* CONFIG_MTRR */
Bry
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-06 17:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-05 15:54 [PATCH] VESA framebuffer w/ MTRR locks 2.4.0 on init Bryan Mayland
2001-01-05 16:05 ` Alan Cox
2001-01-05 16:31 ` Chris Kloiber
2001-01-05 21:16 ` Steven Walter
2001-01-06 1:12 ` David Wragg
2001-01-06 9:47 ` Gerd Knorr
2001-01-05 16:48 ` Bryan Mayland
2001-01-05 16:54 ` Alan Cox
2001-01-05 17:33 ` Gerd Knorr
2001-01-05 21:40 ` Bryan Mayland
2001-01-05 21:48 ` Alan Cox
2001-01-05 22:01 ` Bryan Mayland
2001-01-06 1:20 ` [PATCH] VESA framebuffer w/MTRR " David Wragg
2001-01-06 17:08 ` Bryan Mayland [this message]
2001-01-06 19:23 ` Alan Cox
2001-01-06 17:28 ` Framebuffer as a module Bryan Mayland
[not found] ` <002501c07819$21343900$fd1942c3@bluescreen>
2001-01-06 20:04 ` Bryan Mayland
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=3A575104.F06D87BC@leoninedev.com \
--to=bmayland@leoninedev.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=dpw@doc.ic.ac.uk \
--cc=kraxel@goldbach.in-berlin.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox