From: Daniel Vetter <daniel@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, Ben Widawsky <ben@bwidawsk.net>
Subject: Re: [PATCH 1/4] drm/i915: s/obj->exec_list/obj->obj_exec_link
Date: Wed, 14 Aug 2013 11:42:27 +0200 [thread overview]
Message-ID: <20130814094226.GR9296@phenom.ffwll.local> (raw)
In-Reply-To: <1376473116-21874-2-git-send-email-daniel.vetter@ffwll.ch>
On Wed, Aug 14, 2013 at 11:38:33AM +0200, Daniel Vetter wrote:
> From: Ben Widawsky <ben@bwidawsk.net>
>
> To convert the execbuf code over to use vmas natively we need to
> shuffle the exec_list a bit. This patch here just prepares things with
> the debugfs code, which also uses the old exec_list list_head, newly
> called obj_exec_link.
Meh, patch subject is missing a "in debugfs" at the end. I'll fix this
when merging.
-Daniel
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> [danvet: Split out from Ben's big patch.]
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 12 ++++++------
> drivers/gpu/drm/i915/i915_drv.h | 2 ++
> drivers/gpu/drm/i915/i915_gem.c | 1 +
> 3 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index eb87865..4785d8c 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -195,9 +195,9 @@ static int obj_rank_by_stolen(void *priv,
> struct list_head *A, struct list_head *B)
> {
> struct drm_i915_gem_object *a =
> - container_of(A, struct drm_i915_gem_object, exec_list);
> + container_of(A, struct drm_i915_gem_object, obj_exec_link);
> struct drm_i915_gem_object *b =
> - container_of(B, struct drm_i915_gem_object, exec_list);
> + container_of(B, struct drm_i915_gem_object, obj_exec_link);
>
> return a->stolen->start - b->stolen->start;
> }
> @@ -221,7 +221,7 @@ static int i915_gem_stolen_list_info(struct seq_file *m, void *data)
> if (obj->stolen == NULL)
> continue;
>
> - list_add(&obj->exec_list, &stolen);
> + list_add(&obj->obj_exec_link, &stolen);
>
> total_obj_size += obj->base.size;
> total_gtt_size += i915_gem_obj_ggtt_size(obj);
> @@ -231,7 +231,7 @@ static int i915_gem_stolen_list_info(struct seq_file *m, void *data)
> if (obj->stolen == NULL)
> continue;
>
> - list_add(&obj->exec_list, &stolen);
> + list_add(&obj->obj_exec_link, &stolen);
>
> total_obj_size += obj->base.size;
> count++;
> @@ -239,11 +239,11 @@ static int i915_gem_stolen_list_info(struct seq_file *m, void *data)
> list_sort(NULL, &stolen, obj_rank_by_stolen);
> seq_puts(m, "Stolen:\n");
> while (!list_empty(&stolen)) {
> - obj = list_first_entry(&stolen, typeof(*obj), exec_list);
> + obj = list_first_entry(&stolen, typeof(*obj), obj_exec_link);
> seq_puts(m, " ");
> describe_obj(m, obj);
> seq_putc(m, '\n');
> - list_del_init(&obj->exec_list);
> + list_del_init(&obj->obj_exec_link);
> }
> mutex_unlock(&dev->struct_mutex);
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 2e7d5f9..6532d97 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1312,6 +1312,8 @@ struct drm_i915_gem_object {
> struct list_head global_list;
>
> struct list_head ring_list;
> + /** Used in execbuf to temporarily hold a ref */
> + struct list_head obj_exec_link;
> /** This object's place in the batchbuffer or on the eviction list */
> struct list_head exec_list;
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index fd48724..219e2fb 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3993,6 +3993,7 @@ void i915_gem_object_init(struct drm_i915_gem_object *obj,
> INIT_LIST_HEAD(&obj->global_list);
> INIT_LIST_HEAD(&obj->ring_list);
> INIT_LIST_HEAD(&obj->exec_list);
> + INIT_LIST_HEAD(&obj->obj_exec_link);
> INIT_LIST_HEAD(&obj->vma_list);
>
> obj->ops = ops;
> --
> 1.8.4.rc1
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2013-08-14 9:42 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-14 1:09 [PATCH 1/4] [v2] drm/i915: Remove node only when allocated Ben Widawsky
2013-08-14 1:09 ` [PATCH 2/4] [v3] drm/i915: cleanup map&fence in bind Ben Widawsky
2013-08-14 8:18 ` Daniel Vetter
2013-08-14 17:27 ` Ben Widawsky
2013-08-14 18:08 ` Daniel Vetter
2013-08-14 1:09 ` [PATCH 3/4] drm: WARN when removing unallocated node Ben Widawsky
2013-08-14 8:52 ` [Intel-gfx] " Daniel Vetter
2013-08-14 1:09 ` [PATCH 4/4] [v4] drm/i915: Convert execbuf code to use vmas Ben Widawsky
2013-08-14 1:11 ` Ben Widawsky
2013-08-14 7:58 ` Chris Wilson
[not found] ` <20130814224358.GA21854@nuc-i3427.alporthouse.com>
2013-08-14 23:22 ` Ben Widawsky
2013-08-14 9:38 ` Split up execbuf vma conversion Daniel Vetter
2013-08-14 9:38 ` [PATCH 1/4] drm/i915: s/obj->exec_list/obj->obj_exec_link Daniel Vetter
2013-08-14 9:42 ` Daniel Vetter [this message]
2013-08-14 9:38 ` [PATCH 2/4] drm/i915: Switch eviction code to use vmas Daniel Vetter
2013-08-14 9:38 ` [PATCH 3/4] drm/i915: prepare bind_to_vm for preallocated vma Daniel Vetter
2013-08-14 9:38 ` [PATCH 4/4] drm/i915: Convert execbuf code to use vmas Daniel Vetter
2013-08-14 9:59 ` [PATCH] drm/i915: inline vma_create into lookup_or_create_vma Daniel Vetter
2013-08-14 11:49 ` Chris Wilson
2013-08-14 12:08 ` Daniel Vetter
2013-08-14 12:14 ` Daniel Vetter
2013-08-14 16:47 ` Daniel Vetter
2013-08-14 17:35 ` Ben Widawsky
2013-08-14 11:54 ` [PATCH 4/4] drm/i915: Convert execbuf code to use vmas Chris Wilson
2013-08-14 8:06 ` [PATCH 1/4] [v2] drm/i915: Remove node only when allocated Daniel Vetter
2013-08-14 8:15 ` Daniel Vetter
2013-08-15 14:05 ` Daniel Vetter
2013-08-15 21:42 ` Ben Widawsky
2013-08-14 8:19 ` Chris Wilson
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=20130814094226.GR9296@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ben@bwidawsk.net \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/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