Re: [PATCH 8/9] drm/i915/dp: Protect link training with connection mutex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 12, 2017 at 4:57 PM, Dhinakaran Pandiyan
<dhinakaran.pandiyan@xxxxxxxxx> wrote:
> The other instances of link training are protected with
> connection_mutex, so do the same in check_mst_status() too.

We don't seem to be taking connection_mutex around
intel_dp_start/stop_link_train in the intel_enable_dp or
intel_ddi_pre_enable_dp paths (unless it's taken higher in the stack)
- is it needed in all instances?

>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index aab9ba31f79e..644463ba313e 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4191,6 +4191,7 @@ static void intel_dp_handle_test_request(struct intel_dp *intel_dp)
>  static int
>  intel_dp_check_mst_status(struct intel_dp *intel_dp)
>  {
> +       struct drm_device *dev = intel_dp_to_dev(intel_dp);
>         bool bret;
>         u8 esi[DP_DPRX_ESI_LEN] = { 0 };
>         int ret = 0;
> @@ -4205,8 +4206,11 @@ intel_dp_check_mst_status(struct intel_dp *intel_dp)
>                 if (intel_dp->active_mst_links &&
>                     !drm_dp_channel_eq_ok(&esi[10], intel_dp->lane_count)) {
>                         DRM_DEBUG_KMS("channel EQ not ok, retraining\n");
> +
> +                       drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
>                         intel_dp_start_link_train(intel_dp);
>                         intel_dp_stop_link_train(intel_dp);
> +                       drm_modeset_unlock(&dev->mode_config.connection_mutex);
>                 }
>
>                 DRM_DEBUG_KMS("got esi %3ph\n", esi);
> --
> 2.11.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 


James Ausmus
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux