backends/drm: Fix 100% cpu usage after tty switch
The drm fd can get stuck in readable state, in which case the QSocketNotifier will fire the activated signal as often as it can leading to high cpu usage. We need to read() the drm fd in order to make the socket notifier stop firing QSocketNotifier::activated. This change removes the m_platform->isActive() check to ensure that drmHandleEvent() gets called, in general, it should be safe as we only notify the outputs about completed pageflips. BUG: 452726
This commit is contained in:
parent
2c874fc3e0
commit
1d8c9c62cf
1 changed files with 0 additions and 3 deletions
|
@ -562,9 +562,6 @@ void DrmGpu::pageFlipHandler(int fd, unsigned int sequence, unsigned int sec, un
|
||||||
|
|
||||||
void DrmGpu::dispatchEvents()
|
void DrmGpu::dispatchEvents()
|
||||||
{
|
{
|
||||||
if (!m_platform->isActive()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drmEventContext context = {};
|
drmEventContext context = {};
|
||||||
context.version = 3;
|
context.version = 3;
|
||||||
context.page_flip_handler2 = pageFlipHandler;
|
context.page_flip_handler2 = pageFlipHandler;
|
||||||
|
|
Loading…
Reference in a new issue