Enable the DRM backend for Weston on QEMU-x86/x86-64 83/6683/3
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
Mon, 3 Oct 2016 12:18:52 +0000 (21:18 +0900)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Wed, 5 Oct 2016 08:42:37 +0000 (08:42 +0000)
The DRM backend is the native Weston backend for systems that
support the Linux kernel DRM, kernel mode setting(KMS), and evdev
input devices.

This patch set the DRM backend as default and also enable bochs
display vga interface for qemu std vga.

To use the DRM backend for Weston, the option "-vga std" should be
set into qemuparams for runqemu script, like below:

    qemuparams="-vga std"

Change-Id: I04591999a0a3f7205e42585150e8f50e7414f9ac
Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
meta-agl-bsp/recipes-graphics/mesa/mesa_11.%.bbappend
meta-agl-bsp/recipes-graphics/wayland/weston/weston-qemu-drm.ini [new file with mode: 0644]
meta-agl-bsp/recipes-graphics/wayland/weston_%.bbappend
meta-agl-bsp/recipes-kernel/linux/linux-yocto/drm.cfg [new file with mode: 0644]
meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend

index ff6b5bc..49e5277 100644 (file)
@@ -1,5 +1,6 @@
-# not sure if needed in mesa 11 - check.
-#PACKAGECONFIG_append_qemux86 = " gallium gallium-llvm"
-#PACKAGECONFIG_append_qemux86-64 = " gallium gallium-llvm"
+# The gallium-llvm is recommended as software 3D graphics renderer
+GALLIUM_LLVM = "gallium-llvm"
+PACKAGECONFIG_append_qemux86 = " gallium ${GALLIUM_LLVM}"
+PACKAGECONFIG_append_qemux86-64 = " gallium ${GALLIUM_LLVM}"
 
 DRIDRIVERS_append_intel-corei7-64 = ",i965"
diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston/weston-qemu-drm.ini b/meta-agl-bsp/recipes-graphics/wayland/weston/weston-qemu-drm.ini
new file mode 100644 (file)
index 0000000..e3f9536
--- /dev/null
@@ -0,0 +1,26 @@
+[core]
+shell=desktop-shell.so
+backend=drm-backend.so
+
+[shell]
+locking=true
+# Uncomment below to hide panel
+#panel-location=none
+
+[output]
+name=Virtual-1
+#mode=1920x1080
+#mode=1600x1200
+#mode=1680x1050
+#mode=1400x1050
+mode=1600x900
+#mode=1280x1024
+#mode=1440x900
+#mode=1280x960
+#mode=1360x768
+#mode=1280x800
+#mode=1280x768
+#mode=1280x720
+#mode=800x600
+#mode=848x480
+#mode=640x480
index 9aaea5f..74f9e59 100644 (file)
@@ -1,3 +1,19 @@
+FILESEXTRAPATHS_append := ":${THISDIR}/${PN}"
+
 RDEPENDS_${PN}_append_qemux86 = " mesa-megadriver"
 RDEPENDS_${PN}_append_qemux86-64 = " mesa-megadriver"
 RDEPENDS_${PN}_append_intel-corei7-64 = " mesa-megadriver"
+
+SRC_URI_append = "\
+    file://weston-qemu-drm.ini \
+    "
+
+do_install_append() {
+    WESTON_CONFIG_DIR=${sysconfdir}/xdg/weston
+    install -d ${D}${WESTON_CONFIG_DIR}
+    install -m 0644 ${WORKDIR}/weston-qemu-drm.ini ${D}${WESTON_CONFIG_DIR}/weston.ini
+}
+
+FILES_${PN} += " \
+    ${sysconfdir}/xdg/weston/weston.ini \
+    "
diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto/drm.cfg b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/drm.cfg
new file mode 100644 (file)
index 0000000..56f8dfa
--- /dev/null
@@ -0,0 +1 @@
+CONFIG_DRM_BOCHS=y
index 7f7fdf5..8b29aac 100644 (file)
@@ -4,6 +4,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
 SRC_URI += "file://fanotify.cfg \
             file://uinput.cfg \
             file://hid.cfg \
+            file://drm.cfg \
             "
 
 # disk drivers for vmdk