OSDN Git Service

drm/amd/display: Check for PSR in no memory request case
authorSamson Tam <Samson.Tam@amd.com>
Tue, 29 Nov 2022 23:12:33 +0000 (18:12 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Dec 2022 17:18:19 +0000 (12:18 -0500)
[Why]
When we have a PSR display, we will not be requesting data from memory anymore.
So we report back true for no memory request case.

[How]
Check for PSR by checking PSR version in link settings

Reviewed-by: Alvin Lee <Alvin.Lee2@amd.com>
Acked-by: Jasdeep Dhillon <jdhillon@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c

index b8767be..2f0ebe1 100644 (file)
@@ -188,7 +188,8 @@ static bool dcn32_check_no_memory_request_for_cab(struct dc *dc)
 
     /* First, check no-memory-request case */
        for (i = 0; i < dc->current_state->stream_count; i++) {
-               if (dc->current_state->stream_status[i].plane_count)
+               if ((dc->current_state->stream_status[i].plane_count) &&
+                       (dc->current_state->streams[i]->link->psr_settings.psr_version == DC_PSR_VERSION_UNSUPPORTED))
                        /* Fail eligibility on a visible stream */
                        break;
        }