From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm: Export routines for inserting preallocated nodes into the mm manager
Date: Tue, 18 Dec 2012 01:28:22 +0100 [thread overview]
Message-ID: <20121218002822.GT5737@phenom.ffwll.local> (raw)
In-Reply-To: <1354912628-7776-1-git-send-email-chris@chris-wilson.co.uk>
On Fri, Dec 07, 2012 at 08:37:06PM +0000, Chris Wilson wrote:
> Required by i915 in order to avoid the allocation in the middle of
> manipulating the drm_mm lists.
>
> Use a pair of stubs to preserve the existing EXPORT_SYMBOLs for
> backporting; to be removed later.
>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/drm_mm.c | 42 ++++++++++++++++++++++++++++++------------
> include/drm/drm_mm.h | 27 +++++++++++++++++++++++----
> 2 files changed, 53 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 0761a03..d93dc05 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -184,19 +184,27 @@ EXPORT_SYMBOL(drm_mm_get_block_generic);
> * -ENOSPC if no suitable free area is available. The preallocated memory node
> * must be cleared.
> */
> -int drm_mm_insert_node(struct drm_mm *mm, struct drm_mm_node *node,
> - unsigned long size, unsigned alignment)
> +int drm_mm_insert_node_generic(struct drm_mm *mm, struct drm_mm_node *node,
> + unsigned long size, unsigned alignment,
> + unsigned long color, int atomic)
> {
> struct drm_mm_node *hole_node;
>
> - hole_node = drm_mm_search_free(mm, size, alignment, false);
> + hole_node = drm_mm_search_free_generic(mm, size, alignment,
> + color, atomic);
The last parameter of search_free_generic is best_match, which isn't used
by any current caller. The only reason it's still there is that I haven't
converted yet all drm_mm.c users to preallocate drm_mm_node's, but as soon
as that's done best_match will die together with search_free_generic as a
public interface.
So what's the atomic doing in here? I've looked through the drm/i915
patches and couldn't see any reason ... Can we just respin the two i915
patches with _generic and atomic = false dropped, or do I miss something
big here?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
next prev parent reply other threads:[~2012-12-18 0:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-07 20:37 [PATCH 1/3] drm: Export routines for inserting preallocated nodes into the mm manager Chris Wilson
2012-12-07 20:37 ` [PATCH 2/3] drm/i915: Preallocate the drm_mm_node prior to manipulating the GTT drm_mm manager Chris Wilson
2012-12-12 10:18 ` Jani Nikula
2012-12-12 10:27 ` Chris Wilson
2012-12-07 20:37 ` [PATCH 3/3] drm/i915: Preallocate mm node for GTT mmap offset Chris Wilson
2012-12-12 10:48 ` Jani Nikula
2012-12-12 10:55 ` Chris Wilson
2012-12-18 21:11 ` Daniel Vetter
2012-12-18 22:36 ` Daniel Vetter
2012-12-18 22:10 ` Dave Airlie
2012-12-18 22:40 ` Chris Wilson
2012-12-12 10:02 ` [PATCH 1/3] drm: Export routines for inserting preallocated nodes into the mm manager Jani Nikula
2012-12-18 0:28 ` Daniel Vetter [this message]
2012-12-18 9:13 ` 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=20121218002822.GT5737@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@redhat.com \
--cc=chris@chris-wilson.co.uk \
--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.