All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
To: Alex Deucher
	<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 15/15] drm/amdgpu: use the new ring ib and dma frame size callbacks
Date: Fri, 16 Sep 2016 19:48:47 +0200	[thread overview]
Message-ID: <c751b2e9-c680-a5c3-2409-60506498eb96@vodafone.de> (raw)
In-Reply-To: <1474041952-2378-15-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>

Am 16.09.2016 um 18:05 schrieb Alex Deucher:
> Use them to more accurately determine the ring size required
> for ib submission.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> index 2aa741c..ac08ae7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
> @@ -125,7 +125,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
>   	unsigned patch_offset = ~0;
>   	struct amdgpu_vm *vm;
>   	uint64_t fence_ctx;
> -	uint32_t status = 0;
> +	uint32_t status = 0, alloc_size;
>   
>   	unsigned i;
>   	int r = 0;
> @@ -152,7 +152,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
>   		return -EINVAL;
>   	}
>   
> -	r = amdgpu_ring_alloc(ring, 256 * num_ibs);
> +	alloc_size = amdgpu_ring_get_dma_frame_size(ring) +
> +		num_ibs * amdgpu_ring_get_emit_ib_size(ring);
> +	alloc_size = (alloc_size + ring->align_mask) & ~ring->align_mask;
amdgpu_ring_alloc() is doing this anyway, so this is superfluous here.

With that fixed the whole series is Reviewed-by: Christian König 
<christian.koenig@amd.com>.

Regards,
Christian.

> +
> +	r = amdgpu_ring_alloc(ring, alloc_size);
>   	if (r) {
>   		dev_err(adev->dev, "scheduling IB failed (%d).\n", r);
>   		return r;


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2016-09-16 17:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 16:05 [PATCH 01/15] drm/amdgpu/ring: add an interface to get dma frame and ib size Alex Deucher
     [not found] ` <1474041952-2378-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-09-16 16:05   ` [PATCH 02/15] drm/amdgpu/gfx6: add ring callbacks for ib and dma frame size Alex Deucher
2016-09-16 16:05   ` [PATCH 03/15] drm/amdgpu/gfx7: " Alex Deucher
2016-09-16 16:05   ` [PATCH 04/15] drm/amdgpu/gfx8: " Alex Deucher
2016-09-16 16:05   ` [PATCH 05/15] drm/amdgpu/si_dma: " Alex Deucher
2016-09-16 16:05   ` [PATCH 06/15] drm/amdgpu/cik_sdma: " Alex Deucher
2016-09-16 16:05   ` [PATCH 07/15] drm/amdgpu/sdma2.4: " Alex Deucher
2016-09-16 16:05   ` [PATCH 08/15] drm/amdgpu/sdma3: " Alex Deucher
2016-09-16 16:05   ` [PATCH 09/15] drm/amdgpu/uvd4.2: " Alex Deucher
2016-09-16 16:05   ` [PATCH 10/15] drm/amdgpu/uvd5: " Alex Deucher
2016-09-16 16:05   ` [PATCH 11/15] drm/amdgpu/uvd6: " Alex Deucher
2016-09-16 16:05   ` [PATCH 12/15] drm/amdgpu/vce: add common " Alex Deucher
2016-09-16 16:05   ` [PATCH 13/15] drm/amdgpu/vce2: add " Alex Deucher
2016-09-16 16:05   ` [PATCH 14/15] drm/amdgpu/vce3: " Alex Deucher
2016-09-16 16:05   ` [PATCH 15/15] drm/amdgpu: use the new ring ib and dma frame size callbacks Alex Deucher
     [not found]     ` <1474041952-2378-15-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2016-09-16 17:48       ` 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=c751b2e9-c680-a5c3-2409-60506498eb96@vodafone.de \
    --to=deathsimple-antagkrnahcb1svskn2v4q@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=amd-gfx-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.