Skip to content

Commit 66d17ec

Browse files
committed
drm/edid: add [CONNECTOR:%d:%s] to debug logging
Reference the connector using [CONNECTOR:%d:%s] in existing device based debug logging. Signed-off-by: Jani Nikula <[email protected]> Reviewed-by: Simon Ser <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/5884410682bcbc032de4d3af8562c0b271edaa7f.1666614699.git.jani.nikula@intel.com
1 parent 2ab6590 commit 66d17ec

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

drivers/gpu/drm/drm_edid.c

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,7 +2196,8 @@ static void connector_bad_edid(struct drm_connector *connector,
21962196
if (connector->bad_edid_counter++ && !drm_debug_enabled(DRM_UT_KMS))
21972197
return;
21982198

2199-
drm_dbg_kms(connector->dev, "%s: EDID is invalid:\n", connector->name);
2199+
drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] EDID is invalid:\n",
2200+
connector->base.id, connector->name);
22002201
for (i = 0; i < num_blocks; i++)
22012202
edid_block_dump(KERN_DEBUG, edid + i, i);
22022203
}
@@ -6031,7 +6032,8 @@ static void drm_parse_hdmi_forum_scds(struct drm_connector *connector,
60316032
}
60326033

60336034
drm_dbg_kms(connector->dev,
6034-
"HF-VSDB: max TMDS clock: %d KHz, HDMI 2.1 support: %s, DSC 1.2 support: %s\n",
6035+
"[CONNECTOR:%d:%s] HF-VSDB: max TMDS clock: %d KHz, HDMI 2.1 support: %s, DSC 1.2 support: %s\n",
6036+
connector->base.id, connector->name,
60356037
max_tmds_clock, str_yes_no(max_frl_rate), str_yes_no(dsc_support));
60366038
}
60376039

@@ -6131,8 +6133,9 @@ static void drm_parse_microsoft_vsdb(struct drm_connector *connector,
61316133
if (version == 1 || version == 2 || (version == 3 && !desktop_usage))
61326134
info->non_desktop = true;
61336135

6134-
drm_dbg_kms(connector->dev, "HMD or specialized display VSDB version %u: 0x%02x\n",
6135-
version, db[5]);
6136+
drm_dbg_kms(connector->dev,
6137+
"[CONNECTOR:%d:%s] HMD or specialized display VSDB version %u: 0x%02x\n",
6138+
connector->base.id, connector->name, version, db[5]);
61366139
}
61376140

61386141
static void drm_parse_cea_ext(struct drm_connector *connector,
@@ -6253,22 +6256,26 @@ static void drm_parse_vesa_mso_data(struct drm_connector *connector,
62536256
struct drm_display_info *info = &connector->display_info;
62546257

62556258
if (block->num_bytes < 3) {
6256-
drm_dbg_kms(connector->dev, "Unexpected vendor block size %u\n",
6257-
block->num_bytes);
6259+
drm_dbg_kms(connector->dev,
6260+
"[CONNECTOR:%d:%s] Unexpected vendor block size %u\n",
6261+
connector->base.id, connector->name, block->num_bytes);
62586262
return;
62596263
}
62606264

62616265
if (oui(vesa->oui[0], vesa->oui[1], vesa->oui[2]) != VESA_IEEE_OUI)
62626266
return;
62636267

62646268
if (sizeof(*vesa) != sizeof(*block) + block->num_bytes) {
6265-
drm_dbg_kms(connector->dev, "Unexpected VESA vendor block size\n");
6269+
drm_dbg_kms(connector->dev,
6270+
"[CONNECTOR:%d:%s] Unexpected VESA vendor block size\n",
6271+
connector->base.id, connector->name);
62666272
return;
62676273
}
62686274

62696275
switch (FIELD_GET(DISPLAYID_VESA_MSO_MODE, vesa->mso)) {
62706276
default:
6271-
drm_dbg_kms(connector->dev, "Reserved MSO mode value\n");
6277+
drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] Reserved MSO mode value\n",
6278+
connector->base.id, connector->name);
62726279
fallthrough;
62736280
case 0:
62746281
info->mso_stream_count = 0;
@@ -6288,12 +6295,16 @@ static void drm_parse_vesa_mso_data(struct drm_connector *connector,
62886295

62896296
info->mso_pixel_overlap = FIELD_GET(DISPLAYID_VESA_MSO_OVERLAP, vesa->mso);
62906297
if (info->mso_pixel_overlap > 8) {
6291-
drm_dbg_kms(connector->dev, "Reserved MSO pixel overlap value %u\n",
6298+
drm_dbg_kms(connector->dev,
6299+
"[CONNECTOR:%d:%s] Reserved MSO pixel overlap value %u\n",
6300+
connector->base.id, connector->name,
62926301
info->mso_pixel_overlap);
62936302
info->mso_pixel_overlap = 8;
62946303
}
62956304

6296-
drm_dbg_kms(connector->dev, "MSO stream count %u, pixel overlap %u\n",
6305+
drm_dbg_kms(connector->dev,
6306+
"[CONNECTOR:%d:%s] MSO stream count %u, pixel overlap %u\n",
6307+
connector->base.id, connector->name,
62976308
info->mso_stream_count, info->mso_pixel_overlap);
62986309
}
62996310

@@ -6421,7 +6432,8 @@ static u32 update_display_info(struct drm_connector *connector,
64216432

64226433
out:
64236434
if (quirks & EDID_QUIRK_NON_DESKTOP) {
6424-
drm_dbg_kms(connector->dev, "Non-desktop display%s\n",
6435+
drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] Non-desktop display%s\n",
6436+
connector->base.id, connector->name,
64256437
info->non_desktop ? " (redundant quirk)" : "");
64266438
info->non_desktop = true;
64276439
}
@@ -6732,8 +6744,8 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
67326744
struct drm_edid drm_edid;
67336745

67346746
if (edid && !drm_edid_is_valid(edid)) {
6735-
drm_warn(connector->dev, "%s: EDID invalid.\n",
6736-
connector->name);
6747+
drm_warn(connector->dev, "[CONNECTOR:%d:%s] EDID invalid.\n",
6748+
connector->base.id, connector->name);
67376749
edid = NULL;
67386750
}
67396751

0 commit comments

Comments
 (0)