Bug 40952
Summary: | R100 firmware no longer loads | ||
---|---|---|---|
Product: | Drivers | Reporter: | James Cloos (cloos) |
Component: | Video(DRI - non Intel) | Assignee: | drivers_video-dri |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | alexdeucher, florian, maciej.rutecki, riesebie, rjw, torvalds |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.1.0-rc1-00035-ge6a99d3 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Bug Depends on: | |||
Bug Blocks: | 40982 |
Description
James Cloos
2011-08-11 17:07:27 UTC
Do you have the firmware in your initrd (if radeon is modular) or compiled into your kernel (if radeon is compiled in)? There haven't been any changes to the r100 code in ages, so I suspect this is either missing firmware or a change in the generic firmware code. Sorry. I thought that I had written that the firmare is compiled in. Or at least it is supposed to be: :; zgrep FIRMWARE /proc/config.gz # CONFIG_PREVENT_FIRMWARE_BUILD is not set ➤ CONFIG_FIRMWARE_IN_KERNEL=y CONFIG_EXTRA_FIRMWARE="" CONFIG_FIRMWARE_EDID=y CONFIG_FIRMWARE_MEMMAP=y # CONFIG_GOOGLE_FIRMWARE is not set From Elimar Riesebieter (riesebie at lxtec.de): bisecting brought me to commit 288d5abec8314ae50fe6692f324b0444acae8486. Reverting seems to work as microcode is loaded with compiled in firmware and radeon kms driver. That's commit 288d5abec8314ae50fe6692f324b0444acae8486 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed Aug 3 22:03:29 2011 -1000 Boot up with usermodehelper disabled On Wed, Aug 24, 2011 at 2:04 PM, <bugzilla-daemon@bugzilla.kernel.org> wrote: > > --- Comment #3 from Michel Dänzer <michel@daenzer.net> 2011-08-24 21:03:48 > --- > From Elimar Riesebieter (riesebie at lxtec.de): > > bisecting brought me to commit > 288d5abec8314ae50fe6692f324b0444acae8486. Reverting seems to work as > microcode is loaded with compiled in firmware and radeon kms driver. Grr. So _request_firmware() does this: if (WARN_ON(usermodehelper_is_disabled())) { dev_err(device, "firmware: %s will not be loaded\n", name); return -EBUSY; } which is reasonable, but it does mean that it will warn even if the firmware is built into the kernel. On the one hand, that's really nice, because it implies a driver does a firmware load too early, at a point where it cannot do the generic firmware load. On the other hand, it sucks, because it does disallow this situation that used to work, now that we actually do the sane thing and don't allow usermode helpers before init has been set up. So I bet the attached patch fixes the R100 problem, but I'm not 100% happy with it. Comments? Linus Ok, that fix is committed as caca9510ff4e ("firmware loader: allow builtin firmware load even if usermodehelper is disabled"). Please verify that it does fix it, and close this bug if so. > Ok, that fix is committed as caca9510ff4e ("firmware loader: allow > builtin firmware load even if usermodehelper is disabled"). > Please verify that it does fix it, and close this bug if so. Will do, just as soon as it hits hera. (Not there yet.) James Cloos <cloos@jhcloos.com> 2011-08-24 23:54:29: > > Will do, just as soon as it hits hera. (Not there yet.) Duh. I forgot to push. Done, Linus Reply-To: gregkh@suse.de On Wed, Aug 24, 2011 at 02:22:27PM -0700, Linus Torvalds wrote: > On Wed, Aug 24, 2011 at 2:04 PM, <bugzilla-daemon@bugzilla.kernel.org> > wrote: > > > > --- Comment #3 from Michel Dänzer <michel@daenzer.net> 2011-08-24 21:03:48 > --- > > From Elimar Riesebieter (riesebie at lxtec.de): > > > > bisecting brought me to commit > > 288d5abec8314ae50fe6692f324b0444acae8486. Reverting seems to work as > > microcode is loaded with compiled in firmware and radeon kms driver. > > Grr. > > So _request_firmware() does this: > > if (WARN_ON(usermodehelper_is_disabled())) { > dev_err(device, "firmware: %s will not be loaded\n", name); > return -EBUSY; > } > > which is reasonable, but it does mean that it will warn even if the > firmware is built into the kernel. > > On the one hand, that's really nice, because it implies a driver does > a firmware load too early, at a point where it cannot do the generic > firmware load. > > On the other hand, it sucks, because it does disallow this situation > that used to work, now that we actually do the sane thing and don't > allow usermode helpers before init has been set up. > > So I bet the attached patch fixes the R100 problem, but I'm not 100% > happy with it. > > Comments? That patch looks good to me. Any ideas on ways that this all could be rewritten to be "saner"? greg k-h That worked. 3.1.0-rc3-00096-gcaca951 loads the r100 firmware. Interestingly, the RS780 managed to load its firmware (also all compiled into the kernel) even w/o this patch. But everything I can test again works fine with master. On Thu, Aug 25, 2011 at 2:25 PM, <bugzilla-daemon@bugzilla.kernel.org> wrote: > > Interestingly, the RS780 managed to load its firmware (also all compiled into > the kernel) even w/o this patch. Does the R600+ driver perhaps load firmware only at open time? The problem with the r100 driver is that it loads firmware very early on, at driver init time. Generally it's *much* better if you request the firmware when the device is actually opened, rather than when the driver loads. Linus > Does the R600+ driver perhaps load firmware only at open time?
They look the same in dmesg:
[ 1.648745] [drm] Initialized drm 1.1.0 20060810
[ 1.648824] [drm] radeon kernel modesetting enabled.
...
[ 1.658077] [drm] Loading RS780 Microcode
...
[ 1.733643] fbcon: radeondrmfb (fb0) is primary device
...
[ 1.754301] [drm] Initialized radeon 2.11.0 20080528 for 0000:01:05.0 on minor 0
vs
[ 1.034278] [drm] Initialized drm 1.1.0 20060810
[ 1.034359] [drm] radeon kernel modesetting enabled.
...
[ 1.038968] [drm] Loading R100 Microcode
...
[ 1.238337] fbcon: radeondrmfb (fb0) is primary device
...
[ 1.694374] [drm] Initialized radeon 2.11.0 20080528 for 0000:01:00.0 on minor 0
my syslog for the earlier boot has already rotated out, but from memory
it looks the same as the previous boot.
Reply-To: airlied@gmail.com > --- Comment #10 from Linus Torvalds <torvalds@linux-foundation.org> > 2011-08-25 22:43:53 --- > On Thu, Aug 25, 2011 at 2:25 PM, <bugzilla-daemon@bugzilla.kernel.org> > wrote: >> >> Interestingly, the RS780 managed to load its firmware (also all compiled >> into >> the kernel) even w/o this patch. > > Does the R600+ driver perhaps load firmware only at open time? > > The problem with the r100 driver is that it loads firmware very early > on, at driver init time. Generally it's *much* better if you request > the firmware when the device is actually opened, rather than when the > driver loads. That doesn't make any sense for radeon graphics drivers, since the firmware is required to initialise the engines on the GPU, which you really want to do so you can turn on the screen and stuff. Dave. (In reply to comment #10) > On Thu, Aug 25, 2011 at 2:25 PM, <bugzilla-daemon@bugzilla.kernel.org> > wrote: > > > > Interestingly, the RS780 managed to load its firmware (also all compiled > into > > the kernel) even w/o this patch. > > Does the R600+ driver perhaps load firmware only at open time? They both load the ucode at the same time. A patch referencing this bug report has been merged in Linux v3.1-rc4: commit caca9510ff4e5d842c0589110243d60927836222 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed Aug 24 15:55:30 2011 -0700 firmware loader: allow builtin firmware load even if usermodehelper is disabled |