All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/8] drm/amdgpu: fix VMHUB order to match the hardware
@ 2017-04-03 12:39 Christian König
       [not found] ` <1491223199-28892-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Christian König @ 2017-04-03 12:39 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Christian König <christian.koenig@amd.com>

Match our defines with what the hw uses.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h   |  4 ++--
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 12 +++---------
 2 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 86fba1a..c156534 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -126,8 +126,8 @@ extern int amdgpu_param_buf_per_se;
 
 /* max number of VMHUB */
 #define AMDGPU_MAX_VMHUBS			2
-#define AMDGPU_MMHUB				0
-#define AMDGPU_GFXHUB				1
+#define AMDGPU_GFXHUB				0
+#define AMDGPU_MMHUB				1
 
 /* hardcode that limit for now */
 #define AMDGPU_VA_RESERVED_SIZE			(8 << 20)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index df69aae..8dd99b2 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -129,8 +129,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
 				struct amdgpu_irq_src *source,
 				struct amdgpu_iv_entry *entry)
 {
-	struct amdgpu_vmhub *gfxhub = &adev->vmhub[AMDGPU_GFXHUB];
-	struct amdgpu_vmhub *mmhub = &adev->vmhub[AMDGPU_MMHUB];
+	struct amdgpu_vmhub *hub = &adev->vmhub[entry->vm_id_src];
 	uint32_t status = 0;
 	u64 addr;
 
@@ -138,13 +137,8 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
 	addr |= ((u64)entry->src_data[1] & 0xf) << 44;
 
 	if (!amdgpu_sriov_vf(adev)) {
-		if (entry->vm_id_src) {
-			status = RREG32(mmhub->vm_l2_pro_fault_status);
-			WREG32_P(mmhub->vm_l2_pro_fault_cntl, 1, ~1);
-		} else {
-			status = RREG32(gfxhub->vm_l2_pro_fault_status);
-			WREG32_P(gfxhub->vm_l2_pro_fault_cntl, 1, ~1);
-		}
+		status = RREG32(hub->vm_l2_pro_fault_status);
+		WREG32_P(hub->vm_l2_pro_fault_cntl, 1, ~1);
 	}
 
 	if (printk_ratelimit()) {
-- 
2.5.0

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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-04-05  2:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 12:39 [PATCH 1/8] drm/amdgpu: fix VMHUB order to match the hardware Christian König
     [not found] ` <1491223199-28892-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-03 12:39   ` [PATCH 2/8] drm/amdgpu: move VM related defines into amdgpu_vm.h Christian König
2017-04-03 12:39   ` [PATCH 3/8] drm/amdgpu: remove VMID first tracking Christian König
2017-04-03 12:39   ` [PATCH 4/8] drm/amdgpu: coding style of amdgpu_vm_is_gpu_reset Christian König
2017-04-03 12:39   ` [PATCH 5/8] drm/amdgpu: cleanup coding style in amdgpu_vm_flush Christian König
     [not found]     ` <1491223199-28892-5-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-03 19:18       ` Alex Deucher
2017-04-03 12:39   ` [PATCH 6/8] drm/amdgpu: cleanup logic " Christian König
2017-04-03 12:39   ` [PATCH 7/8] drm/amdgpu: move adjust_mc_addr into amdgpu_gart_funcs Christian König
2017-04-03 12:39   ` [PATCH 8/8] drm/amdgpu: cleanup VMHUB bit definitions Christian König
     [not found]     ` <1491223199-28892-8-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-03 19:31       ` Alex Deucher
     [not found]         ` <CADnq5_M+jYQU6Utw8OrLeFurwsnw=5Y1EdgwXGnhBDrqtszhcQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-04  7:31           ` Christian König
2017-04-03 19:23   ` [PATCH 1/8] drm/amdgpu: fix VMHUB order to match the hardware Alex Deucher
     [not found]     ` <CADnq5_NHtW=w2YfZw4=3G-rsYRyxyGJ0NPRormJtB6p+BqUjfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-05  2:37       ` Zhang, Jerry (Junwei)

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.