linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Mapping large framebuffers into kernel space
@ 2003-09-07 21:18 Jon Smirl
  2003-09-07 22:25 ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2003-09-07 21:18 UTC (permalink / raw)
  To: Alan Cox; +Cc: Benjamin Herrenschmidt, kronos, Linux Kernel Mailing List

Is there something preventing kernel framebuffers from being mapped to the high
end of the 4GB kernel address space? Or do they have to be mapped below 1GB?
Framebuffer access isn't that performance sensitive, after all it is on the PCI bus.

=====
Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mapping large framebuffers into kernel space
  2003-09-07 21:18 Mapping large framebuffers into kernel space Jon Smirl
@ 2003-09-07 22:25 ` Alan Cox
  2003-09-08  0:17   ` Jon Smirl
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Cox @ 2003-09-07 22:25 UTC (permalink / raw)
  To: Jon Smirl; +Cc: Benjamin Herrenschmidt, kronos, Linux Kernel Mailing List

On Sul, 2003-09-07 at 22:18, Jon Smirl wrote:
> Is there something preventing kernel framebuffers from being mapped to the high
> end of the 4GB kernel address space? Or do they have to be mapped below 1GB?
> Framebuffer access isn't that performance sensitive, after all it is on the PCI bus.

The kernel has 4Gb of virtual address space. Because of the way x86
works it really wants to keep the user map, the view of main memory and 
io mappings visible at once. For larger objects you have to use kmap and
map them through a window (anyone remember they joys of EMS). On 64bit
this of course all goes away


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mapping large framebuffers into kernel space
  2003-09-07 22:25 ` Alan Cox
@ 2003-09-08  0:17   ` Jon Smirl
  2003-09-08 12:28     ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2003-09-08  0:17 UTC (permalink / raw)
  To: Alan Cox; +Cc: Benjamin Herrenschmidt, kronos, Linux Kernel Mailing List

--- Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> 
> The kernel has 4Gb of virtual address space. Because of the way x86
> works it really wants to keep the user map, the view of main memory and 
> io mappings visible at once. For larger objects you have to use kmap and
> map them through a window (anyone remember they joys of EMS). On
> 64bit this of course all goes away
> 

On my system I have 1GB physical and 1GB swap. So there should always be some
open address space in the 1-4GB kernel address space. Would it be better to map
the framebuffer to 1-4GB when HIGHMEM is configured? Is there an ioremap() that
will map to high memory? Seems that this would be better than reserving 256MB
in the 0-1GB range and forcing 256MB of physical RAM into highmem.

The kernel DRM drivers map framebuffers up to 256MB in size into user space.
Could this be mapped as a single 256MB page instead of 64K 4KB ones?

We're working on the radeon drivers right now so I can try a few things out.

=====
Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mapping large framebuffers into kernel space
  2003-09-08  0:17   ` Jon Smirl
@ 2003-09-08 12:28     ` Alan Cox
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Cox @ 2003-09-08 12:28 UTC (permalink / raw)
  To: Jon Smirl; +Cc: Benjamin Herrenschmidt, kronos, Linux Kernel Mailing List

> On my system I have 1GB physical and 1GB swap. So there should always be some
> open address space in the 1-4GB kernel address space. Would it be better to map

The kernel address space is 3Gb-4Gb (ie 1Gb sized) giving a 3Gb user
address space.

> The kernel DRM drivers map framebuffers up to 256MB in size into user space.
> Could this be mapped as a single 256MB page instead of 64K 4KB ones?

Well the CPU only has 4K/4Mb as the basic choices but you could map it
using 4Mb pages in theory - in practice its rather complicated because
of the VM handling. 2.6 has some basic stuff for doing this kind of
thing with fixed unswappable memory.

However if your radeon driver is touching the RAM often enough to matter
you have another problem.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mapping large framebuffers into kernel space
  2003-09-07 19:12 ` Alan Cox
  2003-09-07 19:26   ` Zwane Mwaikambo
@ 2003-09-07 19:42   ` Jon Smirl
  1 sibling, 0 replies; 8+ messages in thread
From: Jon Smirl @ 2003-09-07 19:42 UTC (permalink / raw)
  To: Alan Cox; +Cc: Benjamin Herrenschmidt, kronos, Linux Kernel Mailing List

--- Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> By the time we need to really kernel map 512Mb of frame buffer hopefully
> 32bit will be dead 8)

I hope 32bits dies real soon. You can buy 256MB cards off the shelf right now.
I bet we have 512MB ones by next Christmas.

=====
Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mapping large framebuffers into kernel space
  2003-09-07 19:12 ` Alan Cox
@ 2003-09-07 19:26   ` Zwane Mwaikambo
  2003-09-07 19:42   ` Jon Smirl
  1 sibling, 0 replies; 8+ messages in thread
From: Zwane Mwaikambo @ 2003-09-07 19:26 UTC (permalink / raw)
  To: Alan Cox
  Cc: Jon Smirl, Benjamin Herrenschmidt, kronos, Linux Kernel Mailing List

On Sun, 7 Sep 2003, Alan Cox wrote:

> By the time we need to really kernel map 512Mb of frame buffer hopefully
> 32bit will be dead 8)

I hope that's also tongue in cheek ;)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Mapping large framebuffers into kernel space
  2003-09-07 18:21 Jon Smirl
@ 2003-09-07 19:12 ` Alan Cox
  2003-09-07 19:26   ` Zwane Mwaikambo
  2003-09-07 19:42   ` Jon Smirl
  0 siblings, 2 replies; 8+ messages in thread
From: Alan Cox @ 2003-09-07 19:12 UTC (permalink / raw)
  To: Jon Smirl; +Cc: Benjamin Herrenschmidt, kronos, Linux Kernel Mailing List

On Sul, 2003-09-07 at 19:21, Jon Smirl wrote:
> I'm beginning to wonder if framebuffers should be mapped into kernel space. 
> What's going to happen when I get a 512MB video card? Does the framebuffer have
> to be mapped in the first 1GB of kernel address space?

Yes but it shouldnt be mapping all of it blindly like that. Vesafb was
fixed for this, radeonfb needs fixing

> If the framebuffer is mapped, it's a perfect candidate for a large page table
> entry because it is a very large piece of linear memory that not's going to be paged.

By the time we need to really kernel map 512Mb of frame buffer hopefully
32bit will be dead 8)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Mapping large framebuffers into kernel space
@ 2003-09-07 18:21 Jon Smirl
  2003-09-07 19:12 ` Alan Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Jon Smirl @ 2003-09-07 18:21 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, kronos; +Cc: linux-kernel

I just got a new P4 machine with 1GB memory and I'm trying to make radeonfb
work on it.  I am compiled with HIGHMEM4G. The motherboard is i875P based which
supports 64b DMA.

When I first loaded radeonfb it would fail because ioremap was failing. I
tracked the problem down to not having any free kernel address space below 1GB.
I created some by adding reserve=FE000000-100000000 to the kernel command line.
 This allowed radeonfb to load.

I'm beginning to wonder if framebuffers should be mapped into kernel space. 
What's going to happen when I get a 512MB video card? Does the framebuffer have
to be mapped in the first 1GB of kernel address space?

If the framebuffer is mapped, it's a perfect candidate for a large page table
entry because it is a very large piece of linear memory that not's going to be paged.

=====
Jon Smirl
jonsmirl@yahoo.com

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-09-08 12:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-07 21:18 Mapping large framebuffers into kernel space Jon Smirl
2003-09-07 22:25 ` Alan Cox
2003-09-08  0:17   ` Jon Smirl
2003-09-08 12:28     ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2003-09-07 18:21 Jon Smirl
2003-09-07 19:12 ` Alan Cox
2003-09-07 19:26   ` Zwane Mwaikambo
2003-09-07 19:42   ` Jon Smirl

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).