[vlc-commits] [Git][videolan/vlc][master] drm: planes: fix updating count for GETPLANERESOURCES
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sun Aug 9 08:15:25 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
cfcfc0d0 by Alexandre Janniaux at 2026-08-09T08:05:10+00:00
drm: planes: fix updating count for GETPLANERESOURCES
vlc_drm_get_planes() pre-allocate 32 planes and call the ioctl
DRM_IOCTL_MODE_GETPLANERESOURCES to fill the array. If the returned
plane resources report more planes than the count=32 provided, it
doesn't return and re-run the loop to re-allocate.
In that second scenario, changing the count was forgotten in previous
commits and it now loops forever if the plane resources reports strictly
more than 32.
Since Raspberry Pi 4 reports 60 planes, the problem was reproducible
easily there.
- - - - -
1 changed file:
- modules/video_output/drm/planes.c
Changes:
=====================================
modules/video_output/drm/planes.c
=====================================
@@ -4,6 +4,7 @@
*/
/*****************************************************************************
* Copyright © 2022 Rémi Denis-Courmont
+ * Copyright © 2026 Alexandre Janniaux <ajanni at videolabs.io>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
@@ -163,6 +164,9 @@ static ssize_t vlc_drm_get_planes(int fd, uint32_t **restrict listp)
*listp = planes;
return res.count_planes;
}
+
+ /* Re-allocate the correct number of plane this time. */
+ count = res.count_planes;
free(planes);
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cfcfc0d0d3fb07dff72acf09cd6dbe33b47dc323
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/cfcfc0d0d3fb07dff72acf09cd6dbe33b47dc323
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list