drm/amd/display: Emulate Display Hotplug Hang
[WHY] Driver reports 0 display when the virtual display is still present, and causes P-state hang in FW. [HOW] When enumerating through streams, check for active planes and use that to indicate number of displays. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Daniel Sa <Daniel.Sa@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -59,6 +59,7 @@ int clk_mgr_helper_get_active_display_cnt(
|
||||
display_count = 0;
|
||||
for (i = 0; i < context->stream_count; i++) {
|
||||
const struct dc_stream_state *stream = context->streams[i];
|
||||
const struct dc_stream_status *stream_status = &context->stream_status[i];
|
||||
|
||||
/* Don't count SubVP phantom pipes as part of active
|
||||
* display count
|
||||
@@ -66,13 +67,7 @@ int clk_mgr_helper_get_active_display_cnt(
|
||||
if (dc_state_get_stream_subvp_type(context, stream) == SUBVP_PHANTOM)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Only notify active stream or virtual stream.
|
||||
* Need to notify virtual stream to work around
|
||||
* headless case. HPD does not fire when system is in
|
||||
* S0i2.
|
||||
*/
|
||||
if (!stream->dpms_off || stream->signal == SIGNAL_TYPE_VIRTUAL)
|
||||
if (!stream->dpms_off || (stream_status && stream_status->plane_count))
|
||||
display_count++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user