drm/amd/display: Enable PSR Residency for multiple panels
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / display / dc / core / dc_link.c
index 89dab6a..befce59 100644 (file)
@@ -2940,10 +2940,14 @@ void dc_link_get_psr_residency(const struct dc_link *link, uint32_t *residency)
 {
        struct dc  *dc = link->ctx->dc;
        struct dmub_psr *psr = dc->res_pool->psr;
+       unsigned int panel_inst;
+
+       if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
+               return;
 
-       // PSR residency measurements only supported on DMCUB
+       /* PSR residency measurements only supported on DMCUB */
        if (psr != NULL && link->psr_settings.psr_feature_enabled)
-               psr->funcs->psr_get_residency(psr, residency);
+               psr->funcs->psr_get_residency(psr, residency, panel_inst);
        else
                *residency = 0;
 }