From 884c2f9a33543fd928188f6df4597d0ddcf055a8 Mon Sep 17 00:00:00 2001 From: Tadao Tanikawa Date: Mon, 3 Oct 2016 21:18:52 +0900 Subject: Enable the DRM backend for Weston on QEMU-x86/x86-64 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 --- .../recipes-graphics/mesa/mesa_11.%.bbappend | 7 +++--- .../wayland/weston/weston-qemu-drm.ini | 26 ++++++++++++++++++++++ .../recipes-graphics/wayland/weston_%.bbappend | 16 +++++++++++++ .../recipes-kernel/linux/linux-yocto/drm.cfg | 1 + .../recipes-kernel/linux/linux-yocto_%.bbappend | 1 + 5 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 meta-agl-bsp/recipes-graphics/wayland/weston/weston-qemu-drm.ini create mode 100644 meta-agl-bsp/recipes-kernel/linux/linux-yocto/drm.cfg (limited to 'meta-agl-bsp') diff --git a/meta-agl-bsp/recipes-graphics/mesa/mesa_11.%.bbappend b/meta-agl-bsp/recipes-graphics/mesa/mesa_11.%.bbappend index ff6b5bc90..49e527707 100644 --- a/meta-agl-bsp/recipes-graphics/mesa/mesa_11.%.bbappend +++ b/meta-agl-bsp/recipes-graphics/mesa/mesa_11.%.bbappend @@ -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 index 000000000..e3f95369f --- /dev/null +++ b/meta-agl-bsp/recipes-graphics/wayland/weston/weston-qemu-drm.ini @@ -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 diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston_%.bbappend b/meta-agl-bsp/recipes-graphics/wayland/weston_%.bbappend index 9aaea5f69..74f9e59e4 100644 --- a/meta-agl-bsp/recipes-graphics/wayland/weston_%.bbappend +++ b/meta-agl-bsp/recipes-graphics/wayland/weston_%.bbappend @@ -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 index 000000000..56f8dfa89 --- /dev/null +++ b/meta-agl-bsp/recipes-kernel/linux/linux-yocto/drm.cfg @@ -0,0 +1 @@ +CONFIG_DRM_BOCHS=y diff --git a/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend b/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend index 7f7fdf5ff..8b29aacb0 100644 --- a/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend +++ b/meta-agl-bsp/recipes-kernel/linux/linux-yocto_%.bbappend @@ -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 -- cgit 1.2.3-korg