From: Thomas Hellstrom <thellstrom@vmware.com>
To: z f <taishan901028@gmail.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: what does the glob array mean in DRM?
Date: Wed, 15 Apr 2015 07:34:47 +0200 [thread overview]
Message-ID: <552DF877.3000301@vmware.com> (raw)
In-Reply-To: <CADvLq85G5R6GxKnoP972OwJik19yWdGoB5R3gNtdsnMwASTLJg@mail.gmail.com>
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
parent reply other threads:[~2015-04-15 5:35 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CADvLq85G5R6GxKnoP972OwJik19yWdGoB5R3gNtdsnMwASTLJg@mail.gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=552DF877.3000301@vmware.com \
--to=thellstrom@vmware.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=taishan901028@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox