drm/udl: Move drm_dev_{enter, exit}() into udl_get_edid_block()
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 10 May 2024 15:47:09 +0000 (17:47 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 13 May 2024 11:35:51 +0000 (13:35 +0200)
commitbf1754789386e2f3ffc06aa77818ff80fe27475f
tree04540a33819ffa647f349dcaec7833d4e2da2c6f
parent5aed213c7c6c4f5dcb1a3ef146f493f18fe703dc
drm/udl: Move drm_dev_{enter, exit}() into udl_get_edid_block()

Protect the code in udl_get_edid_block() with drm_dev_enter() and
drm_dev_exit(), so that all callers automatically invoke it. The
function uses hardware resources, which can be hot-unplugged at
any time. The other code in udl_connector_detect() does not use the
resources of the hardware device and therefore does not require
protection.

This change will allow to use udl_get_edid_block() in various
contexts easily.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240510154841.11370-3-tzimmermann@suse.de
drivers/gpu/drm/udl/udl_modeset.c