From 32e6a4a97677cb34490df4c3c558d9adda97bcfd Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Wed, 18 Mar 2015 10:07:21 +0100 Subject: [PATCH] EGLFS: Make Mali GPU backend more generic This provides both build and runtime fixes to make the Mali GPU backend able to be used in more places. The Mali backend was always trying to resize the frambuffer driver to twice the default height. In the case of the Mali T628 in the ODROID XU3 it is an error to set the virtual height of the framebuffer device to anything greater than the physical height. Change-Id: I25a64e411f44d2aeb1cb4376183d9ea547c10161 Reviewed-by: Laszlo Agocs --- .../eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro | 3 +++ .../deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro index dcfb4cd26d..33f219db96 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro @@ -6,6 +6,9 @@ load(qt_plugin) QT += core-private gui-private platformsupport-private eglfs_device_lib-private +# Avoid X11 header collision +DEFINES += MESA_EGL_NO_X11_HEADERS + INCLUDEPATH += $$PWD/../.. CONFIG += egl QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp index 6e5421d5b9..455d78035a 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/qeglfsmaliintegration.cpp @@ -66,7 +66,9 @@ void QEglFSMaliIntegration::platformInit() vinfo.green.offset = 8; vinfo.red.offset = 16; vinfo.transp.offset = 24; +#if 0 vinfo.yres_virtual = 2 * vinfo.yres; +#endif if (ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo) == -1) qErrnoWarning(errno, "Unable to set double buffer mode!"); @@ -90,7 +92,7 @@ EGLNativeWindowType QEglFSMaliIntegration::createNativeWindow(QPlatformWindow *w void QEglFSMaliIntegration::destroyNativeWindow(EGLNativeWindowType window) { - free(window); + free((void*)window); } QT_END_NAMESPACE