# How to load firmware from /lib/firmware/radeon?

## urcindalo

Hi!

I got 3D acceleration working with my ATI Radeon Mobility 4570 card and radeon/radeonhd drivers. But I see this message:

```
IRQ's not enabled, falling back to busy waits: 2 0
```

Today I saw the new package x11-drivers/radeon-ucode-20091209 in portage, which I installed. Its description says: *Quote:*   

> IRQ microcode for r6xx/r7xx Radeon GPUs

 After its installation a new system directory appeared, /lib/firmware/radeon, filled with *_pfp.bin and *_me.bin files.

However, after rebooting I still see the "IRQ's not enabled" message. What should I do to load the firmware for my card?

----------

## DaggyStyle

afaik, that feature is part of kernel .33

----------

## Sadako

I had the same issue, and found it much easier to build those firmware files into the kernel (which I think you'll need if using KMS anyways).

Just create the folder "/usr/src/firmware/radeon", drop the firmware files in there, then in menuconfig (or whatever you use) add /usr/src/firmware as the directory to search for external firmware to include, and add each firmware file to wish included, with each file in the list prepended with "radeon/", then the usual kernel recompile, copy to /boot and reboot.

IIRC you only actually need two specific files, and dmesg should tell you which ones (ie which ones it failed to find and load) before the "IRQ's not enabled" message.

I did this before the necessary files were added to portage btw.

----------

## urcindalo

Thanks for your help  :Smile:   I did as you say, but choosing the files placed in /lib/firmware/radeon by the radeon_ucode package.

After rebooting I see this in dmesg:

```
[   43.289832] [drm] Loading RV710 CP Microcode

[   43.289836] platform r600_cp.0: firmware: using built-in firmware radeon/RV710_pfp.bin

[   43.289840] platform r600_cp.0: firmware: using built-in firmware radeon/RV710_me.bin

[   43.319983] [drm] Resetting GPU

[   43.320046] [drm] writeback test succeeded in 1 usecs
```

With the previous kernel I could see "requesting file radeon/RV710_pfp.bin", or "requesting firmware radeon/RV710_pfp.bin", or something like that for both files in dmesg, so I guess something has changed. The "Loading RV710 CP Microcode" was already there, though, before recompiling the kernel.

However, I still see get the "IRQ's not enabled" warning. So, am I getting any benefit from these firmware files? I mean, would I be missing something if I hadn't compiled my kernel with them?

----------

## urcindalo

 *Hopeless wrote:*   

> I had the same issue, and found it much easier to build those firmware files into the kernel (which I think you'll need if using KMS anyways)

 

By the way, what is this KMS thing? I have this in my kernel .config:

```
$ cat .config | grep KMS

CONFIG_DRM_KMS_HELPER=m
```

and the module is loaded by the radeon module:

```
$ sudo lsmod

.....

radeon                474811  2

ttm                    36719  1 radeon

drm_kms_helper         22655  1 radeon

drm                   162263  5 radeon,ttm,drm_kms_helper

.....
```

Does it mean I'm using KMS? Or is it something else?

But even if I'm using it, what is it?

----------

## Sadako

Hmm, does the radeon-ucode ebuild include R600_rlc.bin and R700_rlc.bin, available from here?

I believe they are the ones needed for the IRQ work...

Are you using a stable kernel or one of the 2.6.33 release candidates?

rc8 should be the last rc before the .33 release, so should be relatively stable, I'd recommend trying it out as a there are loads of radeon drm updates in it (I think you may still need to add the "rlc" firmware files yourself, though).

----------

## Sadako

 *urcindalo wrote:*   

>  *Hopeless wrote:*   I had the same issue, and found it much easier to build those firmware files into the kernel (which I think you'll need if using KMS anyways) 
> 
> By the way, what is this KMS thing? I have this in my kernel .config:
> 
> ```
> ...

 KMS = Kernel Mode Setting, the config option for it is hidden under the "staging area" drivers, so odds are you're not using it.

It's still a work in process, what it esentially does is move the code for setting the resolution and refresh rate from the Xorg ddx drivers in userspace (ie xf86-video-ati) to the kernel drm driver.

The advantages at this stage are a replacement for whatever framebuffer driver you may be using for a high-res console, and switching between the console and Xorg is near instant, whereas without it there is some delay.

If that doesn't really interest you, then you're better off avoiding it for the moment, as it comes with a performance penalty, but sooner or later it's going to be the default, the intel and noveau drivers are KMS only now I believe.

----------

## urcindalo

 *Hopeless wrote:*   

> Hmm, does the radeon-ucode ebuild include R600_rlc.bin and R700_rlc.bin, available from here?
> 
> I believe they are the ones needed for the IRQ work...

 

Yes, they are included. I'm going to add them too. In a few minutes I'll post the results.

 *Hopeless wrote:*   

> Are you using a stable kernel or one of the 2.6.33 release candidates?
> 
> rc8 should be the last rc before the .33 release, so should be relatively stable, I'd recommend trying it out as a there are loads of radeon drm updates in it (I think you may still need to add the "rlc" firmware files yourself, though).

 

I'm using gentoo-sources-2.6.32-r5.

----------

## urcindalo

I can't compile the kernel when I include them. I get these errors:

```
# make && make modules_install && make install

  CHK     include/linux/version.h

  CHK     include/linux/utsrelease.h

  SYMLINK include/asm -> include/asm-x86

  CALL    scripts/checksyscalls.sh

  CHK     include/linux/compile.h

make[1]: *** No rule to make target `firmware/radeon/R600_rlc.bin', needed by `firmware/radeon/R600_rlc.bin.gen.o'.  Stop.

make: *** [firmware] Error 2
```

And the same for R700_rlc.bin.

Does the .bin extension mean they are precompiled binaries? If that's so, how could I load them during booting?

----------

## DaggyStyle

 *Hopeless wrote:*   

> KMS = Kernel Mode Setting, the config option for it is hidden under the "staging area" drivers, so odds are you're not using it.
> 
> 

 

I'm neither it hard freezes on my chip and the devs has no idea why...

will try again when .33 will go stable.

----------

## urcindalo

 *Hopeless wrote:*   

> KMS = Kernel Mode Setting, the config option for it is hidden under the "staging area" drivers, so odds are you're not using it..

 

Thnaks for the info and the clarifying explanation.

1) I enabled KMS, just to try it.

2) I got a system hang-up at boot and the laptop was not even accessible by ssh.

3) I removed the option  :Laughing: 

I'll try it again with the .33 kernel, too.

----------

## kernelOfTruth

 *urcindalo wrote:*   

>  *Hopeless wrote:*   KMS = Kernel Mode Setting, the config option for it is hidden under the "staging area" drivers, so odds are you're not using it.. 
> 
> Thnaks for the info and the clarifying explanation.
> 
> 1) I enabled KMS, just to try it.
> ...

 

the trick is to NOT enable modeset by default

e.g. nomodeset

at your boot-line

then after the box has booted up successfully - manually load the module (modprobe radeon modeset=1) or you can also add it to /etc/modprobe.d

after that you might want to set the power-profile to energy-saving / low:

echo "low" > /sys/class/drm/card0/device/power_profile

that way it worked for me

everytime I had modeset / KMS enabled by default it would show screen corruption when launching the kernel and hardlocking my box   :Idea: 

----------

