https://bugs.freedesktop.org/show_bug.cgi?id=110897
--- Comment #47 from Richard Thier u9vata@gmail.com --- Created attachment 144552 --> https://bugs.freedesktop.org/attachment.cgi?id=144552&action=edit grepping around init functions in kernel / drm
Hmmm... I see that this got printed out in dmesg:
[ 17.669902] [drm] radeon: 3 quad pipes, 1 z pipes initialized.
However here is an excerpt from the kernel function you mention:
static void r300_gpu_init(struct radeon_device *rdev) { uint32_t gb_tile_config, tmp;
if ((rdev->family == CHIP_R300 && rdev->pdev->device != 0x4144) || (rdev->family == CHIP_R350 && rdev->pdev->device != 0x4148)) { /* r300,r350 */ rdev->num_gb_pipes = 2; } else { /* rv350,rv370,rv380,r300 AD, r350 AH */ rdev->num_gb_pipes = 1; }
...
DRM_INFO("radeon: %d quad pipes, %d Z pipes initialized\n", rdev->num_gb_pipes, rdev->num_z_pipes); }
And it is pretty clear that the there is nothing that should change the number between the log and the setup code! This kind of tells me that this function is not called.
I see multiple "rXX_gpu_init" functions so maybe the corresponding one should be called, but in my case not an r300 but the rs400 variant is called? See attachment about me grepping around in kernel sources.
I mean.. maybe calling "rs400_gpu_init" is already bad and it should be instead the r300_gpu_init here!
Also I can see there are multiple implementations for the r420_pipes_init, but mostly for later cards so it kind of seems something is really off. Maybe someone just saw "oh RC410? That is higher number than 400 so it is an rs400 card" and completely disconfigure this card for some reason??? I mean... I can still sometimes grow unsure where this specific card belongs to "properly" so I can imagine someone just thinking the above.
[prenex@prenex-laptop zen-kernel-5.0.17-lqx1]$ grep -R r420_pipes_init drivers/gpu/* drivers/gpu/drm/radeon/rs400.c: r420_pipes_init(rdev); drivers/gpu/drm/radeon/rv515.o bináris fájl illeszkedik drivers/gpu/drm/radeon/rs600.o bináris fájl illeszkedik drivers/gpu/drm/radeon/r520.c: r420_pipes_init(rdev); drivers/gpu/drm/radeon/radeon.o bináris fájl illeszkedik drivers/gpu/drm/radeon/rs690.c: r420_pipes_init(rdev); drivers/gpu/drm/radeon/r420.c:void r420_pipes_init(struct radeon_device *rdev) drivers/gpu/drm/radeon/r420.c: r420_pipes_init(rdev); drivers/gpu/drm/radeon/rs690.o bináris fájl illeszkedik drivers/gpu/drm/radeon/r520.o bináris fájl illeszkedik drivers/gpu/drm/radeon/radeon_asic.h:extern void r420_pipes_init(struct radeon_device *rdev); drivers/gpu/drm/radeon/rs600.c: r420_pipes_init(rdev); drivers/gpu/drm/radeon/r420.o bináris fájl illeszkedik drivers/gpu/drm/radeon/radeon.ko bináris fájl illeszkedik drivers/gpu/drm/radeon/rs400.o bináris fájl illeszkedik drivers/gpu/drm/radeon/rv515.c: r420_pipes_init(rdev);
I don't see it yet where the radeon driver decides which of the r*_gpu_init function to call, but I am already grepping for it. If there is an easy to spot error there I might be even able to patch it - or at least go further :-)
Oh I see now that I am grepping for the wrong function as likely "r300_startup" is the one that calls the r300_gpu_init (and likely others call the same in the similar pattern) so I must search for this startup function instead.