All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] nouveau: fix channel closing
Date: Wed, 02 May 2012 21:21:45 +1000	[thread overview]
Message-ID: <1335957705.1898.0.camel@nisroch> (raw)
In-Reply-To: <20120501212445.GA6212-OI9uyE9O0yo@public.gmane.org>

On Tue, 2012-05-01 at 23:24 +0200, Marcin Slusarz wrote:
> Restore code lost in libdrm_nouveau rewrite.
Thanks, pushed.

> ---
>  nouveau/nouveau.c |   17 ++++++++++++-----
>  1 files changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
> index f0bc2c3..5aa4107 100644
> --- a/nouveau/nouveau.c
> +++ b/nouveau/nouveau.c
> @@ -278,15 +278,22 @@ nouveau_object_new(struct nouveau_object *parent, uint64_t handle,
>  void
>  nouveau_object_del(struct nouveau_object **pobj)
>  {
> -	struct drm_nouveau_gpuobj_free req;
>  	struct nouveau_object *obj = *pobj;
>  	struct nouveau_device *dev;
>  	if (obj) {
>  		dev = nouveau_object_find(obj, NOUVEAU_DEVICE_CLASS);
> -		req.channel = obj->parent->handle;
> -		req.handle  = obj->handle;
> -		drmCommandWrite(dev->fd, DRM_NOUVEAU_GPUOBJ_FREE,
> -				&req, sizeof(req));
> +		if (obj->oclass == NOUVEAU_FIFO_CHANNEL_CLASS) {
> +			struct drm_nouveau_channel_free req;
> +			req.channel = obj->handle;
> +			drmCommandWrite(dev->fd, DRM_NOUVEAU_CHANNEL_FREE,
> +					&req, sizeof(req));
> +		} else {
> +			struct drm_nouveau_gpuobj_free req;
> +			req.channel = obj->parent->handle;
> +			req.handle  = obj->handle;
> +			drmCommandWrite(dev->fd, DRM_NOUVEAU_GPUOBJ_FREE,
> +					&req, sizeof(req));
> +		}
>  	}
>  	free(obj);
>  	*pobj = NULL;

      parent reply	other threads:[~2012-05-02 11:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01 21:24 [PATCH] nouveau: fix channel closing Marcin Slusarz
     [not found] ` <20120501212445.GA6212-OI9uyE9O0yo@public.gmane.org>
2012-05-02 11:21   ` Ben Skeggs [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=1335957705.1898.0.camel@nisroch \
    --to=skeggsb-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.