Re: what does the glob array mean in DRM?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux