drm/i915/display: Remove some redundancy around CAN_PSR()

If source_support is set the platform supports PSR so no need to check
it again at every CAN_PSR().

Also removing the intel_dp_is_edp() calls, if sink_support is set
the sink connected is for sure a eDP panel.

Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209181439.215104-3-jose.souza@intel.com
This commit is contained in:
José Roberto de Souza
2021-02-09 10:14:38 -08:00
parent 774ab4ff15
commit 3816139c8a
3 changed files with 5 additions and 6 deletions

View File

@@ -1964,7 +1964,7 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp)
DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR |
DP_PSR_LINK_CRC_ERROR;
if (!CAN_PSR(intel_dp) || !intel_dp_is_edp(intel_dp))
if (!CAN_PSR(intel_dp))
return;
mutex_lock(&psr->lock);
@@ -2014,7 +2014,7 @@ bool intel_psr_enabled(struct intel_dp *intel_dp)
{
bool ret;
if (!CAN_PSR(intel_dp) || !intel_dp_is_edp(intel_dp))
if (!CAN_PSR(intel_dp))
return false;
mutex_lock(&intel_dp->psr.lock);