Skip to contentSkip to conversation

drm/amdgpu: check scratch registers to see if we need post (v2)

PATCH In review Alex Deucher 2 participants 2 messages Jul 3, 2017 – Jul 7, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: check scratch registers to see if we need post (v2)

Rather than checking the CONGIG_MEMSIZE register as that may not be reliable on some APUs.

v2: The scratch register is only used on CIK+

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -1
index 63f4bed..8042a8a 100644
@@ -722,7 +722,12 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
 		adev->has_hw_reset = false;
 		return true;
 	}
-	/* then check MEM_SIZE, in case the crtcs are off */
+
+	/* bios scratch used on CIK+ */
+	if (adev->asic_type >= CHIP_BONAIRE)
+		return amdgpu_atombios_scratch_need_asic_init(adev);
+
+	/* check MEM_SIZE for older asics */
 	reg = amdgpu_asic_get_config_memsize(adev);
 
 	if ((reg != 0) && (reg != 0xffffffff))
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1499113203-21777-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by Junwei Zhang
#2 lore raw

Thanks for update.
That's fine for me.

Feel free to add my RB.

Quoted 20 lines · Alex Deucher

Rather than checking the CONGIG_MEMSIZE register as that may not be reliable on some APUs.

v2: The scratch register is only used on CIK+

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 63f4bed..8042a8a 100644
@@ -722,7 +722,12 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
  		adev->has_hw_reset = false;
  		return true;
  	}

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c bool amdgpu_need_post(struct amdgpu_device *adev) · line 733

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 -1
-	/* then check MEM_SIZE, in case the crtcs are off */
+
+	/* bios scratch used on CIK+ */
+	if (adev->asic_type >= CHIP_BONAIRE)
+		return amdgpu_atombios_scratch_need_asic_init(adev);
+
+	/* check MEM_SIZE for older asics */
  	reg = amdgpu_asic_get_config_memsize(adev);
 
  	if ((reg != 0) && (reg != 0xffffffff))

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx