[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#763305: linux-image-3.16-2-amd64: debian patch of linux kernel radeon driver erroneously prevents firmware loading



On Mon, 2014-09-29 at 00:24 -0400, Colin Worth wrote:
> Package: src:linux
> Version: 3.16.3-2
> Severity: important
> 
> Dear Maintainer,
> 
> In order to use the radeon free driver with my HD6xxx series Radeon
> card on my EFI boot laptop, I downloaded a fresh kernel from
> kernel.org and built it with the following config, in order to add the
> required firmware for the Radeon card into the kernel, as required.
> ....
> CONFIG_FIRMWARE_IN_KERNEL=y
> CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
> CONFIG_EXTRA_FIRMWARE="radeon/ARUBA_me.bin radeon/ARUBA_pfp.bin radeon/ARUBA_rlc.bin {....}"
> ....
> 
> After this, the driver loaded successfully:
> Sep 28 22:28:30 worthlaptop kernel: [    4.972516] [drm] radeon kernel modesetting enabled.
> Sep 28 22:28:30 worthlaptop kernel: [    4.976621] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741 0x106B:0x00E2)
> 
> However, recently I decided to build the kernel the Debian way, to get
> the latest kernel patches. In particular, I got:
> https://github.com/BlankOn/linux-debian/blob/master/debian/patches/bugfix/all/radeon-firmware-is-required-for-drm-and-kms-on-r600-onward.patch
> 
> After this patch was applied, I got this error when trying to boot:
> Sep 28 15:47:12 worthlaptop kernel: [    2.668496] [drm] radeon kernel modesetting enabled.
> Sep 28 15:47:12 worthlaptop kernel: [    2.668560] [drm:radeon_pci_probe] *ERROR* radeon kernel modesetting for R600 or later requires firmware-linux-nonfree.
> 
> The purpose of the patch seems to have been to provide a quick fix to
> mitigate the number of bug reports related to missing firmware, by
> issuing a helpful message in the kernel log.

Not just that - the driver tries to recover after finding that firmware
is missing, but this code path is not well tested and didn't work on
many systems.  It is better to detect the error earlier and then the
system can fall back to a generic framebuffer driver.

> But this didn't work - I have firmware in the correct location, and
> loaded into the kernel, but I still get the error messsage, and the
> driver fails to load, simply due to the patch. So the effect is to
> wrongly prevent the driver from loading.
[...]
> Back to the kernel patch: the source of the problem is that the patch
> uses the call __ kern_path("/lib/firmware/radeon", LOOKUP_DIRECTORY)
> __ to try to check whether the user has firmware installed. I am not
> familiar with how the kern_path call works, but since I have this
> directory, and the call failed, it is definitely not checking the hard
> drive (probably obvious).  Perhaps if I had set the kernel config
> CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/radeon", it would work as
> intended?
[...]

I think the problem is that with the driver built-in this code runs
before the hard drive has been mounted.  I think I will revise the patch
so the check only applies when the driver is built as a module.

Ben.

-- 
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: