Accelerate graphics performance with ozone-gbm �on Intel based Linux systems
BlinkOn9(bit.ly/blinkon9-info) Apr 18-19, 2018
Joone Hur(joone.hur@intel.com, joone@chromium.org)
Intel Open Source Technology Center
Intel Confidential — Do Not Forward
Agenda
2
Intel Confidential — Do Not Forward
Overview
3
Intel Confidential — Do Not Forward
New graphics architecture in CrOS (2015)
4
Xlib
DRM/KMS
i915 device driver
Aura
View
ChromeOS UI
Ozone-gbm
DRM/KMS
i915 device driver
Aura
View
ChromeOS UI
X-Server
Intel Confidential — Do Not Forward
Ozone
5
ozone
Aura/View
Chrome/Content
ozone implementations
(X11, Wayland, GBM)
X11
Wayland
DRM/KMS
Intel Confidential — Do Not Forward
Ozone-gbm
6
Chromium
Linux Kernel
events
DRM/KMS
GEM
MESA
mini-gbm
GpuMemoryBuffer
ozone-gbm
evdev
i915 Driver
Intel GPU
libdrm
Intel Confidential — Do Not Forward
History
7
Intel Confidential — Do Not Forward
History
8
Intel Confidential — Do Not Forward
Why ozone-gbm for Linux systems?
9
Intel Confidential — Do Not Forward
Why ozone-gbm on Intel GPU?
10
ARC++ is the Android app runtime for ChromeOS
Google Pixel (7th i5m $999)
Samsung Chromebook Pro (Core M, $509)
ASUS C202SA�(Celeron, $218)
HP Chromebook 14 �(Celeron, $219)
Intel Confidential — Do Not Forward
Intel graphics features for Chromium
11
ARC++ is the Android app runtime for ChromeOS
Intel Confidential — Do Not Forward
Intel graphics features: zero-copy texture upload
12
Intel Confidential — Do Not Forward
Workload test (zero-copy texture upload)
13
Test page | software fallback | zero-copy texture upload | |
5.3 fps | 22.3 fps | 4.2X faster | |
12.2 fps | 48.2 fps | 3.95X faster |
Intel Compute stick X5-Z8300 (Cherry-trail, Gen8 graphics, GPU RAM 512MB)
Disclaimer: Estimate only. Not an official benchmark results.
Intel Confidential — Do Not Forward
Memory consumption(zero-copy texture upload)
14
Test page | software fallback | zero-copy texture upload | |
80 MB | 48 MB | 40% lower |
Intel Compute stick X5-Z8300 (Cherry-trail, Gen8 graphics, GPU RAM 512MB)
Disclaimer: Estimate only. Not an official benchmark results.
Intel Confidential — Do Not Forward
Intel graphics features: video/image accelerations
15
Braswell / Cherry Trail(Atom, Gen8) | Apollo Lake (Atom, Gen9) | Coffee Lake(8th) (Gen9.5) | ||
H.264 | Yes | Yes | Yes | Yes |
Decode only | Decode only | Decode only | Decode only | |
JPEG | Yes | Yes | Yes | Yes |
VP8 | Yes | Yes | Yes | Yes |
Decode only | Yes | Yes | Yes | |
HEVC 10-bit | No | No | Decode only (8K) | Yes |
VP9 | No | No | Decode only (4K) |
Intel Confidential — Do Not Forward
Workload test: video decoding, Intel Compute stick(Atom)
16
test page | software fallback | hardware accelerated (video decoding, zero-copy texture upload) | |
H.264 video 2K (vimeo video) | 13.6 fps | 24 fps | 1.7x higher |
H.264 video 4K (vimeo video) | 5.7 fps | 20.7 fps | 3.6x higher |
VP9 1K (Youtube) | 30 fps | 30 fps | |
VP9 2K (Youtube) | video keeps pausing | 25 fps, slightly pausing | |
* Intel Compute stick X5-Z8300 (Cherry-trail, Gen8 graphics, GPU RAM 512MB)
* VP9 uses software decoding
Disclaimer: Estimate only. Not an official benchmark results.
Intel Confidential — Do Not Forward
Workload test: video decoding, Skylake(Core 6th gen)
17
test page | software fallback | hardware accelerated (video decoding, zero-copy texture upload) | |
H.264 video 2K (vimeo video) | 25 fps | 39.2 fps | 1.5 x higher |
H.264 video 4K (vimeo video) | 24 ps | 27.3 fps | 1.1 x higher |
VP9 1K (Youtube) | 58.4 fps | 58.4 fps | |
VP9 2K (Youtube) | 23.8 fps, frequently pausing | 42.6 fps, slightly pausing | 1.7 X |
* Intel Compute stick STK2m364CC (Skylake, Gen9 graphics, GPU RAM 512MB)
* VP9 uses software decoding
Disclaimer: Estimate only. Not an official benchmark results.
Intel Confidential — Do Not Forward
Workload test: video decoding, Kaby Lake(Core 7th gen),
18
test page | software fallback | hardware accelerated |
VP9 4K 60fps (Youtube) | video keeps pausing | 50 fps |
VP9 2K 60fps (Youtube) | 60 fps(14.9 MB) | 60 fps (4.5 MB) |
Intel Kaby Lake i7 NUC NUC7i7BNH (Gen9 graphics, GPU RAM 512MB)
Disclaimer: Estimate only. Not an official benchmark results.
Intel Confidential — Do Not Forward
Intel graphics features: hardware overlay
Display controller can scale and composite overlay planes.
19
Source: pictures from this doc.�
Intel Confidential — Do Not Forward
Legacy: GPU Composition
20
Video Layer
Web contents
Browser UI
Primary plane
Render Target
Open GL GPU Composition
RGBA / R
RGBA / R
RGBA / R
RGBA / R
RGBA / W
Picture by Dongseong Hwang
Intel Confidential — Do Not Forward
Brand-new: Hardware Overlay
21
Video Layer
Web contents
Browser UI
Primary plane
Render Target
Open GL GPU Composition
RGBA / R
RGBA / R
RGBA / R
RGBA / R
Overlay Plane
RGBA / W
Picture by Dongseong Hwang
Intel Confidential — Do Not Forward
Hardware overlay support in CrOS
22
Intel Confidential — Do Not Forward
Benefits of Ozone-gbm
23
For more details, see https://software.intel.com/en-us/articles/zero-copy-texture-uploads-in-chrome-os
Intel Confidential — Do Not Forward
Upstream : Allow to run ozone_demo on a Linux/Intel desktop (Landed)
24
For more details, see https://chromium-review.googlesource.com/886836
commit 63612d32bdf79162b3aadf5b80ee61e36624fd14
Author: Joone Hur <joone.hur@intel.com>
Date: Fri Feb 2 22:09:35 2018 +0000
Allow to run ozone_demo on a Linux/Intel desktop
First, we need to enable Intel driver by building
Mesa 17.0.2 with --with-egl-platform=surfaceless
--with-dri-drivers=i965
BUG=733450
TEST=ozone_demo
$ cd ~/git/chromium/src
$ gn gen out/Release "--args=use_ozone=true ozone_platform_gbm=true
use_intel_minigbm=true"
$ ninja -C out/Release ozone_demo
$ export EGL_PLATFORM=surfaceless
$ out/Release/ozone_demo
Change-Id: Ic560b2b4f36701f3c159fd35e771d04c2e1ec97e
Reviewed-on: https://chromium-review.googlesource.com/886836
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
Commit-Queue: Joone Hur <joone.hur@intel.com>
Cr-Commit-Position: refs/heads/master@{#534168}
Intel Confidential — Do Not Forward
Upstream : Separate display configurator from CrOS build (Landed o/)
25
For more details, see https://chromium-review.googlesource.com/c/chromium/src/+/969416
commit d3ae8737f7186154d2fdc3ccc5fe43bf290f91b5
Author: Joone Hur <joone.hur@intel.com>
Date: Tue Apr 17 18:05:09 2018 +0000
Separate display configurator from CrOS build
This CL moves all files in ui/display/manager/chromeos to
ui/display/manager and adds build_display_configuration GN arg
so that the display configurator could be used in Linux
desktop.
BUG=733450
Change-Id: Idd790cfe6f9e5daf6ccad23353573028ebe5d7ee
Reviewed-on: https://chromium-review.googlesource.com/969416
Reviewed-by: Yusuke Sato <yusukes@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: Malay Keshav <malaykeshav@chromium.org>
Commit-Queue: Joone Hur <joone.hur@intel.com>
Cr-Commit-Position: refs/heads/master@{#551390}
Intel Confidential — Do Not Forward
Upstream : [WIP] Make mus_demo work on a desktop Linux
26
For more details, see https://chromium-review.googlesource.com/c/chromium/src/+/1015224
[WIP] Make mus_demo work on a desktop Linux
BUG=733450
TEST=mash --service=mus_demo --enable-features=Mash
$ cd ~/git/chromium/src
$ gn gen out/Release "--args=use_ozone=true ozone_platform_gbm=true use_intel_minigbm=true"
$ ninja -C out/Release mash:all mus_demo
$ export EGL_PLATFORM=surfaceless
$ out/Release/mash --service=mus_demo --enable-features=Mash
Change-Id: I7ab7db87d74f1e1440f63a8a10118c8394597ad4
Intel Confidential — Do Not Forward
Upstream : Enable VAVDA, VAVEA and VAJDA on linux with VAAPI only
27
For more details, see
Enable VAVDA, VAVEA and VAJDA on linux with VAAPI only
This patch contains all the changes necessary to use VA-API along with
vaapi-driver to run all media use cases supported with hardware acceleration.
It is intended to remain as experimental accessible from chrome://flags on linux.
It requires libva/intel-vaapi-driver to be installed on the system path where
chrome is executed. Other drivers could be tested if available. Flags are
kept independent for linux, where this feature has to be enabled before
actually using it. This should not change how other OSes use the flags
already, the new flags will show at the buttom on the section of unavailable
experiments
The changes cover a range of compiler pre-processor flags to enable the stack.
It moves the presandbox operations to the vaapi_wrapper class as the hook function
is available there. vaInit will open driver on the correct installed folder.
chrome flags consolidtation into only two flags for linux. Mjpeg and accelerated
video are used. The other flags are kept for ChromeOS and other OSes.
Developer testing was made on skylake hardware, ChromeOS and Ubuntu.
Intel Confidential — Do Not Forward
How to enable ozone-gbm on Yocto Linux
28
Intel Confidential — Do Not Forward
How to enable ozone-gbm on Arch Linux
29
$ cd ~/git/chromium/src
$ gn gen out/Release "--args=use_ozone=true ozone_platform_gbm=true use_intel_minigbm=true"
$ ninja -C out/Release ozone_demo mash:all mus_demo
$ export EGL_PLATFORM=surfaceless
$ out/Release/ozone_demo --enable-drm-atomic --enable-overlay
$ out/Release/mash --service=mus_demo --enable-features=Mash
Intel Confidential — Do Not Forward
Demo
30
Intel Confidential — Do Not Forward
Future Plan
31
Intel Confidential — Do Not Forward
32
Thanks!
Intel Confidential — Do Not Forward
Intel Confidential — Do Not Forward
Intel Confidential — Do Not Forward