New kernels

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

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
User avatar
musa
Posts: 873
Joined: Tue Aug 23, 2011 8:58 pm

Re: New kernels

Post by musa »

Hi
Kernel vmlinux-6.3 boot Debian 64 bookworm.
I can't boot Fienix. Same error as before .
Ends with kernel panic. There is no error on other systems on that harddisk
and Fienix works with my standard kernel
Have a nice day
Image
AmigaX1000
User avatar
xeno74
Posts: 10707
Joined: Fri Mar 23, 2012 7:58 am
Contact:

Re: New kernels

Post by xeno74 »

musa wrote: Mon Apr 24, 2023 2:55 pm Hi
Kernel vmlinux-6.3 boot Debian 64 bookworm.
I can't boot Fienix. Same error as before .
Ends with kernel panic. There is no error on other systems on that harddisk
and Fienix works with my standard kernel
Have a nice day
Thanks a lot for testing! :-) Have you used set pmu -state=A4 for Fienix?
User avatar
musa
Posts: 873
Joined: Tue Aug 23, 2011 8:58 pm

Re: New kernels

Post by musa »

xeno74 wrote: Mon Apr 24, 2023 3:30 pm

Thanks a lot for testing! :-) Have you used set pmu -state=A4 for Fienix?
yes but it only worked for rc6 not for this and rc7.
It is very strange
AmigaX1000
User avatar
xeno74
Posts: 10707
Joined: Fri Mar 23, 2012 7:58 am
Contact:

Re: New kernels

Post by xeno74 »

musa wrote: Mon Apr 24, 2023 4:39 pm yes but it only worked for rc6 not for this and rc7.
It is very strange
I think you have to check the boot arguments.
User avatar
musa
Posts: 873
Joined: Tue Aug 23, 2011 8:58 pm

Re: New kernels

Post by musa »

xeno74 wrote: Mon Apr 24, 2023 4:54 pm
musa wrote: Mon Apr 24, 2023 4:39 pm yes but it only worked for rc6 not for this and rc7.
It is very strange
I think you have to check the boot arguments.
Theý are the same as I use in cfe menu
set pmu -state=A4
setenv bootargs "root=/dev/sdc?"
boot -elf -noints -fatfs usbdisk0:vmlinux-?.?
I start ubuntu 16.04, ubuntu 17 remix , Fienix , Debian 64 , Debian 32, void and Adelie with this commands and it works.
AmigaX1000
User avatar
xeno74
Posts: 10707
Joined: Fri Mar 23, 2012 7:58 am
Contact:

Re: New kernels

Post by xeno74 »

Peter,

Strange. Unfortunately I don’t have a solution for this issue. The kernel finds the sdc if you boot with other distributions. With Fienix, it doesn’t find it.

Sorry,
Christian
User avatar
xeno74
Posts: 10707
Joined: Fri Mar 23, 2012 7:58 am
Contact:

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"
User avatar
xeno74
Posts: 10707
Joined: Fri Mar 23, 2012 7:58 am
Contact:

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
User avatar
xeno74
Posts: 10707
Joined: Fri Mar 23, 2012 7:58 am
Contact:

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
Post Reply