Skip to content

Commit

Permalink
drm/edid: Dump the EDID when drm_edid_get_panel_id() has an error
Browse files Browse the repository at this point in the history
If we fail to get a valid panel ID in drm_edid_get_panel_id() we'd
like to see the EDID that was read so we have a chance of
understanding what's wrong. There's already a function for that, so
let's call it in the error case.

NOTE: edid_block_read() has a retry loop in it, so actually we'll only
print the block read back from the final attempt. This still seems
better than nothing.

Reviewed-by: Abhinav Kumar <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/20221021130637.1.I8c2de0954a4e54e0c59a72938268e2ead91daa98@changeid
  • Loading branch information
dianders committed Nov 14, 2022
1 parent 6d0bfef commit 69c7717
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -2799,6 +2799,8 @@ u32 drm_edid_get_panel_id(struct i2c_adapter *adapter)

if (edid_block_status_valid(status, edid_block_tag(base_block)))
panel_id = edid_extract_panel_id(base_block);
else
edid_block_dump(KERN_NOTICE, base_block, 0);

kfree(base_block);

Expand Down

0 comments on commit 69c7717

Please sign in to comment.