On 9/26/24 09:32, Andi Kleen wrote:
I have an old monitor that reports a zero EDID block, which results in a warning message. This happens on every screen save cycle, and maybe in some other situations, and over time the whole kernel log gets filled with these redundant messages. Printing it only once should be sufficient. Mark all the bad EDID notices as _once. Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_edid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 855beafb76ff..d6b47bdcd5d7 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1916,10 +1916,10 @@ static void edid_block_status_print(enum edid_block_status status, pr_debug("EDID block %d pointer is NULL\n", block_num); break; case EDID_BLOCK_ZERO: - pr_notice("EDID block %d is all zeroes\n", block_num); + pr_notice_once("EDID block %d is all zeroes\n", block_num);
It may be a good opportunity to switch these over to drm_notice_once() instead. Hamza
break; case EDID_BLOCK_HEADER_CORRUPT: - pr_notice("EDID has corrupt header\n"); + pr_notice_once("EDID has corrupt header\n"); break; case EDID_BLOCK_HEADER_REPAIR: pr_debug("EDID corrupt header needs repair\n"); @@ -1933,13 +1933,13 @@ static void edid_block_status_print(enum edid_block_status status, block_num, edid_block_tag(block), edid_block_compute_checksum(block)); } else { - pr_notice("EDID block %d (tag 0x%02x) checksum is invalid, remainder is %d\n", + pr_notice_once("EDID block %d (tag 0x%02x) checksum is invalid, remainder is %d\n", block_num, edid_block_tag(block), edid_block_compute_checksum(block)); } break; case EDID_BLOCK_VERSION: - pr_notice("EDID has major version %d, instead of 1\n", + pr_notice_once("EDID has major version %d, instead of 1\n", block->version); break; default:
-- Hamza