Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Disable PSRSU when DSC enabled on the specific sink

[Why]
Some specific sink is not able to support PSRSU when DSC is turned on.
For this case, fall-back to use PSR1.

Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Solomon Chiu <solomon.chiu@amd.com>
Signed-off-by: Robin Chen <po-tchen@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Robin Chen and committed by
Alex Deucher
e2facd57 922e7ee3

+17 -16
+17 -16
drivers/gpu/drm/amd/display/modules/power/power_helpers.c
··· 794 794 */ 795 795 bool is_psr_su_specific_panel(struct dc_link *link) 796 796 { 797 - if (link->dpcd_caps.edp_rev >= DP_EDP_14) { 798 - if (link->dpcd_caps.psr_info.psr_version >= DP_PSR2_WITH_Y_COORD_ET_SUPPORTED) 799 - return true; 797 + bool isPSRSUSupported = false; 798 + struct dpcd_caps *dpcd_caps = &link->dpcd_caps; 799 + 800 + if (dpcd_caps->edp_rev >= DP_EDP_14) { 801 + if (dpcd_caps->psr_info.psr_version >= DP_PSR2_WITH_Y_COORD_ET_SUPPORTED) 802 + isPSRSUSupported = true; 800 803 /* 801 804 * Some panels will report PSR capabilities over additional DPCD bits. 802 805 * Such panels are approved despite reporting only PSR v3, as long as 803 806 * the additional bits are reported. 804 807 */ 805 - if (link->dpcd_caps.psr_info.psr_version < DP_PSR2_WITH_Y_COORD_IS_SUPPORTED) 806 - return false; 807 - 808 - if (link->dpcd_caps.sink_dev_id == DP_BRANCH_DEVICE_ID_001CF8) { 808 + if (dpcd_caps->sink_dev_id == DP_BRANCH_DEVICE_ID_001CF8) { 809 809 /* 810 - * FIXME: 811 810 * This is the temporary workaround to disable PSRSU when system turned on 812 - * DSC function on the sepcific sink. Once the PSRSU + DSC is fixed, this 813 - * condition should be removed. 811 + * DSC function on the sepcific sink. 814 812 */ 815 - if (link->dpcd_caps.dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT) 816 - return false; 817 - 818 - if (link->dpcd_caps.psr_info.force_psrsu_cap == 0x1) 819 - return true; 813 + if (dpcd_caps->psr_info.psr_version < DP_PSR2_WITH_Y_COORD_IS_SUPPORTED) 814 + isPSRSUSupported = false; 815 + else if (dpcd_caps->dsc_caps.dsc_basic_caps.fields.dsc_support.DSC_SUPPORT && 816 + ((dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x08) || 817 + (dpcd_caps->sink_dev_id_str[1] == 0x08 && dpcd_caps->sink_dev_id_str[0] == 0x07))) 818 + isPSRSUSupported = false; 819 + else if (dpcd_caps->psr_info.force_psrsu_cap == 0x1) 820 + isPSRSUSupported = true; 820 821 } 821 822 } 822 823 823 - return false; 824 + return isPSRSUSupported; 824 825 } 825 826 826 827 /**