All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 08/15] drm/amdgpu/sdma3: add ring callbacks for ib and dma frame size
Date: Fri, 16 Sep 2016 12:05:45 -0400	[thread overview]
Message-ID: <1474041952-2378-8-git-send-email-alexander.deucher@amd.com> (raw)
In-Reply-To: <1474041952-2378-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index cabb9fe..62e2f4c 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -1108,6 +1108,22 @@ static void sdma_v3_0_ring_emit_vm_flush(struct amdgpu_ring *ring,
 			  SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */
 }
 
+static unsigned sdma_v3_0_ring_get_emit_ib_size(struct amdgpu_ring *ring)
+{
+	return
+		7 + 6; /* sdma_v3_0_ring_emit_ib */
+}
+
+static unsigned sdma_v3_0_ring_get_dma_frame_size(struct amdgpu_ring *ring)
+{
+	return
+		6 + /* sdma_v3_0_ring_emit_hdp_flush */
+		3 + /* sdma_v3_0_ring_emit_hdp_invalidate */
+		6 + /* sdma_v3_0_ring_emit_pipeline_sync */
+		12 + /* sdma_v3_0_ring_emit_vm_flush */
+		10 + 10 + 10; /* sdma_v3_0_ring_emit_fence x3 for user fence, vm fence */
+}
+
 static int sdma_v3_0_early_init(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
@@ -1569,6 +1585,8 @@ static const struct amdgpu_ring_funcs sdma_v3_0_ring_funcs = {
 	.test_ib = sdma_v3_0_ring_test_ib,
 	.insert_nop = sdma_v3_0_ring_insert_nop,
 	.pad_ib = sdma_v3_0_ring_pad_ib,
+	.get_emit_ib_size = sdma_v3_0_ring_get_emit_ib_size,
+	.get_dma_frame_size = sdma_v3_0_ring_get_dma_frame_size,
 };
 
 static void sdma_v3_0_set_ring_funcs(struct amdgpu_device *adev)
-- 
2.5.5

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

  parent reply	other threads:[~2016-09-16 16:05 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   ` Alex Deucher [this message]
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

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=1474041952-2378-8-git-send-email-alexander.deucher@amd.com \
    --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@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.