Ian Romanick wrote:

The problem with the SAREA is that user-mode can request an SAREA

*larger* than the kernel knows about.  For example, the user-mode
drivers can add extra fields for the DDX and client-side drivers to
communicate.  The kernel doesn't need to know anything about what's in
that memory.  It just knows that user mode wants N bytes of shared
space.  If region is created in advance, there is no opportunity for
user-mode to specify a size.

HOWEVER, the map creation can still be done within the kernel during a
bootstrap process.  It would have been very easy for the
MGA_DRM_BOOTSTRAP_DMA ioctl to create the mapping for the SAREA.

The current model actually allows for the server to create a number of shared memory areas and to specify a flag for the one that contains the hardware lock. If this model is kept then the size of the sarea created at kernel module initialization time could IMHO be known by the kernel. If dri is used for other applications with special needs that does not fit in the defalult size (for example the unichrome XvMC in the future) they could create an sarea mapping of their own and should not need to be root to do this, perhaps master though, since the map handle still needs to be communicated to all clients. This would require the drmAddMap or similar functionality to remain.

>Some drivers (e.g., pre-3.2 MGA DRM) poll registers to know when the
>engine is idle. The radeon / r200 drivers can also fallback to
>something similar if interrupts are not available. I think some of the
>other drivers may do similar things.

Unichrome is doing this as well. Both OpenGL and XvMC drivers.

/Thomas


If all of the maps are permanently created AddMap can be turned into a noop.

s/If all of the maps are permanently created/When all map creation is
moved into the kernel/  ;)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCtv0vX1gOwKyEAw8RAiE/AKCNiuRCyeW/G/7qkiNrSLPnKnoiZgCdHWQb
EKvDG2Ojcy+L/cos60EnQiU=
=BXDR
-----END PGP SIGNATURE-----



-------------------------------------------------------
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_id=7477&alloc_id=16492&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel




-------------------------------------------------------
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_id=7477&alloc_id=16492&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to