Commit b30eda8d authored by Wyatt Wood's avatar Wyatt Wood Committed by Alex Deucher

drm/amd/display: Add ETW log to dmub_psr_get_state

[Why]
GPINT commands have the lowest priority in DMCUB, so it's possible
that the command isn't processed in time.

[How]
Add a log to help identify this case.
Reviewed-by: default avatarKoo Anthony <Anthony.Koo@amd.com>
Acked-by: default avatarSolomon Chiu <solomon.chiu@amd.com>
Signed-off-by: default avatarWyatt Wood <wyatt.wood@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b2abb053
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "dmub/dmub_srv.h" #include "dmub/dmub_srv.h"
#include "core_types.h" #include "core_types.h"
#define DC_TRACE_LEVEL_MESSAGE(...) /* do nothing */
#define MAX_PIPES 6 #define MAX_PIPES 6
/* /*
...@@ -96,10 +98,19 @@ static void dmub_psr_get_state(struct dmub_psr *dmub, enum dc_psr_state *state, ...@@ -96,10 +98,19 @@ static void dmub_psr_get_state(struct dmub_psr *dmub, enum dc_psr_state *state,
// Return invalid state when GPINT times out // Return invalid state when GPINT times out
*state = PSR_STATE_INVALID; *state = PSR_STATE_INVALID;
} while (++retry_count <= 1000 && *state == PSR_STATE_INVALID);
// Assert if max retry hit // Assert if max retry hit
if (retry_count >= 1000) if (retry_count >= 1000 && *state == PSR_STATE_INVALID) {
ASSERT(0); ASSERT(0);
} while (++retry_count <= 1000 && *state == PSR_STATE_INVALID); DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_ERROR,
WPP_BIT_FLAG_Firmware_PsrState,
"Unable to get PSR state from FW.");
} else
DC_TRACE_LEVEL_MESSAGE(DAL_TRACE_LEVEL_VERBOSE,
WPP_BIT_FLAG_Firmware_PsrState,
"Got PSR state from FW. PSR state: %d, Retry count: %d",
*state, retry_count);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment