linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module
@ 2020-05-16  2:15 Tiezhu Yang
  2020-05-16  2:15 ` [PATCH v3 2/2] MIPS: Remove not used 8250-platform.c Tiezhu Yang
  2020-05-17  8:41 ` [PATCH v3 1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module Thomas Bogendoerfer
  0 siblings, 2 replies; 4+ messages in thread
From: Tiezhu Yang @ 2020-05-16  2:15 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Huacai Chen, Jiaxun Yang
  Cc: linux-mips, linux-kernel, Xuefeng Li

When ATI Radeon GPU driver 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>
---

v2:
  - Modify the patch subject and update the commit message

v3:
  - No changes

 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] 4+ messages in thread

* [PATCH v3 2/2] MIPS: Remove not used 8250-platform.c
  2020-05-16  2:15 [PATCH v3 1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module Tiezhu Yang
@ 2020-05-16  2:15 ` Tiezhu Yang
  2020-05-17  8:41   ` Thomas Bogendoerfer
  2020-05-17  8:41 ` [PATCH v3 1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module Thomas Bogendoerfer
  1 sibling, 1 reply; 4+ messages in thread
From: Tiezhu Yang @ 2020-05-16  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, there exists build errors
of 8250-platform.c due to linux/module.h is not included.

CONFIG_HAVE_STD_PC_SERIAL_PORT is not used in arch/mips for many years,
8250-platform.c is also not built and used, so it is not necessary to
fix the build errors, just remove the not used file 8250-platform.c and
the related code in Kconfig and Makefile.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---

v2:
  - No changes

v3:
  - Remove not used 8250-platform.c

 arch/mips/Kconfig                |  3 ---
 arch/mips/kernel/8250-platform.c | 46 ----------------------------------------
 arch/mips/kernel/Makefile        |  2 --
 3 files changed, 51 deletions(-)
 delete mode 100644 arch/mips/kernel/8250-platform.c

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index bfa9cd9..b2ff77f 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1358,9 +1358,6 @@ config MIPS_L1_CACHE_SHIFT
 	default "4" if MIPS_L1_CACHE_SHIFT_4
 	default "5"
 
-config HAVE_STD_PC_SERIAL_PORT
-	bool
-
 config ARC_CMDLINE_ONLY
 	bool
 
diff --git a/arch/mips/kernel/8250-platform.c b/arch/mips/kernel/8250-platform.c
deleted file mode 100644
index 5c6b2ab..0000000
--- a/arch/mips/kernel/8250-platform.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2007 Ralf Baechle (ralf@linux-mips.org)
- */
-#include <linux/init.h>
-#include <linux/serial_8250.h>
-
-#define PORT(base, int)							\
-{									\
-	.iobase		= base,						\
-	.irq		= int,						\
-	.uartclk	= 1843200,					\
-	.iotype		= UPIO_PORT,					\
-	.flags		= UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,		\
-	.regshift	= 0,						\
-}
-
-static struct plat_serial8250_port uart8250_data[] = {
-	PORT(0x3F8, 4),
-	PORT(0x2F8, 3),
-	PORT(0x3E8, 4),
-	PORT(0x2E8, 3),
-	{ },
-};
-
-static struct platform_device uart8250_device = {
-	.name			= "serial8250",
-	.id			= PLAT8250_DEV_PLATFORM,
-	.dev			= {
-		.platform_data	= uart8250_data,
-	},
-};
-
-static int __init uart8250_init(void)
-{
-	return platform_device_register(&uart8250_device);
-}
-
-module_init(uart8250_init);
-
-MODULE_AUTHOR("Ralf Baechle <ralf@linux-mips.org>");
-MODULE_LICENSE("GPL");
-MODULE_DESCRIPTION("Generic 8250 UART probe driver");
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile
index d6e97df..8c7a043 100644
--- a/arch/mips/kernel/Makefile
+++ b/arch/mips/kernel/Makefile
@@ -98,8 +98,6 @@ obj-$(CONFIG_MIPSR2_TO_R6_EMULATOR)	+= mips-r2-to-r6-emul.o
 
 CFLAGS_cpu-bugs64.o	= $(shell if $(CC) $(KBUILD_CFLAGS) -Wa,-mdaddi -c -o /dev/null -x c /dev/null >/dev/null 2>&1; then echo "-DHAVE_AS_SET_DADDI"; fi)
 
-obj-$(CONFIG_HAVE_STD_PC_SERIAL_PORT)	+= 8250-platform.o
-
 obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o
 obj-$(CONFIG_HW_PERF_EVENTS)	+= perf_event_mipsxx.o
 
-- 
2.1.0


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

* Re: [PATCH v3 1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module
  2020-05-16  2:15 [PATCH v3 1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module Tiezhu Yang
  2020-05-16  2:15 ` [PATCH v3 2/2] MIPS: Remove not used 8250-platform.c Tiezhu Yang
@ 2020-05-17  8:41 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2020-05-17  8:41 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: Huacai Chen, Jiaxun Yang, linux-mips, linux-kernel, Xuefeng Li

On Sat, May 16, 2020 at 10:15:48AM +0800, Tiezhu Yang wrote:
> When ATI Radeon GPU driver 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>
> ---
> 
> v2:
>   - Modify the patch subject and update the commit message
> 
> v3:
>   - No changes
> 
>  arch/mips/configs/loongson3_defconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH v3 2/2] MIPS: Remove not used 8250-platform.c
  2020-05-16  2:15 ` [PATCH v3 2/2] MIPS: Remove not used 8250-platform.c Tiezhu Yang
@ 2020-05-17  8:41   ` Thomas Bogendoerfer
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2020-05-17  8:41 UTC (permalink / raw)
  To: Tiezhu Yang
  Cc: Huacai Chen, Jiaxun Yang, linux-mips, linux-kernel, Xuefeng Li

On Sat, May 16, 2020 at 10:15:49AM +0800, Tiezhu Yang wrote:
> When CONFIG_HAVE_STD_PC_SERIAL_PORT is set, there exists build errors
> of 8250-platform.c due to linux/module.h is not included.
> 
> CONFIG_HAVE_STD_PC_SERIAL_PORT is not used in arch/mips for many years,
> 8250-platform.c is also not built and used, so it is not necessary to
> fix the build errors, just remove the not used file 8250-platform.c and
> the related code in Kconfig and Makefile.
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> 
> v2:
>   - No changes
> 
> v3:
>   - Remove not used 8250-platform.c
> 
>  arch/mips/Kconfig                |  3 ---
>  arch/mips/kernel/8250-platform.c | 46 ----------------------------------------
>  arch/mips/kernel/Makefile        |  2 --
>  3 files changed, 51 deletions(-)
>  delete mode 100644 arch/mips/kernel/8250-platform.c

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16  2:15 [PATCH v3 1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module Tiezhu Yang
2020-05-16  2:15 ` [PATCH v3 2/2] MIPS: Remove not used 8250-platform.c Tiezhu Yang
2020-05-17  8:41   ` Thomas Bogendoerfer
2020-05-17  8:41 ` [PATCH v3 1/2] MIPS: Loongson: Build ATI Radeon GPU driver as module Thomas Bogendoerfer

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).