drm/connector: add mutex to protect ELD from concurrent access
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 6 Dec 2024 09:43:04 +0000 (11:43 +0200)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 16 Dec 2024 16:02:07 +0000 (18:02 +0200)
commitdf7c8e3dde37a9d81c0613285b43600f3cc70f34
treee63d1ec341d80bd6f76a492525b10dae68e5c747
parent67a615c5cb6dc33ed35492dc0d67e496cbe8de68
drm/connector: add mutex to protect ELD from concurrent access

The connector->eld is accessed by the .get_eld() callback. This access
can collide with the drm_edid_to_eld() updating the data at the same
time. Add drm_connector.eld_mutex to protect the data from concurrenct
access. Individual drivers are not updated (to reduce possible issues
while applying the patch), maintainers are to find a best suitable way
to lock that mutex while accessing the ELD data.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-1-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/drm_connector.c
drivers/gpu/drm/drm_edid.c
include/drm/drm_connector.h