Message ID | 20241201-drm-connector-eld-mutex-v1-0-ba56a6545c03@linaro.org (mailing list archive) |
---|---|
Headers | show |
Series | drm/connector: add eld_mutex to protect connector->eld | expand |
On Sun, 1 Dec 2024 01:55:17 +0200, Dmitry Baryshkov wrote: > 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. > > > [ ... ] Reviewed-by: Maxime Ripard <mripard@kernel.org> Thanks! Maxime
On Mon, Dec 02, 2024 at 10:19:41AM +0000, Maxime Ripard wrote: > On Sun, 1 Dec 2024 01:55:17 +0200, Dmitry Baryshkov wrote: > > 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. > > > > > > [ ... ] > > Reviewed-by: Maxime Ripard <mripard@kernel.org> Thanks! I'm going to post v2 to fix Jani's comment, but what should be the merge strategy? Merge patches 1-3, 5, 9-10 through drm-misc and the rest (AMD, i915, MSM, radeon) through the driver trees?
On Mon, Dec 02, 2024 at 01:03:07PM +0200, Dmitry Baryshkov wrote: > On Mon, Dec 02, 2024 at 10:19:41AM +0000, Maxime Ripard wrote: > > On Sun, 1 Dec 2024 01:55:17 +0200, Dmitry Baryshkov wrote: > > > 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. > > > > > > > > > [ ... ] > > > > Reviewed-by: Maxime Ripard <mripard@kernel.org> > > Thanks! > > I'm going to post v2 to fix Jani's comment, but what should be the merge > strategy? Merge patches 1-3, 5, 9-10 through drm-misc and the rest (AMD, > i915, MSM, radeon) through the driver trees? The easiest is probably to merge everything through drm-misc if everyone agrees. Maxime
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. The individual drivers were just compile tested. I propose to merge the drm_connector and bridge drivers through drm-misc, allowing other maintainers either to ack merging through drm-misc or merging the drm-misc into their tree and then picking up correcponding patch. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- Dmitry Baryshkov (10): drm/connector: add mutex to protect ELD from concurrent access drm/bridge: anx7625: use eld_mutex to protect access to connector->eld drm/bridge: ite-it66121: use eld_mutex to protect access to connector->eld drm/amd/display: use eld_mutex to protect access to connector->eld drm/exynos: hdmi: use eld_mutex to protect access to connector->eld drm/i915/audio: use eld_mutex to protect access to connector->eld drm/msm/dp: use eld_mutex to protect access to connector->eld drm/radeon: use eld_mutex to protect access to connector->eld drm/sti: hdmi: use eld_mutex to protect access to connector->eld drm/vc4: hdmi: use eld_mutex to protect access to connector->eld drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++ drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++ drivers/gpu/drm/bridge/ite-it66121.c | 2 ++ drivers/gpu/drm/drm_connector.c | 1 + drivers/gpu/drm/drm_edid.c | 4 ++++ drivers/gpu/drm/exynos/exynos_hdmi.c | 2 ++ drivers/gpu/drm/i915/display/intel_audio.c | 3 +++ drivers/gpu/drm/msm/dp/dp_audio.c | 2 ++ drivers/gpu/drm/radeon/radeon_audio.c | 2 ++ drivers/gpu/drm/sti/sti_hdmi.c | 2 ++ drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++-- include/drm/drm_connector.h | 5 ++++- 12 files changed, 28 insertions(+), 3 deletions(-) --- base-commit: 44cff6c5b0b17a78bc0b30372bcd816cf6dd282a change-id: 20241201-drm-connector-eld-mutex-8a39a35e9a38 Best regards,