Skip to content

Commit 4704c57

Browse files
rodrigovividanvet
authored andcommitted
drm/i915: Use HAS_PSR to avoid unecessary interactions.
Let's be more conservative and protect platforms that don't support PSR from unecessary interactions. Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 3d7d651 commit 4704c57

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

drivers/gpu/drm/i915/intel_dp.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,11 +1747,6 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp)
17471747

17481748
dev_priv->psr.source_ok = false;
17491749

1750-
if (!HAS_PSR(dev)) {
1751-
DRM_DEBUG_KMS("PSR not supported on this platform\n");
1752-
return false;
1753-
}
1754-
17551750
if ((intel_encoder->type != INTEL_OUTPUT_EDP) ||
17561751
(dig_port->port != PORT_A)) {
17571752
DRM_DEBUG_KMS("HSW ties PSR to DDI A (eDP)\n");
@@ -1824,6 +1819,11 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp)
18241819
{
18251820
struct drm_device *dev = intel_dp_to_dev(intel_dp);
18261821

1822+
if (!HAS_PSR(dev)) {
1823+
DRM_DEBUG_KMS("PSR not supported on this platform\n");
1824+
return;
1825+
}
1826+
18271827
if (intel_edp_psr_match_conditions(intel_dp) &&
18281828
!intel_edp_is_psr_enabled(dev))
18291829
intel_edp_psr_do_enable(intel_dp);
@@ -1851,6 +1851,9 @@ void intel_edp_psr_update(struct drm_device *dev)
18511851
struct intel_encoder *encoder;
18521852
struct intel_dp *intel_dp = NULL;
18531853

1854+
if (!HAS_PSR(dev))
1855+
return;
1856+
18541857
list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head)
18551858
if (encoder->type == INTEL_OUTPUT_EDP) {
18561859
intel_dp = enc_to_intel_dp(&encoder->base);

0 commit comments

Comments
 (0)