drm/amdgpu: update connector num_modes
Subsystems (3)
PATCH 1/1 drm/amdgpu: update connector num_modes
In amdgpu_dm.c, amdgpu_dm_update_connector_after_detect calls drm_add_edid_modes, but it doesn't update the struct amdgpu_dm_connector's num_modes like other places that call drm_add_edid_modes do, so drm_display_modes allocated by drm_add_edid_modes will never get freed. This causes a memleak which was reported as https://bugzilla.kernel.org/show_bug.cgi?id=209987. It's severe enough that it caused my system to OOM and have to be rebooted several times.
The commit that causes this was backported to 5.9 and 5.4.
Fixes b24bdc37d03a ("drm/amd/display: Fix EDID parsing after resume from suspend")
Signed-off-by Lee Starnes <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
@@ -2281,7 +2281,7 @@ void amdgpu_dm_update_connector_after_detect(drm_connector_update_edid_property (connector, aconnector->edid); -drm_add_edid_modes (connector, aconnector->edid); + aconnector->num_modes =drm_add_edid_modes (connector, aconnector->edid);if (aconnector->dc_link->aux_mode) drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux,
Signature · 6 lines
2.29.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx