On Tue, Jun 14, 2011 at 8:13 AM, Dave Airlie wrote:
this puts the header and followup at the same loglevel as the hex dump code.
...
bad: if (raw_edid) {
- DRM_ERROR("Raw EDID:\n");
- printk(KERN_ERR "Raw EDID:\n");
print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE, raw_edid, EDID_LENGTH);
- printk("\n");
- printk(KERN_ERR "\n");
}
It won't work because print_hex_dump_bytes() always uses KERN_DEBUG anyway. Its first argument is a string prefix so currently the value of the KERN_ERR macro is printed out: [drm:drm_edid_block_valid] *ERROR* Raw EDID: <3>00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
We can use print_hex_dump() instead, see attached patch. I even tested it with "dmesg -r" - I think Linus prefers tested patches at this point in the cycle :) But it is purely cosmetic and can wait for 3.1 also.
Maybe we eventually should print out in a format like xrandr and Xorg do, so tools like edid-decode can eat it.
Cheers, Tormod