Skip to contentSkip to conversation

drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up

PATCH In review Shirish S 2 participants 2 messages Jul 23, 2018 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Shirish S

author
#0 lore raw

PATCH 1/1 drm/amdgpu: move the amdgpu_fbdev_set_suspend() further up

This patch moves amdgpu_fbdev_set_suspend() to the beginning of suspend sequence.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -3
index 7a1bec1..745f760 100644
@@ -2702,6 +2702,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
 
 	drm_kms_helper_poll_disable(dev);
 
+	if (fbcon)
+		amdgpu_fbdev_set_suspend(adev, 1);
+
 	if (!amdgpu_device_has_dc_support(adev)) {
 		/* turn off display hw */
 		drm_modeset_lock_all(dev);
@@ -2767,9 +2770,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
 			DRM_ERROR("amdgpu asic reset failed\n");
 	}
 
-	if (fbcon)
-		amdgpu_fbdev_set_suspend(adev, 1);
-
 	return 0;
 }
 
Signature · 6 lines
2.7.4

_______________________________________________
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): 1532340381-28557-1-git-send-email-shirish.s-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 2 lines · Shirish S

This patch moves amdgpu_fbdev_set_suspend() to the beginning of suspend sequence.

Would be nice to have some rationale, e.g.:

This is to avoid fbcon trying to write to the GPU's memory when the GPU is already powered down.

Other than that looks great, thanks. With a rationale added to the commit log,

Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx