All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/amdgpu: only deinitialize initialized ib's.
Date: Fri, 21 Aug 2015 10:13:03 +0200	[thread overview]
Message-ID: <55D6DD8F.90407@vodafone.de> (raw)
In-Reply-To: <1440103912-1014-1-git-send-email-bas@basnieuwenhuizen.nl>

On 20.08.2015 22:51, Bas Nieuwenhuizen wrote:
> Signed-off-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>

Thanks for the help, but I've addressed both bugs internally already and 
they are just waiting for public release.

Not sure which patches Alex are going to pick now.

In general it looks like we should probably move our internal 
discussions and patches to the public.

Going to kick this of,
Christian.

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu.h    | 1 +
>   drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
>   2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 2fc58e6..454d4e2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -1250,6 +1250,7 @@ struct amdgpu_cs_parser {
>   
>   	struct amdgpu_ib	*ibs;
>   	uint32_t		num_ibs;
> +	uint32_t		num_initialized_ibs;
>   
>   	struct ww_acquire_ctx	ticket;
>   
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index e4424b4..2c49dd4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -509,7 +509,7 @@ static void amdgpu_cs_parser_fini_late(struct amdgpu_cs_parser *parser)
>   		drm_free_large(parser->chunks[i].kdata);
>   	kfree(parser->chunks);
>   	if (parser->ibs)
> -		for (i = 0; i < parser->num_ibs; i++)
> +		for (i = 0; i < parser->num_initialized_ibs; i++)
>   			amdgpu_ib_free(parser->adev, &parser->ibs[i]);
>   	kfree(parser->ibs);
>   	if (parser->uf.bo)
> @@ -708,6 +708,7 @@ static int amdgpu_cs_ib_fill(struct amdgpu_device *adev,
>   		ib->length_dw = chunk_ib->ib_bytes / 4;
>   		ib->flags = chunk_ib->flags;
>   		ib->ctx = parser->ctx;
> +                parser->num_initialized_ibs++;
>   		j++;
>   	}
>   

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2015-08-21  8:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 20:51 [PATCH 1/2] drm/amdgpu: only deinitialize initialized ib's Bas Nieuwenhuizen
2015-08-20 20:51 ` [PATCH 2/2] drm/amdgpu: call amdgpu_cs_parser_fini at most once per parser Bas Nieuwenhuizen
2015-08-21  8:13 ` Christian König [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=55D6DD8F.90407@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=bas@basnieuwenhuizen.nl \
    --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.