public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Harry Wentland <harry.wentland@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>, "Leo Li" <sunpeng.li@amd.com>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Xinhui Pan" <Xinhui.Pan@amd.com>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Robert Foss" <rfoss@kernel.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Phong LE" <ple@baylibre.com>, "Inki Dae" <inki.dae@samsung.com>,
	"Seung-Woo Kim" <sw0312.kim@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Alim Akhtar" <alim.akhtar@samsung.com>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>,
	"Rob Clark" <robdclark@gmail.com>,
	"Abhinav Kumar" <quic_abhinavk@quicinc.com>,
	"Sean Paul" <sean@poorly.run>,
	"Marijn Suijten" <marijn.suijten@somainline.org>,
	"Alain Volmat" <alain.volmat@foss.st.com>,
	"Raphael Gallais-Pou" <rgallaispou@gmail.com>,
	"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
	"Maíra Canal" <mcanal@igalia.com>,
	"Raspberry Pi Kernel Maintenance" <kernel-list@raspberrypi.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	amd-gfx@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH v2 04/10] drm/amd/display: use eld_mutex to protect access to connector->eld
Date: Mon, 16 Dec 2024 14:38:54 -0500	[thread overview]
Message-ID: <ab347745-80cc-4a5c-ab92-de6bc6bce3cc@amd.com> (raw)
In-Reply-To: <CADnq5_M8jC2w=XWB4BG+id60zfGFMMkSegmeg-y=VpSHC+FvFQ@mail.gmail.com>



On 2024-12-16 10:31, Alex Deucher wrote:
> On Mon, Dec 16, 2024 at 10:12 AM Dmitry Baryshkov
> <dmitry.baryshkov@linaro.org> wrote:
>>
>> On Mon, 16 Dec 2024 at 16:53, Harry Wentland <harry.wentland@amd.com> wrote:
>>>
>>>
>>>
>>> On 2024-12-10 16:20, Dmitry Baryshkov wrote:
>>>> On Fri, Dec 06, 2024 at 11:43:07AM +0200, Dmitry Baryshkov wrote:
>>>>> 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>
>>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>>>> ---
>>>>>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 ++
>>>>>  1 file changed, 2 insertions(+)
>>>>
>>>> Harry, Leo, Rodrigo, Alex, Christian, Xinhui, any response to this one
>>>> and to the radeon patches? I'd like to be able to pick the series for
>>>> drm-misc and these two are not reviewed by you.
>>>>
>>>>>
>>>>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>>>> index 19a58630e774029767bf2a27eb4ddf17e3c21129..04c68c320252b5ce9647f0606fb86fe57f347639 100644
>>>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>>>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>>>> @@ -1037,8 +1037,10 @@ static int amdgpu_dm_audio_component_get_eld(struct device *kdev, int 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);
>>>
>>> All of this is wrapped by the adev->dm.audio_lock mutex. It might
>>> be safer to modify the audio_lock mutex so it only guards the
>>> aconnector->audio_inst access.
>>>
>>> But I don't see any way these mutexes would otherwise interact,
>>> so this change should be good as-is.
>>>
>>> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
>>
>> Would you ack it to merge it through drm-misc? Or would you prefer to
>> pick up those two patches after merging drm-misc-next once the rest of
>> the series lands?
> 
> Merging through drm-misc is fine with me.
> 

Same.

Harry

> Thanks,
> 
> Alex
> 
>>
>>>
>>> Harry
>>>
>>>>>
>>>>>              break;
>>>>>      }
>>>>>
>>>>> --
>>>>> 2.39.5
>>>>>
>>>>
>>>
>>
>>
>> --
>> With best wishes
>> Dmitry


  parent reply	other threads:[~2024-12-16 19:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06  9:43 [PATCH v2 00/10] drm/connector: add eld_mutex to protect connector->eld Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 01/10] drm/connector: add mutex to protect ELD from concurrent access Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 02/10] drm/bridge: anx7625: use eld_mutex to protect access to connector->eld Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 03/10] drm/bridge: ite-it66121: " Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 04/10] drm/amd/display: " Dmitry Baryshkov
2024-12-10 21:20   ` Dmitry Baryshkov
2024-12-16 14:53     ` Harry Wentland
2024-12-16 15:12       ` Dmitry Baryshkov
2024-12-16 15:31         ` Alex Deucher
2024-12-16 15:39           ` Dmitry Baryshkov
2024-12-16 19:38           ` Harry Wentland [this message]
2024-12-06  9:43 ` [PATCH v2 05/10] drm/exynos: hdmi: " Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 06/10] drm/i915/audio: " Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 07/10] drm/msm/dp: " Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 08/10] drm/radeon: " Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 09/10] drm/sti: hdmi: " Dmitry Baryshkov
2024-12-06  9:43 ` [PATCH v2 10/10] drm/vc4: " Dmitry Baryshkov
2024-12-16 11:24 ` [PATCH v2 00/10] drm/connector: add eld_mutex to protect connector->eld Dmitry Baryshkov
2024-12-16 15:24   ` Maxime Ripard
2024-12-16 16:08 ` Dmitry Baryshkov

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=ab347745-80cc-4a5c-ab92-de6bc6bce3cc@amd.com \
    --to=harry.wentland@amd.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alain.volmat@foss.st.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=andrzej.hajda@intel.com \
    --cc=christian.koenig@amd.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kernel-list@raspberrypi.com \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=mcanal@igalia.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=ple@baylibre.com \
    --cc=quic_abhinavk@quicinc.com \
    --cc=rfoss@kernel.org \
    --cc=rgallaispou@gmail.com \
    --cc=robdclark@gmail.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=sunpeng.li@amd.com \
    --cc=sw0312.kim@samsung.com \
    --cc=tursulin@ursulin.net \
    --cc=tzimmermann@suse.de \
    /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