Skip to contentSkip to conversation

drm/amdgpu: refine the logic in amdgpu_need_post()

PATCH In review Alex Deucher 3 participants 3 messages Mar 28, 2017 – Mar 29, 2017 1 message not in the archive

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

PATCH 1/1 drm/amdgpu: refine the logic in amdgpu_need_post()

We check the mem config register to make sure it's been programmed by the vbios to determine if we need to post so we check for a non-0 value. However, when the asic comes out of reset, we may see all ones here, so check for that too.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 2a5af62..4bf1c8f 100644
@@ -719,7 +719,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
 	/* then check MEM_SIZE, in case the crtcs are off */
 	reg = amdgpu_asic_get_config_memsize(adev);
 
-	if (reg)
+	if ((reg != 0) && (reg != 0xffffffff))
 		return false;
 
 	return true;
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): 1490718105-24996-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 28.03.2017 um 18:21 schrieb Alex Deucher:

Quoted 7 lines

We check the mem config register to make sure it's been programmed by the vbios to determine if we need to post so we check for a non-0 value. However, when the asic comes out of reset, we may see all ones here, so check for that too.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 2a5af62..4bf1c8f 100644

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

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
@@ -719,7 +719,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
  	/* then check MEM_SIZE, in case the crtcs are off */
  	reg = amdgpu_asic_get_config_memsize(adev);
 
-	if (reg)
+	if ((reg != 0) && (reg != 0xffffffff))
  		return false;
 
  	return true;

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

Reviewed-by Jim Qu
#3 lore raw
In reply to a message not in the archive

Thanks
JimQu

________________________________________
发件人: amd-gfx <[email protected]> 代表 Alex Deucher <[email protected]> 发送时间: 2017年3月29日 0:21
收件人: [email protected]
抄送: Deucher, Alexander
主题: [PATCH] drm/amdgpu: refine the logic in amdgpu_need_post()

We check the mem config register to make sure it's been programmed by the vbios to determine if we need to post so we check for a non-0 value. However, when the asic comes out of reset, we may see all ones here, so check for that too.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 2a5af62..4bf1c8f 100644
@@ -719,7 +719,7 @@ bool amdgpu_need_post(struct amdgpu_device *adev)
        /* then check MEM_SIZE, in case the crtcs are off */
        reg = amdgpu_asic_get_config_memsize(adev);
 
-       if (reg)
+       if ((reg != 0) && (reg != 0xffffffff))
                return false;
 
        return true;

--
2.5.5

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