Newest version of duplicated property removed by drmModeAtomicCommit()
Hi,
Libdrm 2.4.101 on Buildroot.
Consider the following pseudo-code:
drmModeAtomicReqPtr req = drmModeAtomicAlloc();
drmModeAtomicAddProperty(req, 31, 17, 39); // Set FB_ID=39 to plane 31
...
drmModeAtomicAddProperty(req, 31, 17, 40); // Set FB_ID=40 to plane 31
drmModeAtomicCommit(drm_fd, req, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
drmModeAtomicCommit
will see that FB_ID
is duplicated, and remove one instance of the property, which is expected. However, it does not seem to always remove the oldest instance of the property, and will sometimes remove the newest one.
On my setup, the drmModeAtomicReqPtr of the first frame is cached, then duplicated with drmModeAtomicDuplicate(). On the duplicata the "FB_ID" property is updated and drmModeAtomicCommit() is called, but because of the aforementioned bug, the kernel will always see the initial value of the FB_ID property.