[Intel-gfx] [PATCH 30/31] drm/i915: Rely on TEST_SINK_START instead of tracking Sink CRC state on dev_priv.

Paulo Zanoni przanoni at gmail.com
Tue Nov 10 13:44:26 PST 2015


2015-11-05 16:50 GMT-02:00 Rodrigo Vivi <rodrigo.vivi at intel.com>:
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

Another patch I was going to request in the review of the previous ones.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c  | 14 ++++++--------
>  drivers/gpu/drm/i915/intel_drv.h |  5 -----
>  2 files changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 24d2bff..5e14f07 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3838,7 +3838,6 @@ static int intel_dp_sink_crc_stop(struct intel_dp *intel_dp)
>                 ret = -ETIMEDOUT;
>         }
>
> -       intel_dp->sink_crc.started = false;
>   out:
>         intel_ips_enable(intel_crtc);
>         return ret;
> @@ -3852,12 +3851,6 @@ static int intel_dp_sink_crc_start(struct intel_dp *intel_dp)
>         u8 buf;
>         int ret;
>
> -       if (intel_dp->sink_crc.started) {
> -               ret = intel_dp_sink_crc_stop(intel_dp);
> -               if (ret)
> -                       return ret;
> -       }
> -
>         if (drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK_MISC, &buf) < 0)
>                 return -EIO;
>
> @@ -3867,6 +3860,12 @@ static int intel_dp_sink_crc_start(struct intel_dp *intel_dp)
>         if (drm_dp_dpcd_readb(&intel_dp->aux, DP_TEST_SINK, &buf) < 0)
>                 return -EIO;
>
> +       if (buf & DP_TEST_SINK_START) {
> +               ret = intel_dp_sink_crc_stop(intel_dp);
> +               if (ret)
> +                       return ret;
> +       }
> +
>         intel_ips_disable(intel_crtc);
>
>         if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_TEST_SINK,
> @@ -3876,7 +3875,6 @@ static int intel_dp_sink_crc_start(struct intel_dp *intel_dp)
>         }
>
>         intel_wait_for_vblank(dev, intel_crtc->pipe);
> -       intel_dp->sink_crc.started = true;
>         return 0;
>  }
>
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index de2a8ff..c28f24a 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -744,10 +744,6 @@ enum link_m_n_set {
>         M2_N2
>  };
>
> -struct sink_crc {
> -       bool started;
> -};
> -
>  struct intel_dp {
>         uint32_t output_reg;
>         uint32_t aux_ch_ctl_reg;
> @@ -764,7 +760,6 @@ struct intel_dp {
>         /* sink rates as reported by DP_SUPPORTED_LINK_RATES */
>         uint8_t num_sink_rates;
>         int sink_rates[DP_MAX_SUPPORTED_RATES];
> -       struct sink_crc sink_crc;
>         struct drm_dp_aux aux;
>         uint8_t train_set[4];
>         int panel_power_up_delay;
> --
> 2.4.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Paulo Zanoni


More information about the Intel-gfx mailing list