Re: [PATCH] drm/edid: Don't repeatedly log hex dumps of bad EDIDs by default

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

 



2010/9/18 Marcin Slusarz <marcin.slusarz@xxxxxxxxx>:
> On Fri, Sep 17, 2010 at 06:53:26PM -0400, Andy Walls wrote:
>> On my system, every 10 seconds drm_edid_block_valid() gets called 4
>> times by radeon_dvi_detect(). ÂThis results in 4 instances of a
>> multi-line hex dump of the same EDID (non-)data being logged every 10
>> seconds.
>>
>> Silence the hex dump from drm_edid_block_valid() unless a drm_debug
>> module parameter flag is set.
>>
>> Signed-of-by: Andy Walls <awalls@xxxxxxxxxxxxxxxx>
>>
>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
>> index dce5c4a..33a748c 100644
>> --- a/drivers/gpu/drm/drm_edid.c
>> +++ b/drivers/gpu/drm/drm_edid.c
>> @@ -173,9 +173,12 @@ drm_edid_block_valid(u8 *raw_edid)
>>
>> Âbad:
>> Â Â Â Â if (raw_edid) {
>> - Â Â Â Â Â Â Â DRM_ERROR("Raw EDID:\n");
>> - Â Â Â Â Â Â Â print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE, raw_edid, EDID_LENGTH);
>> - Â Â Â Â Â Â Â printk("\n");
>> + Â Â Â Â Â Â Â DRM_DEBUG("Raw EDID:\n");
>> + Â Â Â Â Â Â Â if (drm_debug & DRM_UT_CORE) {
>> + Â Â Â Â Â Â Â Â Â Â Â print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE,
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Âraw_edid, EDID_LENGTH);
>> + Â Â Â Â Â Â Â Â Â Â Â printk("\n");
>> + Â Â Â Â Â Â Â }
>> Â Â Â Â }
>> Â Â Â Â return 0;
>> Â}
>>
>
> Why not print it only once on original error level?
> Something like:
> static bool printed = false;
> if (!printed) {
> Â Â Â Â...
> Â Â Â Âprinted = true;
> }
>
> It has the same effect for you (no spamming by default) and it's still provide some information.

Should be per-monitor or per-output I think.

-- 
RafaÅ
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux