On 6/28/05, Thomas Hellström <[EMAIL PROTECTED]> wrote:
> You got me wrong. Item 2 above states that the device specific code
> specifies the number of possible SAREAS and their sizes to main DRM as
> part of its initialization.
>
> typically for two sareas something like
>
> static uint32_t via_sarea_sizes[] = {8192, 4096, 0};
>
> static struct drm_driver driver = {
> .driver_features =
> DRIVER_USE_AGP | DRIVER_USE_MTRR | DRIVER_HAVE_IRQ |
> DRIVER_IRQ_SHARED | DRIVER_IRQ_VBL,
> .context_ctor = via_init_context,
> .context_dtor = via_final_context,
> .vblank_wait = via_driver_vblank_wait,
> .....
> .sarea_sizes = via_sarea_sizes;
>
>
>
> New user code can then get a handle to the first sarea by calling
> (implementation of a new ioctl)
>
> drmGetSAREA(0, &handle, &size);
> drmGetSAREA(1, &handle, &size);
>
> whereas drmGetSAREA(2,....) and upwards would fail in this case.
>
> /Thomas
That will work since the amount of memory being allocated is
constrained by the driver.
--
Jon Smirl
[EMAIL PROTECTED]
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel