Support additional gbm surface flags

Some vendor requires more gbm surface flags for specific purpose,
such as protected content.

Change-Id: Ie7db337e05f941b5480ffaccf61fbc94eb989ffc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Elvis Lee 2021-03-12 16:09:12 +09:00 committed by Tor Arne Vestbø
parent ae88dea1be
commit a77ca7c9c4
2 changed files with 4 additions and 2 deletions

View File

@ -170,7 +170,7 @@ gbm_surface *QEglFSKmsGbmScreen::createSurface(EGLConfig eglConfig)
rawGeometry().width(),
rawGeometry().height(),
native_format,
GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
gbmFlags());
if (m_gbm_surface)
m_output.drm_format = gbmFormatToDrmFormat(native_format);
}
@ -187,7 +187,7 @@ gbm_surface *QEglFSKmsGbmScreen::createSurface(EGLConfig eglConfig)
rawGeometry().width(),
rawGeometry().height(),
gbmFormat,
GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING);
gbmFlags());
}
}
return m_gbm_surface; // not owned, gets destroyed in QEglFSKmsGbmIntegration::destroyNativeWindow() via QEglFSKmsGbmWindow::invalidateSurface()

View File

@ -82,6 +82,8 @@ public:
virtual void flip();
virtual void updateFlipStatus();
virtual uint32_t gbmFlags() { return GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING; }
protected:
void flipFinished();
void ensureModeSet(uint32_t fb);