[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] Allocation of video RAM
31 maj 2010 kl. 14.19 skrev Jo Even Skarstein:
> --------------------------------------------------
> From: "Peter Persson" <pep.fishmoose@gmail.com>
> Sent: Monday, May 31, 2010 1:30 PM
> To: "MiNT Mailing List" <mint@lists.fishpool.fi>
> Subject: [MiNT] Allocation of video RAM
>
>> My question is about video RAM (VRAM). Right now there is no functionality for this in the kernel, except Screalloc(). This means that the driver
>> has to implement that stuff internally, which has several drawbacks. For example - if an application exits prematurely or doesn't do mfree() on
>> allocated VRAM, the memory won't be freed. Furthermore, there will be no memory protection for this additional class of RAM if it isn't
>> implemented in the kernel.
>
> The correct place for this would IMO be the VDI, e.g. to use the offscreen bitmap facility. Or do you want the VRAM to be available for other uses than video?
Imo the right way would be to have a low level API for this to ensure that memory protection etc. works as intended. AFAIK the VDI doesn't provide mechanisms for that, at least not any current VDI. Also, the usage scenario for an offscreen bitmap doesn't necessarily mean there is a point in putting it in VRAM (and CPU<>VRAM accesses are generally slower than the CPU<>TTRAM dito). So sure - it could be a point to have a VRAM aware VDI, which could in turn use the low level functionality in question. But right now we have no such thing.
-- PeP