Re: [PATCH 3/3] drm/probe-helper: Do not fail from drmm_kms_helper_poll_init()

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

 



On Mon, Mar 3, 2025 at 4:24 PM Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
>
> Failing to set up connector polling is not significant enough to
> fail device probing. Print a warning and return nothing from the
> init helper.
>
> This only affects the managed init function. The unmanaged init
> already never fails with an error.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>

Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@xxxxxxxxx>

> ---
>  drivers/gpu/drm/ast/ast_mode.c     |  5 +----
>  drivers/gpu/drm/drm_probe_helper.c | 11 ++++++-----
>  include/drm/drm_probe_helper.h     |  2 +-
>  3 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
> index c3b950675485..4f2543730b97 100644
> --- a/drivers/gpu/drm/ast/ast_mode.c
> +++ b/drivers/gpu/drm/ast/ast_mode.c
> @@ -1018,10 +1018,7 @@ int ast_mode_config_init(struct ast_device *ast)
>                 return ret;
>
>         drm_mode_config_reset(dev);
> -
> -       ret = drmm_kms_helper_poll_init(dev);
> -       if (ret)
> -               return ret;
> +       drmm_kms_helper_poll_init(dev);
>
>         return 0;
>  }
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index 7ba16323e7c2..6b3541159c0f 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -958,15 +958,16 @@ static void drm_kms_helper_poll_init_release(struct drm_device *dev, void *res)
>   * cleaned up when the DRM device goes away.
>   *
>   * See drm_kms_helper_poll_init() for more information.
> - *
> - * Returns:
> - * 0 on success, or a negative errno code otherwise.
>   */
> -int drmm_kms_helper_poll_init(struct drm_device *dev)
> +void drmm_kms_helper_poll_init(struct drm_device *dev)
>  {
> +       int ret;
> +
>         drm_kms_helper_poll_init(dev);
>
> -       return drmm_add_action_or_reset(dev, drm_kms_helper_poll_init_release, dev);
> +       ret = drmm_add_action_or_reset(dev, drm_kms_helper_poll_init_release, dev);
> +       if (ret)
> +               drm_warn(dev, "Connector status will not be updated, error %d\n", ret);
>  }
>  EXPORT_SYMBOL(drmm_kms_helper_poll_init);
>
> diff --git a/include/drm/drm_probe_helper.h b/include/drm/drm_probe_helper.h
> index d6ce7b218b77..840ae5f798c2 100644
> --- a/include/drm/drm_probe_helper.h
> +++ b/include/drm/drm_probe_helper.h
> @@ -17,7 +17,7 @@ int drm_helper_probe_detect(struct drm_connector *connector,
>                             struct drm_modeset_acquire_ctx *ctx,
>                             bool force);
>
> -int drmm_kms_helper_poll_init(struct drm_device *dev);
> +void drmm_kms_helper_poll_init(struct drm_device *dev);
>  void drm_kms_helper_poll_init(struct drm_device *dev);
>  void drm_kms_helper_poll_fini(struct drm_device *dev);
>  bool drm_helper_hpd_irq_event(struct drm_device *dev);
> --
> 2.48.1
>




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux