All of lore.kernel.org
 help / color / mirror / Atom feed
From: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Frank Min <Frank.Min-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 8/9] drm/amdgpu:wptr poll address of gfx8 is needed
Date: Wed, 28 Sep 2016 16:36:19 +0800	[thread overview]
Message-ID: <1475051780-21634-8-git-send-email-Monk.Liu@amd.com> (raw)
In-Reply-To: <1475051780-21634-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>

From: Frank Min <Frank.Min@amd.com>

for GFX8, gfx ring's wptr_addr is needed by SRIOV & CP for polling.

Change-Id: I14477577ef50d1ac90ccc32d41819276811732b7
Signed-off-by: Frank Min <Frank.Min@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 097108a..98ef1fe 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4338,7 +4338,7 @@ static int gfx_v8_0_cp_gfx_resume(struct amdgpu_device *adev)
 	struct amdgpu_ring *ring;
 	u32 tmp;
 	u32 rb_bufsz;
-	u64 rb_addr, rptr_addr;
+	u64 rb_addr, rptr_addr, wptr_gpu_addr;
 	int r;
 
 	/* Set the write pointer delay */
@@ -4369,6 +4369,9 @@ static int gfx_v8_0_cp_gfx_resume(struct amdgpu_device *adev)
 	WREG32(mmCP_RB0_RPTR_ADDR, lower_32_bits(rptr_addr));
 	WREG32(mmCP_RB0_RPTR_ADDR_HI, upper_32_bits(rptr_addr) & 0xFF);
 
+	wptr_gpu_addr = adev->wb.gpu_addr + (ring->wptr_offs * 4);
+	WREG32(mmCP_RB_WPTR_POLL_ADDR_LO, lower_32_bits(wptr_gpu_addr));
+	WREG32(mmCP_RB_WPTR_POLL_ADDR_HI, upper_32_bits(wptr_gpu_addr));
 	mdelay(1);
 	WREG32(mmCP_RB0_CNTL, tmp);
 
-- 
1.9.1

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

  parent reply	other threads:[~2016-09-28  8:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  8:36 [PATCH 1/9] drm/amdgpu:exclude 5dw digest for entry Monk Liu
     [not found] ` <1475051780-21634-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-09-28  8:36   ` [PATCH 2/9] drm/amdgpu:add one more fiji device id Monk Liu
2016-09-28  8:36   ` [PATCH 3/9] drm/amdgpu:use smc_index_11 for VI Monk Liu
2016-09-28  8:36   ` [PATCH 4/9] drm/amdgpu:keep bo pinned in prefered domain Monk Liu
     [not found]     ` <1475051780-21634-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-10-02 21:14       ` Grazvydas Ignotas
2016-09-28  8:36   ` [PATCH 5/9] drm/amdgpu:fw bo should be in VRAM for SRIOV Monk Liu
2016-09-28  8:36   ` [PATCH 6/9] drm/amdgpu:add callback in cgs for sriov detect Monk Liu
2016-09-28  8:36   ` [PATCH 7/9] drm/amdgpu:add MEC_STORAGE ucode id for sriov Monk Liu
2016-09-28  8:36   ` Monk Liu [this message]
     [not found]     ` <1475051780-21634-8-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-09-28 13:41       ` [PATCH 8/9] drm/amdgpu:wptr poll address of gfx8 is needed StDenis, Tom
     [not found]         ` <CY4PR12MB17686C79F11C47CC29E00E2EF7CF0-rpdhrqHFk06yjjPBNVDk/QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2016-09-28 15:27           ` Deucher, Alexander
2016-09-28  8:36   ` [PATCH 9/9] drm/amdgpu:properly fix some JumpTable issues Monk Liu
     [not found]     ` <1475051780-21634-9-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2016-09-28 13:38       ` Edward O'Callaghan
2016-09-28 19:00   ` [PATCH 1/9] drm/amdgpu:exclude 5dw digest for entry Alex Deucher

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=1475051780-21634-8-git-send-email-Monk.Liu@amd.com \
    --to=monk.liu-5c7gfcevmho@public.gmane.org \
    --cc=Frank.Min-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.