MMU vs GPU (Was: The "iGoogle bug")

Bernardo Innocenti bernie at codewiz.org
Thu Sep 20 21:52:28 EDT 2007


NoiseEHC wrote:

>>  - Seeing if we can get the blitter to read source data directly from system
>>    memory.  I'd be very surprised if there was no way to make it work
>>    with virtual memory enabled, because, without such a mechanism, the
>>    blitter would be less than fully useful.
>>   
> Could somebody shed some light on this, please?
> 
> I think that probably the Linux kernel has some page locking function 
> which returns a list of physical addresses from a virtual address has 
> not it?

That's virt_to_phys(), yes... but it's not available in userspace.
All the people I've consulted agreed it's not easy to translate
virtual addresses from within a process.


> The Channel 3 DMA can be programmed to read from any 16MB block 
> from the 32 bit address space. Why is it hard to combine the two?
> Why is it even necessary to upload bitmaps to "video memory"?

Yes... UMA systems already pay a price in terms of memory bandwidth,
they should at least be compensated with the advantage of not having
to do the migration crap.

It's very likely a leftover from the original PC architecture with
separate CGA/EGA/VGA cards.  Even now that GPUs are being integrated
on the same physical die of the CPU, they still look and act like
external PCI devices :-)

DRM is supposed to help solve the virt_to_phys() problem.
But if we could do as you suggest and just use bitmaps scattered
through memory pages, we'd be *much* faster.


> ps:
> Note that I am not a Linux kernel developer (however can develop NT 
> drivers so at least I am not stupid).

In a large enterprise I worked for, only our smartest hacker (out of
a staff of 40 developers) could get to debug the damn NT winmodem
drivers.  Brrr... I've seen what it takes :-)))

-- 
 \__/
 |__|  Bernardo Innocenti - http://www.codewiz.org/
  \__\ One Laptop Per Child - http://www.laptop.org/



More information about the Devel mailing list