dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* Re: what does the glob array mean in DRM?
       [not found] <CADvLq85G5R6GxKnoP972OwJik19yWdGoB5R3gNtdsnMwASTLJg@mail.gmail.com>
@ 2015-04-15  5:34 ` Thomas Hellstrom
  0 siblings, 0 replies; only message in thread
From: Thomas Hellstrom @ 2015-04-15  5:34 UTC (permalink / raw)
  To: z f; +Cc: dri-devel@lists.freedesktop.org

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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-15  5:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CADvLq85G5R6GxKnoP972OwJik19yWdGoB5R3gNtdsnMwASTLJg@mail.gmail.com>
2015-04-15  5:34 ` what does the glob array mean in DRM? Thomas Hellstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox