Skip to contentSkip to conversation

Patch "drm/amdgpu/gmc: move vram type fetching into sw_init" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Apr 13, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/amdgpu/gmc: move vram type fetching into sw_init

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-amdgpu-gmc-move-vram-type-fetching-into-sw_init.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From d1518a1db31a25682ea09c4b135fa72d9883be42 Mon Sep 17 00:00:00 2001

From: Alex Deucher <[email protected]>
Date: Thu, 31 Mar 2016 16:07:38 -0400
Subject: drm/amdgpu/gmc: move vram type fetching into sw_init

From: Alex Deucher <[email protected]>

commit d1518a1db31a25682ea09c4b135fa72d9883be42 upstream.

early_init gets called before atom asic init so on non-posted cards, the vram type is not initialized.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c |   16 ++++++++--------
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c |   16 ++++++++--------
 2 files changed, 16 insertions(+), 16 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +8 -8
@@ -898,14 +898,6 @@ static int gmc_v7_0_early_init(void *han
 	gmc_v7_0_set_gart_funcs(adev);
 	gmc_v7_0_set_irq_funcs(adev);
 
-	if (adev->flags & AMD_IS_APU) {
-		adev->mc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
-	} else {
-		u32 tmp = RREG32(mmMC_SEQ_MISC0);
-		tmp &= MC_SEQ_MISC0__MT__MASK;
-		adev->mc.vram_type = gmc_v7_0_convert_vram_type(tmp);
-	}
-
 	return 0;
 }
 
@@ -926,6 +918,14 @@ static int gmc_v7_0_sw_init(void *handle
 	if (r)
 		return r;
 
+	if (adev->flags & AMD_IS_APU) {
+		adev->mc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
+	} else {
+		u32 tmp = RREG32(mmMC_SEQ_MISC0);
+		tmp &= MC_SEQ_MISC0__MT__MASK;
+		adev->mc.vram_type = gmc_v7_0_convert_vram_type(tmp);
+	}
+
 	r = amdgpu_irq_add_id(adev, 146, &adev->mc.vm_fault);
 	if (r)
 		return r;
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +8 -8
@@ -852,14 +852,6 @@ static int gmc_v8_0_early_init(void *han
 	gmc_v8_0_set_gart_funcs(adev);
 	gmc_v8_0_set_irq_funcs(adev);
 
-	if (adev->flags & AMD_IS_APU) {
-		adev->mc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
-	} else {
-		u32 tmp = RREG32(mmMC_SEQ_MISC0);
-		tmp &= MC_SEQ_MISC0__MT__MASK;
-		adev->mc.vram_type = gmc_v8_0_convert_vram_type(tmp);
-	}
-
 	return 0;
 }
 
@@ -880,6 +872,14 @@ static int gmc_v8_0_sw_init(void *handle
 	if (r)
 		return r;
 
+	if (adev->flags & AMD_IS_APU) {
+		adev->mc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
+	} else {
+		u32 tmp = RREG32(mmMC_SEQ_MISC0);
+		tmp &= MC_SEQ_MISC0__MT__MASK;
+		adev->mc.vram_type = gmc_v8_0_convert_vram_type(tmp);
+	}
+
 	r = amdgpu_irq_add_id(adev, 146, &adev->mc.vm_fault);
 	if (r)
 		return r;

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/drm-radeon-add-a-dpm-quirk-for-all-r7-370-parts.patch queue-4.4/drm-radeon-add-a-dpm-quirk-for-sapphire-dual-x-r7-370-2g-d5.patch queue-4.4/drm-radeon-add-another-r7-370-quirk.patch queue-4.4/drm-amdgpu-gmc-use-proper-register-for-vram-type-on-fiji.patch queue-4.4/drm-amdgpu-gmc-move-vram-type-fetching-into-sw_init.patch