Re: Intel graphics drm issue?

Mark Hounschell
2012-10-15T09:58:05Z

On 10/14/2012 04:40 PM, Bruno Prémont wrote:
> On Sun, 14 October 2012 Mark Hounschell <dmarkh@cfl.rr.com> wrote:
>> I gave it a try. I don't think it liked my kernel cmdline. dmesg attached.
>> There is a lot more in there now that nomodeset is gone and the debug is
>> turned on.
>>
>> # ls -al /lib/firmware/edid/lg42lb9df.edid
>> -rw-r--r-- 1 root root 1024 Oct 14 2012 /lib/firmware/edid/lg42lb9df.edid
>>
>> ## cat /proc/cmdline
>> root=/dev/disk/by-id/ata-INTEL_SSDSC2CW060A3_CVCV205106EB060AGN-part4
>> noresume splash=silent quiet apm=off vga=normal drm.debug=0xe irqpoll
>> drm_kms_helper.edid_firmware=edid/lg42lb9df.edid
>>
>>
>> from attached dmesg:
>> 1.833032] drm_kms_helper: Unknown parameter `edid'
>
> As your drm drivers seem to all be built-in (according to kernel timings)
> you will have to build the EDID firmware into the kernel as well (see
> CONFIG_EXTRA_FIRMWARE), otherwise it probably can't be loaded (unless Linus'
> firmware loading patch is already in 3.6.2 and root filesystem/initrd is
> ready at that time).
>
> Did you set CONFIG_DRM_LOAD_EDID_FIRMWARE?
> If not, that may be the reason for unknown parameter `edid' error.
>
>
> But I saw I mis-remembered side of EDID blobs, they are just 128 bytes
> per block, not 512 (seems I was thinking disk sector sizes),
> thus you should just get 256 bytes output.
>
> Just truncating the file to 256 bytes will do. You may also
> change your .c file to have
> uint8_t firmware[] = {
> ...
> };
> ...
> fwrite(firmware, sizeof(firmware), 1, fd);
> ...
>
> that way compiler gets numbers right :)
>
> Kernel code rejects edid with unexpected size! Thus it would have
> complained if it had tried to load it with a size of 1k.
>

Good morning Bruno.

Still no luck here. I must be doing something wrong.

geexbox:/usr/src/linux-3.6.2 # grep -rn CONFIG_EXTRA_FIRMWARE .config
1406:CONFIG_EXTRA_FIRMWARE="edid/lg42lb9df.edid"
1407:CONFIG_EXTRA_FIRMWARE_DIR="firmware"

geexbox:/usr/src/linux-3.6.2 # grep CONFIG_DRM_LOAD_EDID_FIRMWARE .config
CONFIG_DRM_LOAD_EDID_FIRMWARE=y

geexbox:/usr/src/linux-3.6.2 # ls -al firmware/edid/
-rw-r--r-- 1 root root 256 Oct 14 19:18 firmware/edid/lg42lb9df.edid

I believe the the drm modules are modules and in initrd.
geexbox:/boot # mkinitrd -i initrd-3.6.2 -k vmlinuz-3.6.2

Kernel image: /boot/vmlinuz-3.6.2
Initrd image: /boot/initrd-3.6.2
KMS drivers: i915
Root device:
/dev/disk/by-id/ata-INTEL_SSDSC2CW060A3_CVCV205106EB060AGN-part4
(/dev/sda4) (mounted on / as ext4)
Kernel Modules: thermal fan scsi_dh scsi_dh_emc scsi_dh_rdac scsi_dh_alua
scsi_dh_hp_sw crc16 jbd2 ext4 video button i2c-algo-bit drm drm_kms_helper
i915 xhci-hcd hid-logitech-dj hid-generic
Features: acpi kms plymouth block usb resume.userspace resume.kernel

After the kernel build, I have these in /usr/src/linux-3.6.2/firmware/edid/

geexbox:/usr/src/linux-3.6.2 # ls -al firmware/edid/
lg42lb9df.edid lg42lb9df.edid.gen.o
.lg42lb9df.edid.gen.o.cmd lg42lb9df.edid.gen.S
geexbox:/usr/src/linux-3.6.2 # ls -al firmware/edid/*
-rw-r--r-- 1 root root 256 Oct 14 19:18 firmware/edid/lg42lb9df.edid
-rw-r--r-- 1 root root 1104 Oct 15 00:52 firmware/edid/lg42lb9df.edid.gen.o
-rw-r--r-- 1 root root 475 Oct 15 00:52 firmware/edid/lg42lb9df.edid.gen.S

After boot, from dmesg:

[ 0.000000] Kernel command line:
root=/dev/disk/by-id/ata-INTEL_SSDSC2CW060A3_CVCV205106EB060AGN-part4
noresume splash=silent quiet apm=off vga=normal irqpoll
drm_kms_helper.edid_firmware=card0-HDMI-A-1:edid/lg42lb9df.edid,card0-HDMI-A-3:edid/lg42lb9df.edid,card0-HDMI-A-3:edid/lg42lb9df.edid

[ 1.835741] drm_kms_helper: Unknown parameter `edid'

Regards
Mark