Commit 4704c573 authored by Rodrigo Vivi's avatar Rodrigo Vivi Committed by Daniel Vetter

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: default avatarVijay Purushothaman <vijay.a.purushothaman@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 3d7d6510
...@@ -1747,11 +1747,6 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp) ...@@ -1747,11 +1747,6 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp)
dev_priv->psr.source_ok = false; dev_priv->psr.source_ok = false;
if (!HAS_PSR(dev)) {
DRM_DEBUG_KMS("PSR not supported on this platform\n");
return false;
}
if ((intel_encoder->type != INTEL_OUTPUT_EDP) || if ((intel_encoder->type != INTEL_OUTPUT_EDP) ||
(dig_port->port != PORT_A)) { (dig_port->port != PORT_A)) {
DRM_DEBUG_KMS("HSW ties PSR to DDI A (eDP)\n"); 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) ...@@ -1824,6 +1819,11 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp)
{ {
struct drm_device *dev = intel_dp_to_dev(intel_dp); struct drm_device *dev = intel_dp_to_dev(intel_dp);
if (!HAS_PSR(dev)) {
DRM_DEBUG_KMS("PSR not supported on this platform\n");
return;
}
if (intel_edp_psr_match_conditions(intel_dp) && if (intel_edp_psr_match_conditions(intel_dp) &&
!intel_edp_is_psr_enabled(dev)) !intel_edp_is_psr_enabled(dev))
intel_edp_psr_do_enable(intel_dp); intel_edp_psr_do_enable(intel_dp);
...@@ -1851,6 +1851,9 @@ void intel_edp_psr_update(struct drm_device *dev) ...@@ -1851,6 +1851,9 @@ void intel_edp_psr_update(struct drm_device *dev)
struct intel_encoder *encoder; struct intel_encoder *encoder;
struct intel_dp *intel_dp = NULL; struct intel_dp *intel_dp = NULL;
if (!HAS_PSR(dev))
return;
list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head) list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head)
if (encoder->type == INTEL_OUTPUT_EDP) { if (encoder->type == INTEL_OUTPUT_EDP) {
intel_dp = enc_to_intel_dp(&encoder->base); intel_dp = enc_to_intel_dp(&encoder->base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment