what does the glob array mean in DRM?
Thomas Hellstrom
thellstrom at vmware.com
Tue Apr 14 22:34:47 PDT 2015
Hi.
It's a generic interface for stuff that needs to be global across all
devices. Currently I think it's only used for
ttm memory accounting.
Thanks,
Thomas
On 04/15/2015 07:13 AM, z f wrote:
> hi, I am start reading the DRM code in Linux.
> drm_core_init() -> drm_global_init()
> the later does something like this:
>
> struct drm_global_item {
> struct mutex mutex;
> void *object;
> int refcount;
> };
>
> static struct drm_global_item glob[DRM_GLOBAL_NUM];
>
> void drm_global_init(void)
> {
> int i;
>
> for (i = 0; i < DRM_GLOBAL_NUM; ++i) {
> struct drm_global_item *item = &glob[i];
> mutex_init(&item->mutex);
> item->object = NULL;
> item->refcount = 0;
> }
> }
>
> what's the glob array used for?
> sorry for asking question so sample, because I cant find great
> acticles to learn DRM.
More information about the dri-devel
mailing list