Skip to content

Instantly share code, notes, and snippets.

@apritzel
Created February 18, 2021 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apritzel/8a861c961e36c8d919e2a6643b64bc3f to your computer and use it in GitHub Desktop.
Save apritzel/8a861c961e36c8d919e2a6643b64bc3f to your computer and use it in GitHub Desktop.
U-Boot sunxi display debug hack to list EDID reported modes
diff --git a/drivers/video/sunxi/sunxi_display.c b/drivers/video/sunxi/sunxi_display.c
index 61498d1642f..25e5f58b467 100644
--- a/drivers/video/sunxi/sunxi_display.c
+++ b/drivers/video/sunxi/sunxi_display.c
@@ -292,7 +292,11 @@ static int sunxi_hdmi_edid_get_mode(struct sunxi_display *sunxi_display,
for (i = 0; i < 4; i++, t++) {
r = video_edid_dtd_to_ctfb_res_modes(t, mode);
if (r == 0)
- break;
+ printf("mode %d: %dx%d@%dHz; pixel clock: %d KHz\n",
+ i, mode->xres, mode->yres, mode->refresh,
+ mode->pixclock_khz);
+ else
+ printf("mode %d: error %d\n", i, r);
}
if (i == 4) {
printf("EDID: no usable detailed timing found\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment