mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 01:52:32 -04:00
drm/amd/display: Guard Freesync HDMI parsing with dc_lock
[Why] All calls into DC must be guarded by dc_lock because DC code is not safe against multi-thread or re-entry. [How] Hold dc_lock when calling DC interfaces to parse Freesync HDMI. Reviewed-by: Roman Li <Roman.Li@amd.com> Acked-by: Alan Liu <HaoPing.Liu@amd.com> Signed-off-by: Stylon Wang <stylon.wang@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
3a9c6f9a61
commit
53f4da731b
@@ -10213,11 +10213,15 @@ static bool parse_edid_cea(struct amdgpu_dm_connector *aconnector,
|
||||
struct amdgpu_hdmi_vsdb_info *vsdb_info)
|
||||
{
|
||||
struct amdgpu_device *adev = drm_to_adev(aconnector->base.dev);
|
||||
bool ret;
|
||||
|
||||
mutex_lock(&adev->dm.dc_lock);
|
||||
if (adev->dm.dmub_srv)
|
||||
return parse_edid_cea_dmub(&adev->dm, edid_ext, len, vsdb_info);
|
||||
ret = parse_edid_cea_dmub(&adev->dm, edid_ext, len, vsdb_info);
|
||||
else
|
||||
return parse_edid_cea_dmcu(&adev->dm, edid_ext, len, vsdb_info);
|
||||
ret = parse_edid_cea_dmcu(&adev->dm, edid_ext, len, vsdb_info);
|
||||
mutex_unlock(&adev->dm.dc_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector,
|
||||
|
||||
Reference in New Issue
Block a user