]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amd/display: add new dc debug structure to track debug data
authorJun Lei <Jun.Lei@amd.com>
Fri, 22 Jun 2018 20:51:47 +0000 (16:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Jul 2018 21:11:50 +0000 (16:11 -0500)
[why]
Some DTN tests still failing @ 2%  Need to reduce.

[how]
add instrumentation code to driver so we can get more information from failed runs.

Signed-off-by: Jun Lei <Jun.Lei@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dc.h

index 54e39645234577cc800c09e992af50a3556a26e3..701a882505e98d6d3abf9251c1ecdead5dd88dd8 100644 (file)
@@ -1028,6 +1028,9 @@ enum link_training_result dc_link_dp_perform_link_training(
                        lt_settings.lane_settings[0].VOLTAGE_SWING,
                        lt_settings.lane_settings[0].PRE_EMPHASIS);
 
+       if (status != LINK_TRAINING_SUCCESS)
+               link->ctx->dc->debug.debug_data.ltFailCount++;
+
        return status;
 }
 
index 85f5ddded4188f87d1c98c7e0754fd2ea34b49e9..f74ad8e3fd4e4e482b57c9c28de484144e9cbd94 100644 (file)
@@ -259,6 +259,11 @@ struct dc_debug {
        bool scl_reset_length10;
        bool hdmi20_disable;
 
+       struct {
+               uint32_t ltFailCount;
+               uint32_t i2cErrorCount;
+               uint32_t auxErrorCount;
+       } debug_data;
 };
 struct dc_state;
 struct resource_pool;