All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64
@ 2021-06-09  3:55 Tiezhu Yang
  2021-06-23  8:14 ` Tiezhu Yang
  0 siblings, 1 reply; 7+ messages in thread
From: Tiezhu Yang @ 2021-06-09  3:55 UTC (permalink / raw)
  To: Alex Deucher, christian.koenig, David Airlie, Daniel Vetter
  Cc: amd-gfx, dri-devel, linux-kernel, Xuefeng Li, Jianmin Lv

On the Loongson64 platform used with Radeon GPU, shutdown or reboot failed
when console=tty is in the boot cmdline.

radeon_suspend_kms() puts the hw in the suspend state, especially set fb
state as FBINFO_STATE_SUSPENDED:

	if (fbcon) {
		console_lock();
		radeon_fbdev_set_suspend(rdev, 1);
		console_unlock();
	}

Then avoid to do any more fb operations in the related functions:

	if (p->state != FBINFO_STATE_RUNNING)
		return;

So call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64 to fix
this issue, it looks like some kind of workaround like powerpc.

Co-developed-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---

v3: Fix typo "becauase" in the original comment

 drivers/gpu/drm/radeon/radeon_drv.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index efeb115..40aece3 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -386,13 +386,13 @@ radeon_pci_shutdown(struct pci_dev *pdev)
 	if (radeon_device_is_virtual())
 		radeon_pci_remove(pdev);
 
-#ifdef CONFIG_PPC64
+#if defined(CONFIG_PPC64) || defined(CONFIG_MACH_LOONGSON64)
 	/*
 	 * Some adapters need to be suspended before a
 	 * shutdown occurs in order to prevent an error
-	 * during kexec.
-	 * Make this power specific becauase it breaks
-	 * some non-power boards.
+	 * during kexec, shutdown or reboot.
+	 * Make this power and Loongson specific because
+	 * it breaks some other boards.
 	 */
 	radeon_suspend_kms(pci_get_drvdata(pdev), true, true, false);
 #endif
-- 
2.1.0


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

* Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64
  2021-06-09  3:55 [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64 Tiezhu Yang
@ 2021-06-23  8:14 ` Tiezhu Yang
  2021-06-23  8:25     ` Christian König
  0 siblings, 1 reply; 7+ messages in thread
From: Tiezhu Yang @ 2021-06-23  8:14 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig
  Cc: yangtiezhu, airlied, amd-gfx, daniel, dri-devel, linux-kernel,
	lixuefeng, lvjianmin

Hi Alex and Christian,

Any comments?
Can this patch be accepted or anything else I need to improve?

https://lore.kernel.org/patchwork/patch/1443649/

Thanks,
Tiezhu


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

* Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64
  2021-06-23  8:14 ` Tiezhu Yang
  2021-06-23  8:25     ` Christian König
@ 2021-06-23  8:25     ` Christian König
  0 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2021-06-23  8:25 UTC (permalink / raw)
  To: Tiezhu Yang, alexander.deucher
  Cc: airlied, amd-gfx, daniel, dri-devel, linux-kernel, lixuefeng, lvjianmin

Looks good to me.

Somebody could try to investigate further why that is necessary on the 
platform, but radeon is only in maintenance mode without new feature 
developed.

Regards,
Christian.

Am 23.06.21 um 10:14 schrieb Tiezhu Yang:
> Hi Alex and Christian,
>
> Any comments?
> Can this patch be accepted or anything else I need to improve?
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fpatchwork%2Fpatch%2F1443649%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C2162309822114d2e41b108d9361ef26c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637600328822651335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2uxyAGk6sHO3lqw0FX6HITY%2Fbj%2BzEMfSIcqbzmiguMs%3D&amp;reserved=0 
>
>
> Thanks,
> Tiezhu
>


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

* Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64
@ 2021-06-23  8:25     ` Christian König
  0 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2021-06-23  8:25 UTC (permalink / raw)
  To: Tiezhu Yang, alexander.deucher
  Cc: airlied, linux-kernel, dri-devel, lvjianmin, amd-gfx, lixuefeng

Looks good to me.

Somebody could try to investigate further why that is necessary on the 
platform, but radeon is only in maintenance mode without new feature 
developed.

Regards,
Christian.

Am 23.06.21 um 10:14 schrieb Tiezhu Yang:
> Hi Alex and Christian,
>
> Any comments?
> Can this patch be accepted or anything else I need to improve?
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fpatchwork%2Fpatch%2F1443649%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C2162309822114d2e41b108d9361ef26c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637600328822651335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2uxyAGk6sHO3lqw0FX6HITY%2Fbj%2BzEMfSIcqbzmiguMs%3D&amp;reserved=0 
>
>
> Thanks,
> Tiezhu
>


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

* Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64
@ 2021-06-23  8:25     ` Christian König
  0 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2021-06-23  8:25 UTC (permalink / raw)
  To: Tiezhu Yang, alexander.deucher
  Cc: airlied, linux-kernel, dri-devel, lvjianmin, amd-gfx, daniel, lixuefeng

Looks good to me.

Somebody could try to investigate further why that is necessary on the 
platform, but radeon is only in maintenance mode without new feature 
developed.

Regards,
Christian.

Am 23.06.21 um 10:14 schrieb Tiezhu Yang:
> Hi Alex and Christian,
>
> Any comments?
> Can this patch be accepted or anything else I need to improve?
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fpatchwork%2Fpatch%2F1443649%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C2162309822114d2e41b108d9361ef26c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637600328822651335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2uxyAGk6sHO3lqw0FX6HITY%2Fbj%2BzEMfSIcqbzmiguMs%3D&amp;reserved=0 
>
>
> Thanks,
> Tiezhu
>

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

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

* Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64
  2021-06-23  8:25     ` Christian König
@ 2021-06-28 14:55       ` Deucher, Alexander
  -1 siblings, 0 replies; 7+ messages in thread
From: Deucher, Alexander @ 2021-06-28 14:55 UTC (permalink / raw)
  To: Koenig, Christian, Tiezhu Yang
  Cc: airlied, linux-kernel, dri-devel, lvjianmin, amd-gfx, lixuefeng

[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]

[Public]

Applied.  Thanks.  For whatever reason, I never got this patch and couldn't find it in patchwork.

Alex

________________________________
From: Koenig, Christian <Christian.Koenig@amd.com>
Sent: Wednesday, June 23, 2021 4:25 AM
To: Tiezhu Yang <yangtiezhu@loongson.cn>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: airlied@linux.ie <airlied@linux.ie>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; daniel@ffwll.ch <daniel@ffwll.ch>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; lixuefeng@loongson.cn <lixuefeng@loongson.cn>; lvjianmin@loongson.cn <lvjianmin@loongson.cn>
Subject: Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64

Looks good to me.

Somebody could try to investigate further why that is necessary on the
platform, but radeon is only in maintenance mode without new feature
developed.

Regards,
Christian.

Am 23.06.21 um 10:14 schrieb Tiezhu Yang:
> Hi Alex and Christian,
>
> Any comments?
> Can this patch be accepted or anything else I need to improve?
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fpatchwork%2Fpatch%2F1443649%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C2162309822114d2e41b108d9361ef26c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637600328822651335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2uxyAGk6sHO3lqw0FX6HITY%2Fbj%2BzEMfSIcqbzmiguMs%3D&amp;reserved=0
>
>
> Thanks,
> Tiezhu
>


[-- Attachment #2: Type: text/html, Size: 3479 bytes --]

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

* Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64
@ 2021-06-28 14:55       ` Deucher, Alexander
  0 siblings, 0 replies; 7+ messages in thread
From: Deucher, Alexander @ 2021-06-28 14:55 UTC (permalink / raw)
  To: Koenig, Christian, Tiezhu Yang
  Cc: airlied, linux-kernel, dri-devel, lvjianmin, amd-gfx, daniel, lixuefeng


[-- Attachment #1.1: Type: text/plain, Size: 1631 bytes --]

[Public]

Applied.  Thanks.  For whatever reason, I never got this patch and couldn't find it in patchwork.

Alex

________________________________
From: Koenig, Christian <Christian.Koenig@amd.com>
Sent: Wednesday, June 23, 2021 4:25 AM
To: Tiezhu Yang <yangtiezhu@loongson.cn>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: airlied@linux.ie <airlied@linux.ie>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; daniel@ffwll.ch <daniel@ffwll.ch>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>; lixuefeng@loongson.cn <lixuefeng@loongson.cn>; lvjianmin@loongson.cn <lvjianmin@loongson.cn>
Subject: Re: [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64

Looks good to me.

Somebody could try to investigate further why that is necessary on the
platform, but radeon is only in maintenance mode without new feature
developed.

Regards,
Christian.

Am 23.06.21 um 10:14 schrieb Tiezhu Yang:
> Hi Alex and Christian,
>
> Any comments?
> Can this patch be accepted or anything else I need to improve?
>
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fpatchwork%2Fpatch%2F1443649%2F&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7C2162309822114d2e41b108d9361ef26c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637600328822651335%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=2uxyAGk6sHO3lqw0FX6HITY%2Fbj%2BzEMfSIcqbzmiguMs%3D&amp;reserved=0
>
>
> Thanks,
> Tiezhu
>


[-- Attachment #1.2: Type: text/html, Size: 3479 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

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

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

end of thread, other threads:[~2021-06-28 14:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  3:55 [PATCH v3] drm/radeon: Call radeon_suspend_kms() in radeon_pci_shutdown() for Loongson64 Tiezhu Yang
2021-06-23  8:14 ` Tiezhu Yang
2021-06-23  8:25   ` Christian König
2021-06-23  8:25     ` Christian König
2021-06-23  8:25     ` Christian König
2021-06-28 14:55     ` Deucher, Alexander
2021-06-28 14:55       ` Deucher, Alexander

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.