From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Maxime Ripard <mripard@kernel.org>,
Sasha Levin <sashal@kernel.org>,
alexander.deucher@amd.com, christian.koenig@amd.com,
Xinhui.Pan@amd.com, airlied@gmail.com, simona@ffwll.ch,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 6.6 08/17] drm/radeon: use eld_mutex to protect access to connector->eld
Date: Sun, 26 Jan 2025 09:56:03 -0500 [thread overview]
Message-ID: <20250126145612.937679-8-sashal@kernel.org> (raw)
In-Reply-To: <20250126145612.937679-1-sashal@kernel.org>
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[ Upstream commit b54c14f82428c8a602392d4cae1958a71a578132 ]
Reading access to connector->eld can happen at the same time the
drm_edid_to_eld() updates the data. Take the newly added eld_mutex in
order to protect connector->eld from concurrent access.
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241206-drm-connector-eld-mutex-v2-8-c9bce1ee8bea@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/radeon/radeon_audio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c
index fc22fe709b9c1..da37a827337bc 100644
--- a/drivers/gpu/drm/radeon/radeon_audio.c
+++ b/drivers/gpu/drm/radeon/radeon_audio.c
@@ -773,8 +773,10 @@ static int radeon_audio_component_get_eld(struct device *kdev, int port,
if (!dig->pin || dig->pin->id != port)
continue;
*enabled = true;
+ mutex_lock(&connector->eld_mutex);
ret = drm_eld_size(connector->eld);
memcpy(buf, connector->eld, min(max_bytes, ret));
+ mutex_unlock(&connector->eld_mutex);
break;
}
--
2.39.5
next prev parent reply other threads:[~2025-01-26 14:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-26 14:55 [PATCH AUTOSEL 6.6 01/17] drm/virtio: New fence for every plane update Sasha Levin
2025-01-26 14:55 ` [PATCH AUTOSEL 6.6 02/17] printk: Fix signed integer overflow when defining LOG_BUF_LEN_MAX Sasha Levin
2025-01-26 14:55 ` [PATCH AUTOSEL 6.6 03/17] drm/connector: add mutex to protect ELD from concurrent access Sasha Levin
2025-01-26 14:55 ` [PATCH AUTOSEL 6.6 04/17] drm/bridge: anx7625: use eld_mutex to protect access to connector->eld Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 05/17] drm/bridge: ite-it66121: " Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 06/17] drm/amd/display: " Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 07/17] drm/exynos: hdmi: " Sasha Levin
2025-01-26 14:56 ` Sasha Levin [this message]
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 09/17] drm/sti: " Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 10/17] drm/vc4: " Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 11/17] drm/amd/display: Fix Mode Cutoff in DSC Passthrough to DP2.1 Monitor Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 12/17] drm/bridge: it6505: Change definition MAX_HDCP_DOWN_STREAM_COUNT Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 13/17] drm/bridge: it6505: fix HDCP Bstatus check Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 14/17] drm/bridge: it6505: fix HDCP encryption when R0 ready Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 15/17] drm/bridge: it6505: fix HDCP CTS compare V matching Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 16/17] drm/bridge: it6505: fix HDCP CTS KSV list wait timer Sasha Levin
2025-01-26 14:56 ` [PATCH AUTOSEL 6.6 17/17] safesetid: check size of policy writes Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250126145612.937679-8-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox