Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Add sink/link debug logs

Add some extra logs to better help triage blackscreen issues.

* Dump all the links to see if they have sinks associated.
* Print the edid manufacturer & product id associated with a stream that
was just created.

Reviewed-by: Jerry Zuo <jerry.zuo@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Aurabindo Pillai and committed by
Alex Deucher
08f68d93 e6c0e853

+77 -2
+73
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 3392 3392 } 3393 3393 } 3394 3394 3395 + /** 3396 + * amdgpu_dm_dump_links_and_sinks - Debug dump of all DC links and their sinks 3397 + * @adev: amdgpu device pointer 3398 + * 3399 + * Iterates through all DC links and dumps information about local and remote 3400 + * (MST) sinks. Should be called after connector detection is complete to see 3401 + * the final state of all links. 3402 + */ 3403 + static void amdgpu_dm_dump_links_and_sinks(struct amdgpu_device *adev) 3404 + { 3405 + struct dc *dc = adev->dm.dc; 3406 + struct drm_device *dev = adev_to_drm(adev); 3407 + int li; 3408 + 3409 + if (!dc) 3410 + return; 3411 + 3412 + for (li = 0; li < dc->link_count; li++) { 3413 + struct dc_link *l = dc->links[li]; 3414 + const char *name = NULL; 3415 + int rs; 3416 + 3417 + if (!l) 3418 + continue; 3419 + if (l->local_sink && l->local_sink->edid_caps.display_name[0]) 3420 + name = l->local_sink->edid_caps.display_name; 3421 + else 3422 + name = "n/a"; 3423 + 3424 + drm_dbg_kms(dev, 3425 + "LINK_DUMP[%d]: local_sink=%p type=%d sink_signal=%d sink_count=%u edid_name=%s mst_capable=%d mst_alloc_streams=%d\n", 3426 + li, 3427 + l->local_sink, 3428 + l->type, 3429 + l->local_sink ? l->local_sink->sink_signal : SIGNAL_TYPE_NONE, 3430 + l->sink_count, 3431 + name, 3432 + l->dpcd_caps.is_mst_capable, 3433 + l->mst_stream_alloc_table.stream_count); 3434 + 3435 + /* Dump remote (MST) sinks if any */ 3436 + for (rs = 0; rs < l->sink_count; rs++) { 3437 + struct dc_sink *rsink = l->remote_sinks[rs]; 3438 + const char *rname = NULL; 3439 + 3440 + if (!rsink) 3441 + continue; 3442 + if (rsink->edid_caps.display_name[0]) 3443 + rname = rsink->edid_caps.display_name; 3444 + else 3445 + rname = "n/a"; 3446 + drm_dbg_kms(dev, 3447 + " REMOTE_SINK[%d:%d]: sink=%p signal=%d edid_name=%s\n", 3448 + li, rs, 3449 + rsink, 3450 + rsink->sink_signal, 3451 + rname); 3452 + } 3453 + } 3454 + } 3455 + 3395 3456 static int dm_resume(struct amdgpu_ip_block *ip_block) 3396 3457 { 3397 3458 struct amdgpu_device *adev = ip_block->adev; ··· 3636 3575 drm_dp_mst_topology_queue_probe(&aconnector->mst_mgr); 3637 3576 } 3638 3577 drm_connector_list_iter_end(&iter); 3578 + 3579 + /* Debug dump: list all DC links and their associated sinks after detection 3580 + * is complete for all connectors. This provides a comprehensive view of the 3581 + * final state without repeating the dump for each connector. 3582 + */ 3583 + amdgpu_dm_dump_links_and_sinks(adev); 3639 3584 3640 3585 amdgpu_dm_irq_resume_late(adev); 3641 3586 ··· 5473 5406 } 5474 5407 amdgpu_set_panel_orientation(&aconnector->base); 5475 5408 } 5409 + 5410 + /* Debug dump: list all DC links and their associated sinks after detection 5411 + * is complete for all connectors. This provides a comprehensive view of the 5412 + * final state without repeating the dump for each connector. 5413 + */ 5414 + amdgpu_dm_dump_links_and_sinks(adev); 5476 5415 5477 5416 /* Software is initialized. Now we can register interrupt handlers. */ 5478 5417 switch (adev->asic_type) {
+4 -2
drivers/gpu/drm/amd/display/dc/core/dc_stream.c
··· 879 879 stream->sink->sink_signal != SIGNAL_TYPE_NONE) { 880 880 881 881 DC_LOG_DC( 882 - "\tdispname: %s signal: %x\n", 882 + "\tsignal: %x dispname: %s manufacturer_id: 0x%x product_id: 0x%x\n", 883 + stream->signal, 883 884 stream->sink->edid_caps.display_name, 884 - stream->signal); 885 + stream->sink->edid_caps.manufacturer_id, 886 + stream->sink->edid_caps.product_id); 885 887 } 886 888 } 887 889 }