Re: [PATCH 07/17] drm: Nuke connector_list locking assert

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

 



On Thu, Dec 29, 2016 at 3:48 PM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote:
> I've forgotten to remove this when revamping the
> connector_list locking.
>
> Cc: seanpaul@xxxxxxxxxxxx

Reviewed-by: Sean Paul <seanpaul@xxxxxxxxxxxx>

> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> ---
>  include/drm/drm_connector.h |  6 +-----
>  include/drm/drm_crtc.h      | 14 --------------
>  2 files changed, 1 insertion(+), 19 deletions(-)
>
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index acb4241bff7d..d489cc003b7e 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -875,11 +875,7 @@ void drm_mode_put_tile_group(struct drm_device *dev,
>   * deprecated. Use drm_for_each_connector_iter() instead.
>   */
>  #define drm_for_each_connector(connector, dev) \
> -       for (assert_drm_connector_list_read_locked(&(dev)->mode_config),        \
> -            connector = list_first_entry(&(dev)->mode_config.connector_list,   \
> -                                         struct drm_connector, head);          \
> -            &connector->head != (&(dev)->mode_config.connector_list);          \
> -            connector = list_next_entry(connector, head))
> +       list_for_each_entry(connector, &(dev)->mode_config.connector_list, head)
>
>  /**
>   * struct drm_connector_list_iter - connector_list iterator
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index 0b9ec7245c7e..c0817fa205d4 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -835,18 +835,4 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
>  #define drm_for_each_crtc(crtc, dev) \
>         list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head)
>
> -static inline void
> -assert_drm_connector_list_read_locked(struct drm_mode_config *mode_config)
> -{
> -       /*
> -        * The connector hotadd/remove code currently grabs both locks when
> -        * updating lists. Hence readers need only hold either of them to be
> -        * safe and the check amounts to
> -        *
> -        * WARN_ON(not_holding(A) && not_holding(B)).
> -        */
> -       WARN_ON(!mutex_is_locked(&mode_config->mutex) &&
> -               !drm_modeset_is_locked(&mode_config->connection_mutex));
> -}
> -
>  #endif /* __DRM_CRTC_H__ */
> --
> 2.7.4
>



-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
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