This function will also be used by drm_edid_block_valid after the next patch in the series. Signed-off-by: Stefan Brüns <stefan.bruens@xxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_edid.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index d68f56d..31988ca 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1032,6 +1032,17 @@ static bool drm_edid_is_zero(const u8 *in_edid, int length) return true; } +static void drm_dump_edid(const u8 *raw_edid) +{ + if (drm_edid_is_zero(raw_edid, EDID_LENGTH)) { + printk(KERN_ERR "EDID block is all zeroes\n"); + } else { + printk(KERN_ERR "Raw EDID:\n"); + print_hex_dump(KERN_ERR, " \t", DUMP_PREFIX_NONE, 16, 1, + raw_edid, EDID_LENGTH, false); + } +} + /** * drm_edid_block_valid - Sanity check the EDID block (base or extension) * @raw_edid: pointer to raw EDID block @@ -1095,15 +1106,9 @@ bool drm_edid_block_valid(u8 *raw_edid, int block, bool print_bad_edid) return true; bad: - if (print_bad_edid) { - if (drm_edid_is_zero(raw_edid, EDID_LENGTH)) { - printk(KERN_ERR "EDID block is all zeroes\n"); - } else { - printk(KERN_ERR "Raw EDID:\n"); - print_hex_dump(KERN_ERR, " \t", DUMP_PREFIX_NONE, 16, 1, - raw_edid, EDID_LENGTH, false); - } - } + if (print_bad_edid) + drm_dump_edid(raw_edid); + return false; } EXPORT_SYMBOL(drm_edid_block_valid); -- 2.1.2 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel