drm/probe-helper: Do not fail from drmm_kms_helper_poll_init()

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@suse.de>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250303145604.62962-4-tzimmermann@suse.de
pull/1112/head
Thomas Zimmermann 2025-03-03 15:52:58 +01:00
parent 695a7f1c11
commit f878af62c0
3 changed files with 8 additions and 10 deletions

View File

@ -1035,10 +1035,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;
}

View File

@ -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);

View File

@ -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);