Skip to contentSkip to conversation

Radeon driver broken in kernel 3.12.15 onwards for ATI Radeon HD4770 Card

Bug 80331 [email protected] 1 participant 17 messages Jul 29, 2014 – Jul 31, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#2 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

Alan <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|Radeon driver broken in     |[BISECTED]Radeon driver
                   |kernel 3.12.15 onwards for  |broken in kernel 3.12.15
                   |ATI Radeon HD4770 Card      |onwards for ATI Radeon
                   |                            |HD4770 Card
Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

Alex Deucher <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #2 from Alex Deucher <[email protected]> ---
You need to have the firmware installed to use the driver. We don't support the driver without firmware loaded.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #3 from Colin <[email protected]> --- (In reply to Alex Deucher from comment #2)

Quoted 2 lines

You need to have the firmware installed to use the driver. We don't support the driver without firmware loaded.

Sorry, I didn't explain very well. The firmware is installed; it just doesn't load when the patch I attached is applied and the driver is statically linked. If the patch is undone with no other changes the firmware seems to load and the card works. Equally if I leave the patch in but make the driver a module instead of being statically linked then it also works.

The reason I suggested the firmware is failing to load with the patch present is that I inserted printk statements at various places and found that the function to load the firmware returns an error even though when it is using the correct path to the firmware file.

Best wishes.....
Colin

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#6 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #5 from Colin <[email protected]> --- (In reply to Alex Deucher from comment #4)

Quoted 2 lines

If the driver is built into the kernel, you need to built the firmware into the kernel as well.

I am just using the standard build system e.g. make bzImage. As I said if I remove the patch I mentioned in the original post everything works fine. If the patch is applied it doesn't work. I don't know if that has anything to do with building the firmware.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#7 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #6 from Alex Deucher <[email protected]> --- (In reply to Colin from comment #5)

Quoted 8 lines

(In reply to Alex Deucher from comment #4)

Quoted 2 lines

If the driver is built into the kernel, you need to built the firmware into the kernel as well.

I am just using the standard build system e.g. make bzImage. As I said if I remove the patch I mentioned in the original post everything works fine. If the patch is applied it doesn't work. I don't know if that has anything to do with building the firmware.

The firmware still fails to load, it just fails later and the driver does not fail to load because of it.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#8 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #7 from Colin <[email protected]> --- (In reply to Alex Deucher from comment #6)

Quoted 5 lines

(In reply to Colin from comment #5)

Quoted 4 lines

(In reply to Alex Deucher from comment #4)

Quoted 2 lines

If the driver is built into the kernel, you need to built the firmware into the kernel as well.

Quoted 7 lines
Quoted 4 lines

I am just using the standard build system e.g. make bzImage. As I said if I remove the patch I mentioned in the original post everything works fine. If the patch is applied it doesn't work. I don't know if that has anything to do with building the firmware.

The firmware still fails to load, it just fails later and the driver does not fail to load because of it.

Oh. I hadn't realised. Anyway, with the patch removed the card supports XV in X windows and with the patch installed it doesn't. If the firmware always fails to load what does it do?

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#9 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #8 from Alex Deucher <[email protected]> --- (In reply to Colin from comment #7)

Quoted 4 lines

Oh. I hadn't realised. Anyway, with the patch removed the card supports XV in X windows and with the patch installed it doesn't. If the firmware always fails to load what does it do?

The firmware doesn't always fail to load; it loads fine. Something is wrong with yourt setup. Attach your xorg log and dmesg output for both cases.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#10 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #9 from Colin <[email protected]> --- (In reply to Alex Deucher from comment #8)

Quoted 8 lines

(In reply to Colin from comment #7)

Quoted 4 lines

Oh. I hadn't realised. Anyway, with the patch removed the card supports XV in X windows and with the patch installed it doesn't. If the firmware always fails to load what does it do?

The firmware doesn't always fail to load; it loads fine. Something is wrong with yourt setup. Attach your xorg log and dmesg output for both cases.

but it was you that said it always failed to load so I am getting confused now.

It is not to do with X because the problem shows up in plain text mode as well before X is ever loaded. With the patch installed it won't load any fonts other than the default one when it is booting. With the patch removed it will with no other changes.

If I undo the patch and make no other changes what so ever it works correctly

If I compile the driver as a module it with no other changes what so ever it works correctly.

If I apply the patch and compile the kernel with the driver statically linked but no other changes what so ever it works correctly.

I don't see how it can be my setup when the only change to make it work or break is that patch.

I am not at home just now so I can't create a dmesg or xorg file but I'll send them later.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#11 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #10 from Alex Deucher <[email protected]> --- (In reply to Colin from comment #9)

Quoted 10 lines

but it was you that said it always failed to load so I am getting confused now.

It is not to do with X because the problem shows up in plain text mode as well before X is ever loaded. With the patch installed it won't load any fonts other than the default one when it is booting. With the patch removed it will with no other changes.

If I undo the patch and make no other changes what so ever it works correctly

Quoted 8 lines

If I compile the driver as a module it with no other changes what so ever it works correctly.

If I apply the patch and compile the kernel with the driver statically linked but no other changes what so ever it works correctly.

I don't see how it can be my setup when the only change to make it work or break is that patch.

I was referring to your setup. All the patch does it move the firmware loading earlier in the driver init process. So if the firmware loading fails with the patch applied, it should also fail without it asuming everything else is the same in your setup. Something is wrong with your local configuration such that the firmware is not availabl at driver load in some cases. The firmware is required to use acceleration in the driver.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#12 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #11 from Colin <[email protected]> --- (In reply to Alex Deucher from comment #10)

Quoted 20 lines

(In reply to Colin from comment #9)

Quoted 10 lines

but it was you that said it always failed to load so I am getting confused now.

It is not to do with X because the problem shows up in plain text mode as well before X is ever loaded. With the patch installed it won't load any fonts other than the default one when it is booting. With the patch removed it will with no other changes.

If I undo the patch and make no other changes what so ever it works correctly

Quoted 8 lines

If I compile the driver as a module it with no other changes what so ever it works correctly.

If I apply the patch and compile the kernel with the driver statically linked but no other changes what so ever it works correctly.

I don't see how it can be my setup when the only change to make it work or break is that patch.

Quoted 6 lines

I was referring to your setup. All the patch does it move the firmware loading earlier in the driver init process. So if the firmware loading fails with the patch applied, it should also fail without it asuming everything else is the same in your setup. Something is wrong with your local configuration such that the firmware is not availabl at driver load in some cases. The firmware is required to use acceleration in the driver.

I've built three versions of the same kernel 3.15.4. The first is the standard kernel including the patch with the radeon driver built as a module. The second is the kernel with the radeon driver statically linked and the third is also statically linked but this time with that patch removed. I've booted from each kernel and made copies of the output from dmesg, the output of setfont and the Xorg log file. I've put the 9 files in a zip file and attached it. The names of each file will tell you what they are.

I think your suggestion is correct. With the patch applied something is not ready that prevents the firmware from being loaded. Without the patch or with the driver loaded as a module the firmware loads every time. Loading as a module will presumably mean that it tries to access the firmware file later in the boot process.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#14 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #13 from Alex Deucher <[email protected]> --- You need to compile the firmware into your kernel when you build the driver into the kernel. In both of your static builds, the firmware fails to load:

static-with-patch:

[    0.263616] r600_cp: Failed to load firmware "radeon/RV730_pfp.bin"
[    0.263668] [drm:rv770_init] *ERROR* Failed to load firmware!
[    0.263721] radeon 0000:01:00.0: Fatal error during GPU init

static-without-patch:

[    0.269288] [drm] Loading RV730 Microcode
[    0.269354] r600_cp: Failed to load firmware "radeon/RV730_pfp.bin"
[    0.269403] [drm:rv770_startup] *ERROR* Failed to load firmware!

You need to specify CONFIG_EXTRA_FIRMWARE in your kernel configuration and point it to the firmware files required by the driver. E.g.,

CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" CONFIG_EXTRA_FIRMWARE="radeon/RV730_me.bin radeon/RV730_pfp.bin radeon/R700_rlc.bin RV740_smc.bin"

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#15 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #14 from Colin <[email protected]> --- (In reply to Alex Deucher from comment #13)

Quoted 13 lines

You need to compile the firmware into your kernel when you build the driver into the kernel. In both of your static builds, the firmware fails to load:

static-with-patch:

[    0.263616] r600_cp: Failed to load firmware "radeon/RV730_pfp.bin"
[    0.263668] [drm:rv770_init] *ERROR* Failed to load firmware!
[    0.263721] radeon 0000:01:00.0: Fatal error during GPU init

static-without-patch:

[    0.269288] [drm] Loading RV730 Microcode
[    0.269354] r600_cp: Failed to load firmware "radeon/RV730_pfp.bin"
[    0.269403] [drm:rv770_startup] *ERROR* Failed to load firmware!
Quoted 7 lines

You need to specify CONFIG_EXTRA_FIRMWARE in your kernel configuration and point it to the firmware files required by the driver. E.g.,

CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware" CONFIG_EXTRA_FIRMWARE="radeon/RV730_me.bin radeon/RV730_pfp.bin radeon/R700_rlc.bin RV740_smc.bin"

Thanks I'll give it a go when I home from work tonight. I am sure that will be the solution. Strange thing is that even with the firmware not loaded the card works fine when the patch is not present.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#16 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

--- Comment #15 from Alex Deucher <[email protected]> --- (In reply to Colin from comment #14)

Quoted 4 lines

Thanks I'll give it a go when I home from work tonight. I am sure that will be the solution. Strange thing is that even with the firmware not loaded the card works fine when the patch is not present.

The patch changes when the firmware loads during driver init. With the patch the failure happens earlier so the error is fatal and the driver doesn't load. Without the patch, the driver still loads but all acceleration, interrupts, and most other features are disabled so it's not exactly working.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.
#17 lore raw
In reply to a message not in the archive

https://bugzilla.kernel.org/show_bug.cgi?id=80331

Colin <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #16 from Colin <[email protected]> --- (In reply to Alex Deucher from comment #15)

Quoted 11 lines

(In reply to Colin from comment #14)

Quoted 4 lines

Thanks I'll give it a go when I home from work tonight. I am sure that will be the solution. Strange thing is that even with the firmware not loaded the card works fine when the patch is not present.

The patch changes when the firmware loads during driver init. With the patch the failure happens earlier so the error is fatal and the driver doesn't load. Without the patch, the driver still loads but all acceleration, interrupts, and most other features are disabled so it's not exactly working.

That explains it. I guess when it is a module it loads the firmware when the module loads and initializes. I had a look at the request_firmware() function and I think it will read the firmware if it is not already in memory. I suspect that can't work when it is static as the driver is initialized before the disk drivers are loaded. Anyway the so called "bug" turns out to be my stupidity:-( Such is life.

In any event thanks for all your help and the explanation.

Best wishes.....
Colin

PS I'm not sure what the correct code from the list is. There isn't a "Stupid User" one so I picked Invalid. I hope that's ok.

Signature · 2 lines
You are receiving this mail because:
You are watching the assignee of the bug.