New kernels

AmigaOne X5000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9323
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Skateman
Posts: 858
Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands

Re: New kernels

Post by Skateman »

Kernel 6.3 RC7 up and running on my AmigaOne X5000

Image

Big picture https://www.skateman.nl/wp-content/uplo ... -50-40.png
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full
User avatar
xeno74
Posts: 9323
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Skateman wrote: Sat Apr 22, 2023 10:56 am Kernel 6.3 RC7 up and running on my AmigaOne X5000
Thank you for testing! :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9323
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Hi All,

The final kernel 6.3 has been released. After solving the issue with the detection of the number of CPUs (cores) and testing the new NVMe support, we have a stable final kernel 6.3. Many thanks to Gordini21, Skateman, Roland, and Peter (Musa) for testing the alphas and release candidates. :-)

New:
Download: linux-image-6.3-X1000_X5000.tar.gz

X5000 users: Please Note: If you use an uInitrd for example for booting with a LABEL, then load the dtb file to the address 1d00000. The kernel has grown in recent months so the address 1c00000 is used by the uImage. Before we have loaded the dtb to the address 1c00000.

Code: Select all

X5000> bootm 1000000 2000000 1d00000
Image

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Skateman
Posts: 858
Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands

Re: New kernels

Post by Skateman »

Fianl kernel 6.3 up and running on my AmigaOne X5000

Image

Big picture https://www.skateman.nl/wp-content/uplo ... -59-16.png

Thanks again Christian for all the hard work! (and all others who contributed)

Keep on going!
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full
User avatar
xeno74
Posts: 9323
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Skateman wrote: Mon Apr 24, 2023 7:03 pm Fianl kernel 6.3 up and running on my AmigaOne X5000

Thanks again Christian for all the hard work! (and all others who contributed)

Keep on going!
Thank you for testing the final kernel 6.3! :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9323
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

The alpha1 of kernel 6.4 doesn't build.

Error messages:

Code: Select all

drivers/gpu/drm/ttm/ttm_pool.c:73:29: error: variably modified 'global_write_combined' at file scope
   73 | static struct ttm_pool_type global_write_combined[TTM_DIM_ORDER];
      |                             ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_pool.c:74:29: error: variably modified 'global_uncached' at file scope
   74 | static struct ttm_pool_type global_uncached[TTM_DIM_ORDER];
      |                             ^~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_pool.c:76:29: error: variably modified 'global_dma32_write_combined' at file scope
   76 | static struct ttm_pool_type global_dma32_write_combined[TTM_DIM_ORDER];
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_pool.c:77:29: error: variably modified 'global_dma32_uncached' at file scope
   77 | static struct ttm_pool_type global_dma32_uncached[TTM_DIM_ORDER];
      |                             ^~~~~~~~~~~~~~~~~~~~~
make[5]: *** [scripts/Makefile.build:252: drivers/gpu/drm/ttm/ttm_pool.o] Error 1
make[4]: *** [scripts/Makefile.build:494: drivers/gpu/drm/ttm] Error 2
make[3]: *** [scripts/Makefile.build:494: drivers/gpu/drm] Error 2
make[2]: *** [scripts/Makefile.build:494: drivers/gpu] Error 2
make[1]: *** [scripts/Makefile.build:494: drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
There is a discussion about this issue:

drm/ttm: Reduce the number of used allocation orders for TTM pages

There is a patch:

Code: Select all

diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 18c342a919a2..dfce896c4bae 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -47,11 +47,6 @@
 
 #include "ttm_module.h"
 
-#define TTM_MAX_ORDER (PMD_SHIFT - PAGE_SHIFT)
-#define __TTM_DIM_ORDER (TTM_MAX_ORDER + 1)
-/* Some architectures have a weird PMD_SHIFT */
-#define TTM_DIM_ORDER (__TTM_DIM_ORDER <= MAX_ORDER ? __TTM_DIM_ORDER : MAX_ORDER)
-
 /**
  * struct ttm_pool_dma - Helper object for coherent DMA mappings
  *
@@ -70,11 +65,11 @@ module_param(page_pool_size, ulong, 0644);
 
 static atomic_long_t allocated_pages;
 
-static struct ttm_pool_type global_write_combined[TTM_DIM_ORDER];
-static struct ttm_pool_type global_uncached[TTM_DIM_ORDER];
+static struct ttm_pool_type global_write_combined[MAX_ORDER];
+static struct ttm_pool_type global_uncached[MAX_ORDER];
 
-static struct ttm_pool_type global_dma32_write_combined[TTM_DIM_ORDER];
-static struct ttm_pool_type global_dma32_uncached[TTM_DIM_ORDER];
+static struct ttm_pool_type global_dma32_write_combined[MAX_ORDER];
+static struct ttm_pool_type global_dma32_uncached[MAX_ORDER];
 
 static spinlock_t shrinker_lock;
 static struct list_head shrinker_list;
@@ -449,7 +444,7 @@ int ttm_pool_alloc(struct ttm_pool *pool, struct ttm_tt *tt,
 	else
 		gfp_flags |= GFP_HIGHUSER;
 
-	for (order = min_t(unsigned int, TTM_MAX_ORDER, __fls(num_pages));
+	for (order = min_t(unsigned int, MAX_ORDER - 1, __fls(num_pages));
 	     num_pages;
 	     order = min_t(unsigned int, order, __fls(num_pages))) {
 		struct ttm_pool_type *pt;
@@ -568,7 +563,7 @@ void ttm_pool_init(struct ttm_pool *pool, struct device *dev,
 
 	if (use_dma_alloc) {
 		for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
-			for (j = 0; j < TTM_DIM_ORDER; ++j)
+			for (j = 0; j < MAX_ORDER; ++j)
 				ttm_pool_type_init(&pool->caching[i].orders[j],
 						   pool, i, j);
 	}
@@ -588,7 +583,7 @@ void ttm_pool_fini(struct ttm_pool *pool)
 
 	if (pool->use_dma_alloc) {
 		for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
-			for (j = 0; j < TTM_DIM_ORDER; ++j)
+			for (j = 0; j < MAX_ORDER; ++j)
 				ttm_pool_type_fini(&pool->caching[i].orders[j]);
 	}
 
@@ -642,7 +637,7 @@ static void ttm_pool_debugfs_header(struct seq_file *m)
 	unsigned int i;
 
 	seq_puts(m, "\t ");
-	for (i = 0; i < TTM_DIM_ORDER; ++i)
+	for (i = 0; i < MAX_ORDER; ++i)
 		seq_printf(m, " ---%2u---", i);
 	seq_puts(m, "\n");
 }
@@ -653,7 +648,7 @@ static void ttm_pool_debugfs_orders(struct ttm_pool_type *pt,
 {
 	unsigned int i;
 
-	for (i = 0; i < TTM_DIM_ORDER; ++i)
+	for (i = 0; i < MAX_ORDER; ++i)
 		seq_printf(m, " %8u", ttm_pool_type_count(&pt[i]));
 	seq_puts(m, "\n");
 }
@@ -756,16 +751,13 @@ int ttm_pool_mgr_init(unsigned long num_pages)
 {
 	unsigned int i;
 
-	BUILD_BUG_ON(TTM_DIM_ORDER > MAX_ORDER);
-	BUILD_BUG_ON(TTM_DIM_ORDER < 1);
-
 	if (!page_pool_size)
 		page_pool_size = num_pages;
 
 	spin_lock_init(&shrinker_lock);
 	INIT_LIST_HEAD(&shrinker_list);
 
-	for (i = 0; i < TTM_DIM_ORDER; ++i) {
+	for (i = 0; i < MAX_ORDER; ++i) {
 		ttm_pool_type_init(&global_write_combined[i], NULL,
 				   ttm_write_combined, i);
 		ttm_pool_type_init(&global_uncached[i], NULL, ttm_uncached, i);
@@ -798,7 +790,7 @@ void ttm_pool_mgr_fini(void)
 {
 	unsigned int i;
 
-	for (i = 0; i < TTM_DIM_ORDER; ++i) {
+	for (i = 0; i < MAX_ORDER; ++i) {
 		ttm_pool_type_fini(&global_write_combined[i]);
 		ttm_pool_type_fini(&global_uncached[i]);
Link: drm/ttm: revert "Reduce the number of used allocation orders for TTM pages"
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9323
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Kernel 6.4:

Hans Verkuil has dropped the overlay support for BTTV TV cards. That means, that tvtime doesn't work anymore.
Hans Verkuil wrote: Destructive overlay support (i.e. where the video frame is DMA-ed
straight into a framebuffer) is effectively dead. It was a
necessary evil in the early days when computers were not fast enough
to copy SDTV video frames around, but today that's no longer a problem.

It requires access to the framebuffer memory, which is a bad idea and
very hard to do safely. In addition, in drm it is today almost
impossible to get hold of the framebuffer address.

So drop support for this.
bttv: drop overlay support

I reported this issue to the kernel developers today.

Link: [BTTV] [FSL P50x0] [PASEMI] TV Time doesn't work anymore after dropping the overlay support -- lore.kernel.org/linux-media
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9323
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

I created a patch for adding overlay support again. Additionally, I created the bttv kernel modules with this patch for the alpha1 of kernel 6.4.

Download: bttv_modules_with_overlay_support_6.4-alpha1.tar.gz

Installation instructions for example for the X5000:
  1. Code: Select all

    # rm -rf /lib/modules/6.4.0-a1_A-EON_X5000-g0cfd8703e7da-dirty/kernel/drivers/media/pci/bt8xx
  2. Code: Select all

    # cp -R bttv_modules_with_overlay_support_6.4-alpha1/X5000/bt8xx /lib/modules/6.4.0-a1_A-EON_X5000-g0cfd8703e7da-dirty/kernel/drivers/media/pci/
  3. Code: Select all

    reboot
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9323
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Hi All,

The merge window for 6.4 has been started and here is the first alpha for testing.

New:
Download: linux-image-6.4-alpha1-X1000_X5000.tar.gz

I created a patch for adding overlay support again. Additionally, I created the bttv kernel modules with this patch for the alpha1 of kernel 6.4.

Download: bttv_modules_with_overlay_support_6.4-alpha1.tar.gz

Installation instructions for example for the X5000:
  1. Code: Select all

    # rm -rf /lib/modules/6.4.0-a1_A-EON_X5000-g0cfd8703e7da-dirty/kernel/drivers/media/pci/bt8xx
  2. Code: Select all

    # cp -R bttv_modules_with_overlay_support_6.4-alpha1/X5000/bt8xx /lib/modules/6.4.0-a1_A-EON_X5000-g0cfd8703e7da-dirty/kernel/drivers/media/pci/
  3. Code: Select all

    reboot

Image


Please test the alpha1.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply