[PATCH 1/3] drm: make debug levels match in edid failure code.

Tormod Volden lists.tormod at gmail.com
Fri Jun 17 12:38:30 PDT 2011


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drm-really-make-debug-levels-match-in-edid-failure-c.patch
Type: text/x-patch
Size: 1098 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20110617/75eed25d/attachment.bin>


More information about the dri-devel mailing list