[Intel-gfx] [PATCH 03/11] drm/i915: Use HAS_PSR to avoid unecessary interactions.
Vijay Purushothaman
vijay.a.purushothaman at intel.com
Tue Jun 3 11:26:14 CEST 2014
On 5/16/2014 5:43 AM, Rodrigo Vivi wrote:
> Let's be more conservative and protect platforms that don't
> support PSR from unecessary interactions.
>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at gmail.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 34e8f7a..58537b7 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1739,11 +1739,6 @@ static bool intel_edp_psr_match_conditions(struct intel_dp *intel_dp)
>
> 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) ||
> (dig_port->port != PORT_A)) {
> DRM_DEBUG_KMS("HSW ties PSR to DDI A (eDP)\n");
> @@ -1816,6 +1811,11 @@ void intel_edp_psr_enable(struct intel_dp *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) &&
> !intel_edp_is_psr_enabled(dev))
> intel_edp_psr_do_enable(intel_dp);
> @@ -1843,6 +1843,9 @@ void intel_edp_psr_update(struct drm_device *dev)
> struct intel_encoder *encoder;
> struct intel_dp *intel_dp = NULL;
>
> + if (!HAS_PSR(dev))
> + return;
> +
> list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head)
> if (encoder->type == INTEL_OUTPUT_EDP) {
> intel_dp = enc_to_intel_dp(&encoder->base);
>
Reviewed-by: Vijay Purushothaman <vijay.a.purushothaman at intel.com>
More information about the Intel-gfx
mailing list