All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: Ben Widawsky <ben@bwidawsk.net>,
	Intel GFX <intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] [v3] drm: pre allocate node for create_block
Date: Fri, 5 Jul 2013 21:25:35 +0200	[thread overview]
Message-ID: <20130705192535.GW18285@phenom.ffwll.local> (raw)
In-Reply-To: <CANq1E4RAfhT-c+Dff9DwiLCFs+q8Y2yRekW+ObXxMeCXWOArXw@mail.gmail.com>

On Thu, Jul 04, 2013 at 10:32:27PM +0200, David Herrmann wrote:
> Hi
> 
> On Thu, Jul 4, 2013 at 10:14 PM, Ben Widawsky <ben@bwidawsk.net> wrote:
> > For an upcoming patch where we introduce the i915 VMA, it's ideal to
> > have the drm_mm_node as part of the VMA struct (ie. it's pre-allocated).
> > Part of the conversion to VMAs is to kill off obj->gtt_space. Doing this
> > will break a bunch of code, but amongst them are 2 callers of
> > drm_mm_create_block(), both related to stolen memory.
> >
> > It also allows us to embed the drm_mm_node into the object currently
> > which provides a nice transition over to the new code.
> >
> > v2: Reordered to do before ripping out obj->gtt_offset.
> > Some minor cleanups made available because of reordering.
> >
> > v3: s/continue/break on failed stolen node allocation (David)
> > Set obj->gtt_space on failed node allocation (David)
> > Only unref stolen (fix double free) on failed create_stolen (David)
> > Free node, and NULL it in failed create_stolen (David)
> > Add back accidentally removed newline (David)
> >
> > CC: <dri-devel@lists.freedesktop.org>
> > CC: David Herrmann <dh.herrmann@gmail.com>
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
> 
> I already suspected that you'd embed drm_mm_node in a follow-up patch
> but I am not subscribed to intel-gfx so I didn't get the other
> patches. Looks good now.
> 
> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>

Ok, I've discussed this a bit with Dave on irc and he's a bit unhappy with
the creat_block name. After a bit of chatting with Ben I think we should
go with

int drm_mm_reserve_node(struct drm_mm *mm, struct drm_mm_node *node);

The start/size/color arguments would then be passed in through the
drm_mm_node argument. Ben asked whether that's not too much poking around
in drm_mm_node internals, but imo those three pieces of it are part of the
public interface to drm_mm users.

Also, the patch as-is conflicts a bit too badly with my current tree. So
can you please apply the little bikeshed, rebase, and then rebase the
other patches in this series that I haven't merged on top of this?

Thanks, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2013-07-05 19:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-03 21:45 [PATCH 1/6] drm: pre allocate node for create_block Ben Widawsky
2013-07-03 21:45 ` [PATCH 2/6] drm/i915: Getter/setter for object attributes Ben Widawsky
2013-07-03 22:55   ` Daniel Vetter
2013-07-04  1:07     ` Ben Widawsky
2013-07-03 21:45 ` [PATCH 3/6] drm/i915: Kill obj->gtt_offset Ben Widawsky
2013-07-04 12:20   ` Daniel Vetter
2013-07-03 21:45 ` [PATCH 4/6] drm/i915: Use gtt_space->start for stolen reservation Ben Widawsky
2013-07-04 12:23   ` Daniel Vetter
2013-07-03 21:45 ` [PATCH 5/6] drm/i915: Embed drm_mm_node in i915 gem obj Ben Widawsky
2013-07-04 12:27   ` Daniel Vetter
2013-07-03 21:45 ` [PATCH 6/6] drm: Optionally create mm blocks from top-to-bottom Ben Widawsky
2013-07-04  9:19 ` [PATCH 1/6] drm: pre allocate node for create_block David Herrmann
2013-07-04 20:03   ` Ben Widawsky
2013-07-04  9:22 ` David Herrmann
2013-07-04 20:14 ` [PATCH] [v3] " Ben Widawsky
2013-07-04 20:32   ` David Herrmann
2013-07-05 19:25     ` Daniel Vetter [this message]
2013-07-05 19:44       ` Ben Widawsky

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=20130705192535.GW18285@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ben@bwidawsk.net \
    --cc=dh.herrmann@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.