All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <skeggsb@gmail.com>
To: j.glisse@gmail.com
Cc: Jerome Glisse <jglisse@redhat.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/nouveau: fix ttm move notify callback
Date: Fri, 06 Jan 2012 07:53:13 +1000	[thread overview]
Message-ID: <1325800393.31799.0.camel@nisroch> (raw)
In-Reply-To: <1325788315-7724-1-git-send-email-j.glisse@gmail.com>

On Thu, 2012-01-05 at 13:31 -0500, j.glisse@gmail.com wrote:
> From: Jerome Glisse <jglisse@redhat.com>
> 
> ttm might call the move notify with null new mem placement,
> properly handle this case inside nouveau move notify callback.
This has been fixed already in a -next tree I sent to Dave.

Ben.
> 
> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
> ---
>  drivers/gpu/drm/nouveau/nouveau_bo.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
> index f12dd0f..65f5b0b 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bo.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
> @@ -808,9 +808,8 @@ out:
>  }
>  
>  static void
> -nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem)
> +nouveau_bo_move_notify(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem)
>  {
> -	struct nouveau_mem *node = new_mem->mm_node;
>  	struct nouveau_bo *nvbo = nouveau_bo(bo);
>  	struct nouveau_vma *vma;
>  
> @@ -820,6 +819,7 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem)
>  		} else
>  		if (new_mem && new_mem->mem_type == TTM_PL_TT &&
>  		    nvbo->page_shift == vma->vm->spg_shift) {
> +			struct nouveau_mem *node = new_mem->mm_node;
>  			nouveau_vm_map_sg(vma, 0, new_mem->
>  					  num_pages << PAGE_SHIFT,
>  					  node, node->pages);
> @@ -1131,7 +1131,7 @@ struct ttm_bo_driver nouveau_bo_driver = {
>  	.invalidate_caches = nouveau_bo_invalidate_caches,
>  	.init_mem_type = nouveau_bo_init_mem_type,
>  	.evict_flags = nouveau_bo_evict_flags,
> -	.move_notify = nouveau_bo_move_ntfy,
> +	.move_notify = nouveau_bo_move_notify,
>  	.move = nouveau_bo_move,
>  	.verify_access = nouveau_bo_verify_access,
>  	.sync_obj_signaled = __nouveau_fence_signalled,

  parent reply	other threads:[~2012-01-05 21:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05 18:31 [PATCH] drm/nouveau: fix ttm move notify callback j.glisse
2012-01-05 21:48 ` Konrad Rzeszutek Wilk
2012-01-05 21:51   ` Jerome Glisse
2012-01-05 21:53 ` Ben Skeggs [this message]
     [not found]   ` <20120106021410.GA3120@phenom.dumpdata.com>
2012-01-06 14:57     ` Konrad Rzeszutek Wilk
2012-01-06 16:51       ` Jerome Glisse
2012-01-06 16:53         ` Konrad Rzeszutek Wilk
2012-01-06 18:22           ` Jerome Glisse
2012-01-06 19:52             ` Konrad Rzeszutek Wilk
2012-01-06 21:00               ` Jerome Glisse
2012-01-10  3:46                 ` Ben Skeggs
2012-01-10 14:34                   ` Konrad Rzeszutek Wilk
2012-01-24 15:00                   ` Konrad Rzeszutek Wilk

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=1325800393.31799.0.camel@nisroch \
    --to=skeggsb@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=j.glisse@gmail.com \
    --cc=jglisse@redhat.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 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.