drm/amd/display: Check if link state is valid
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tue, 18 Oct 2022 12:28:15 +0000 (08:28 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 24 Oct 2022 18:34:27 +0000 (14:34 -0400)
The link state is set to false if there is no link and local sink. Even
though the stream state may not change, it is desirable to commit the
new stream when HPD goes low to high.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Co-developed-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 997ab031f816da0186ce3cf32fb21f0c33ac2cc4..7b576bd24cb579947b06ff1a0ce8aaf42cf4497c 100644 (file)
@@ -1500,6 +1500,8 @@ static bool context_changed(
        for (i = 0; i < dc->current_state->stream_count; i++) {
                if (dc->current_state->streams[i] != context->streams[i])
                        return true;
+               if (!context->streams[i]->link->link_state_valid)
+                       return true;
        }
 
        return false;