All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/mm: Adjust start/end for coloring first
Date: Mon, 19 May 2014 12:24:27 +0200	[thread overview]
Message-ID: <20140519102427.GH8790@phenom.ffwll.local> (raw)
In-Reply-To: <1400482357-24988-1-git-send-email-chris@chris-wilson.co.uk>

On Mon, May 19, 2014 at 07:52:37AM +0100, Chris Wilson wrote:
> The current user of the coloring will adjust the end points of the node
> to leave a hole between disjoint memory types. This adjustment must be
> performed first or else the derived size will conflict with the
> adjustment and trigger the BUG_ON sanity checks that the node is within
> bounds.
> 
> Fixes regression from
> commit 62347f9e0f81d50e9b0923ec8a192f60ab7a1801
> Author: Lauri Kasanen <cand@gmx.com>
> Date:   Wed Apr 2 20:03:57 2014 +0300
> 
>     drm: Add support for two-ended allocation, v3
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/drm_mm.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c
> index 04a209e2b66d..911863bed9f3 100644
> --- a/drivers/gpu/drm/drm_mm.c
> +++ b/drivers/gpu/drm/drm_mm.c
> @@ -264,12 +264,12 @@ static void drm_mm_insert_helper_range(struct drm_mm_node *hole_node,
>  	if (adj_end > end)
>  		adj_end = end;
>  
> -	if (flags & DRM_MM_CREATE_TOP)
> -		adj_start = adj_end - size;
> -
>  	if (mm->color_adjust)
>  		mm->color_adjust(hole_node, color, &adj_start, &adj_end);
>  
> +	if (flags & DRM_MM_CREATE_TOP)
> +		adj_start = adj_end - size;

With this we still don't handle interactions with alignment correctly. I
guess while we're at this we might as well fix that, too.
-Daniel

> +
>  	if (alignment) {
>  		unsigned tmp = adj_start % alignment;
>  		if (tmp) {
> -- 
> 2.0.0.rc2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

      parent reply	other threads:[~2014-05-19 10:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-19  6:52 [PATCH] drm/mm: Adjust start/end for coloring first Chris Wilson
2014-05-19  8:14 ` Daniel Vetter
2014-05-19  8:21   ` Chris Wilson
2014-05-19 10:22     ` Daniel Vetter
2014-05-19 10:24 ` Daniel Vetter [this message]

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=20140519102427.GH8790@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@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.