On Wed, Aug 07, 2024 at 10:41:40AM +0200, Thomas Zimmermann wrote:
> The output_poll_changed hook in struct drm_mode_config_funcs is
> unused. Remove it. The helper drm_client_dev_hotplug() implements
> the callback's functionality.
> 
> Signed-off-by: Thomas Zimmermann <tzimmerm...@suse.de>

Reviewed-by: Daniel Vetter <daniel.vet...@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_probe_helper.c | 10 +---------
>  include/drm/drm_mode_config.h      | 16 ----------------
>  2 files changed, 1 insertion(+), 25 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_probe_helper.c 
> b/drivers/gpu/drm/drm_probe_helper.c
> index 285290067056..92f21764246f 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -714,7 +714,7 @@ EXPORT_SYMBOL(drm_helper_probe_single_connector_modes);
>   * @dev: drm_device whose connector state changed
>   *
>   * This function fires off the uevent for userspace and also calls the
> - * output_poll_changed function, which is most commonly used to inform the 
> fbdev
> + * client hotplug function, which is most commonly used to inform the fbdev
>   * emulation code and allow it to update the fbcon output configuration.
>   *
>   * Drivers should call this from their hotplug handling code when a change is
> @@ -730,11 +730,7 @@ EXPORT_SYMBOL(drm_helper_probe_single_connector_modes);
>   */
>  void drm_kms_helper_hotplug_event(struct drm_device *dev)
>  {
> -     /* send a uevent + call fbdev */
>       drm_sysfs_hotplug_event(dev);
> -     if (dev->mode_config.funcs->output_poll_changed)
> -             dev->mode_config.funcs->output_poll_changed(dev);
> -
>       drm_client_dev_hotplug(dev);
>  }
>  EXPORT_SYMBOL(drm_kms_helper_hotplug_event);
> @@ -750,11 +746,7 @@ void drm_kms_helper_connector_hotplug_event(struct 
> drm_connector *connector)
>  {
>       struct drm_device *dev = connector->dev;
>  
> -     /* send a uevent + call fbdev */
>       drm_sysfs_connector_hotplug_event(connector);
> -     if (dev->mode_config.funcs->output_poll_changed)
> -             dev->mode_config.funcs->output_poll_changed(dev);
> -
>       drm_client_dev_hotplug(dev);
>  }
>  EXPORT_SYMBOL(drm_kms_helper_connector_hotplug_event);
> diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
> index ab0f167474b1..271765e2e9f2 100644
> --- a/include/drm/drm_mode_config.h
> +++ b/include/drm/drm_mode_config.h
> @@ -97,22 +97,6 @@ struct drm_mode_config_funcs {
>        */
>       const struct drm_format_info *(*get_format_info)(const struct 
> drm_mode_fb_cmd2 *mode_cmd);
>  
> -     /**
> -      * @output_poll_changed:
> -      *
> -      * Callback used by helpers to inform the driver of output configuration
> -      * changes.
> -      *
> -      * Drivers implementing fbdev emulation use 
> drm_kms_helper_hotplug_event()
> -      * to call this hook to inform the fbdev helper of output changes.
> -      *
> -      * This hook is deprecated, drivers should instead implement fbdev
> -      * support with struct drm_client, which takes care of any necessary
> -      * hotplug event forwarding already without further involvement by
> -      * the driver.
> -      */
> -     void (*output_poll_changed)(struct drm_device *dev);
> -
>       /**
>        * @mode_valid:
>        *
> -- 
> 2.46.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Reply via email to