linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init
@ 2020-05-15  2:15 Tiezhu Yang
  2020-05-15  2:15 ` [PATCH 2/2] MIPS: Fix build errors under CONFIG_HAVE_STD_PC_SERIAL_PORT Tiezhu Yang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tiezhu Yang @ 2020-05-15  2:15 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
  Cc: linux-mips, linux-kernel, Xuefeng Li

When ATI Radeon graphics card has been compiled directly into the kernel
instead of as a module, we should make sure the firmware for the model
(check available ones in /lib/firmware/radeon) is built-in to the kernel
as well, otherwise there exists the following fatal error during GPU init,
change CONFIG_DRM_RADEON=y to CONFIG_DRM_RADEON=m to fix it.

[    1.900997] [drm] Loading RS780 Microcode
[    1.905077] radeon 0000:01:05.0: Direct firmware load for radeon/RS780_pfp.bin failed with error -2
[    1.914140] r600_cp: Failed to load firmware "radeon/RS780_pfp.bin"
[    1.920405] [drm:r600_init] *ERROR* Failed to load firmware!
[    1.926069] radeon 0000:01:05.0: Fatal error during GPU init
[    1.931729] [drm] radeon: finishing device.

Fixes: 024e6a8b5bb1 ("MIPS: Loongson: Add a Loongson-3 default config file")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 arch/mips/configs/loongson3_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/configs/loongson3_defconfig b/arch/mips/configs/loongson3_defconfig
index 6768c16..4df2434 100644
--- a/arch/mips/configs/loongson3_defconfig
+++ b/arch/mips/configs/loongson3_defconfig
@@ -230,7 +230,7 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y
 CONFIG_MEDIA_USB_SUPPORT=y
 CONFIG_USB_VIDEO_CLASS=m
 CONFIG_DRM=y
-CONFIG_DRM_RADEON=y
+CONFIG_DRM_RADEON=m
 CONFIG_FB_RADEON=y
 CONFIG_LCD_CLASS_DEVICE=y
 CONFIG_LCD_PLATFORM=m
-- 
2.1.0


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

* [PATCH 2/2] MIPS: Fix build errors under CONFIG_HAVE_STD_PC_SERIAL_PORT
  2020-05-15  2:15 [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init Tiezhu Yang
@ 2020-05-15  2:15 ` Tiezhu Yang
  2020-05-15  2:33 ` [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init Jiaxun Yang
  2020-05-15  8:51 ` Sergei Shtylyov
  2 siblings, 0 replies; 7+ messages in thread
From: Tiezhu Yang @ 2020-05-15  2:15 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
  Cc: linux-mips, linux-kernel, Xuefeng Li

When CONFIG_HAVE_STD_PC_SERIAL_PORT is set, include linux/module.h to fix
the following build errors:

  CC      arch/mips/kernel/8250-platform.o
arch/mips/kernel/8250-platform.c:42:1: error: data definition has no type or storage class [-Werror]
 module_init(uart8250_init);
 ^
arch/mips/kernel/8250-platform.c:42:1: error: type defaults to ‘int’ in declaration of ‘module_init’ [-Werror=implicit-int]
arch/mips/kernel/8250-platform.c:42:1: error: parameter names (without types) in function declaration [-Werror]
arch/mips/kernel/8250-platform.c:44:15: error: expected declaration specifiers or ‘...’ before string constant
 MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
               ^
arch/mips/kernel/8250-platform.c:45:16: error: expected declaration specifiers or ‘...’ before string constant
 MODULE_LICENSE("GPL");
                ^
arch/mips/kernel/8250-platform.c:46:20: error: expected declaration specifiers or ‘...’ before string constant
 MODULE_DESCRIPTION("Generic 8250 UART probe driver");
                    ^
arch/mips/kernel/8250-platform.c:37:81: error: ‘uart8250_init’ defined but not used [-Werror=unused-function]
 static int __init uart8250_init(void)
                                                                                 ^
cc1: all warnings being treated as errors
scripts/Makefile.build:267: recipe for target 'arch/mips/kernel/8250-platform.o' failed
make[2]: *** [arch/mips/kernel/8250-platform.o] Error 1

Fixes: 848484e2c412 ("mips: remove needless include of module.h from core kernel files.")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 arch/mips/kernel/8250-platform.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/mips/kernel/8250-platform.c b/arch/mips/kernel/8250-platform.c
index 5c6b2ab..cbf3fe2 100644
--- a/arch/mips/kernel/8250-platform.c
+++ b/arch/mips/kernel/8250-platform.c
@@ -5,6 +5,7 @@
  *
  * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
  */
+#include <linux/module.h>
 #include <linux/init.h>
 #include <linux/serial_8250.h>
 
-- 
2.1.0


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

* Re: [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init
  2020-05-15  2:15 [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init Tiezhu Yang
  2020-05-15  2:15 ` [PATCH 2/2] MIPS: Fix build errors under CONFIG_HAVE_STD_PC_SERIAL_PORT Tiezhu Yang
@ 2020-05-15  2:33 ` Jiaxun Yang
  2020-05-15  3:09   ` Tiezhu Yang
  2020-05-15  8:51 ` Sergei Shtylyov
  2 siblings, 1 reply; 7+ messages in thread
From: Jiaxun Yang @ 2020-05-15  2:33 UTC (permalink / raw)
  To: Tiezhu Yang, Thomas Bogendoerfer, Huacai Chen
  Cc: linux-mips, linux-kernel, Xuefeng Li



于 2020年5月15日 GMT+08:00 上午10:15:00, Tiezhu Yang <yangtiezhu@loongson.cn> 写到:
>When ATI Radeon graphics card has been compiled directly into the kernel
>instead of as a module, we should make sure the firmware for the model
>(check available ones in /lib/firmware/radeon) is built-in to the kernel
>as well, otherwise there exists the following fatal error during GPU init,
>change CONFIG_DRM_RADEON=y to CONFIG_DRM_RADEON=m to fix it.
>

The commit message looks shocking.

You'd better reword it as "MIPS: Loongson64: Mark GPU driver as module in Kconfig"

Thanks.
-- 
Jiaxun Yang

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

* Re: [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init
  2020-05-15  2:33 ` [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init Jiaxun Yang
@ 2020-05-15  3:09   ` Tiezhu Yang
  2020-05-15  3:17     ` Jiaxun Yang
  0 siblings, 1 reply; 7+ messages in thread
From: Tiezhu Yang @ 2020-05-15  3:09 UTC (permalink / raw)
  To: jiaxun.yang, Thomas Bogendoerfer, Huacai Chen
  Cc: linux-mips, linux-kernel, Xuefeng Li

On 05/15/2020 10:33 AM, Jiaxun Yang wrote:
>
> 于 2020年5月15日 GMT+08:00 上午10:15:00, Tiezhu Yang <yangtiezhu@loongson.cn> 写到:
>> When ATI Radeon graphics card has been compiled directly into the kernel
>> instead of as a module, we should make sure the firmware for the model
>> (check available ones in /lib/firmware/radeon) is built-in to the kernel
>> as well, otherwise there exists the following fatal error during GPU init,
>> change CONFIG_DRM_RADEON=y to CONFIG_DRM_RADEON=m to fix it.
>>
> The commit message looks shocking.
>
> You'd better reword it as "MIPS: Loongson64: Mark GPU driver as module in Kconfig"

OK, I will modify the patch subject and send v2.

>
> Thanks.


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

* Re: [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init
  2020-05-15  3:09   ` Tiezhu Yang
@ 2020-05-15  3:17     ` Jiaxun Yang
  0 siblings, 0 replies; 7+ messages in thread
From: Jiaxun Yang @ 2020-05-15  3:17 UTC (permalink / raw)
  To: Tiezhu Yang, Thomas Bogendoerfer, Huacai Chen
  Cc: linux-mips, linux-kernel, Xuefeng Li



于 2020年5月15日 GMT+08:00 上午11:09:56, Tiezhu Yang <yangtiezhu@loongson.cn> 写到:
>On 05/15/2020 10:33 AM, Jiaxun Yang wrote:
>>
>> 于 2020年5月15日 GMT+08:00 上午10:15:00, Tiezhu Yang <yangtiezhu@loongson.cn> 写到:
>>> When ATI Radeon graphics card has been compiled directly into the kernel
>>> instead of as a module, we should make sure the firmware for the model
>>> (check available ones in /lib/firmware/radeon) is built-in to the kernel
>>> as well, otherwise there exists the following fatal error during GPU init,
>>> change CONFIG_DRM_RADEON=y to CONFIG_DRM_RADEON=m to fix it.
>>>
>> The commit message looks shocking.
>>
>> You'd better reword it as "MIPS: Loongson64: Mark GPU driver as module in Kconfig"
>
>OK, I will modify the patch subject and send v2.

Sorry I meant defconfig not Kconfig.
>
>>
>> Thanks.
>

-- 
Jiaxun Yang

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

* Re: [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init
  2020-05-15  2:15 [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init Tiezhu Yang
  2020-05-15  2:15 ` [PATCH 2/2] MIPS: Fix build errors under CONFIG_HAVE_STD_PC_SERIAL_PORT Tiezhu Yang
  2020-05-15  2:33 ` [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init Jiaxun Yang
@ 2020-05-15  8:51 ` Sergei Shtylyov
  2020-05-15  8:58   ` Tiezhu Yang
  2 siblings, 1 reply; 7+ messages in thread
From: Sergei Shtylyov @ 2020-05-15  8:51 UTC (permalink / raw)
  To: Tiezhu Yang, Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
  Cc: linux-mips, linux-kernel, Xuefeng Li

Hello!

On 15.05.2020 5:15, Tiezhu Yang wrote:

> When ATI Radeon graphics card has been compiled directly into the kernel
                                ^ driver

> instead of as a module, we should make sure the firmware for the model
> (check available ones in /lib/firmware/radeon) is built-in to the kernel
> as well, otherwise there exists the following fatal error during GPU init,
> change CONFIG_DRM_RADEON=y to CONFIG_DRM_RADEON=m to fix it.
> 
> [    1.900997] [drm] Loading RS780 Microcode
> [    1.905077] radeon 0000:01:05.0: Direct firmware load for radeon/RS780_pfp.bin failed with error -2
> [    1.914140] r600_cp: Failed to load firmware "radeon/RS780_pfp.bin"
> [    1.920405] [drm:r600_init] *ERROR* Failed to load firmware!
> [    1.926069] radeon 0000:01:05.0: Fatal error during GPU init
> [    1.931729] [drm] radeon: finishing device.
> 
> Fixes: 024e6a8b5bb1 ("MIPS: Loongson: Add a Loongson-3 default config file")
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
[...]

MBR, Sergei

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

* Re: [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init
  2020-05-15  8:51 ` Sergei Shtylyov
@ 2020-05-15  8:58   ` Tiezhu Yang
  0 siblings, 0 replies; 7+ messages in thread
From: Tiezhu Yang @ 2020-05-15  8:58 UTC (permalink / raw)
  To: Sergei Shtylyov, Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
  Cc: linux-mips, linux-kernel, Xuefeng Li

On 05/15/2020 04:51 PM, Sergei Shtylyov wrote:
> Hello!
>
> On 15.05.2020 5:15, Tiezhu Yang wrote:
>
>> When ATI Radeon graphics card has been compiled directly into the kernel
>                                ^ driver

Hi Sergei,

Thanks for your review, I have been sent v2 with the updated commit message:
https://lore.kernel.org/patchwork/patch/1242218/

Thanks,
Tiezhu Yang

>
>> instead of as a module, we should make sure the firmware for the model
>> (check available ones in /lib/firmware/radeon) is built-in to the kernel
>> as well, otherwise there exists the following fatal error during GPU 
>> init,
>> change CONFIG_DRM_RADEON=y to CONFIG_DRM_RADEON=m to fix it.
>>
>> [    1.900997] [drm] Loading RS780 Microcode
>> [    1.905077] radeon 0000:01:05.0: Direct firmware load for 
>> radeon/RS780_pfp.bin failed with error -2
>> [    1.914140] r600_cp: Failed to load firmware "radeon/RS780_pfp.bin"
>> [    1.920405] [drm:r600_init] *ERROR* Failed to load firmware!
>> [    1.926069] radeon 0000:01:05.0: Fatal error during GPU init
>> [    1.931729] [drm] radeon: finishing device.
>>
>> Fixes: 024e6a8b5bb1 ("MIPS: Loongson: Add a Loongson-3 default config 
>> file")
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> [...]
>
> MBR, Sergei


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

end of thread, other threads:[~2020-05-15  8:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15  2:15 [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init Tiezhu Yang
2020-05-15  2:15 ` [PATCH 2/2] MIPS: Fix build errors under CONFIG_HAVE_STD_PC_SERIAL_PORT Tiezhu Yang
2020-05-15  2:33 ` [PATCH 1/2] MIPS: Loongson: Fix fatal error during GPU init Jiaxun Yang
2020-05-15  3:09   ` Tiezhu Yang
2020-05-15  3:17     ` Jiaxun Yang
2020-05-15  8:51 ` Sergei Shtylyov
2020-05-15  8:58   ` Tiezhu Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).