backends/drm: guard against the main thread modifying m_commits
The code after sleeping relies on m_commits not being empty, but if the main thread modifies it, that might not be the case
The code after sleeping relies on m_commits not being empty, but if the main thread modifies it, that might not be the case