open arm gpu drivers - fosdem...open arm gpu drivers: where are we today, 1 year after the unveiling...

32
Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen [email protected]

Upload: others

Post on 13-Oct-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Open ARM GPU drivers:

Where are we today, 1 year after theunveiling of the lima driver.

Luc Verhaegen

[email protected]

Page 2: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

The problem.

Page 3: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

The solution?

Page 4: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Legal?

(IANAL)

Page 5: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

GPU #1:

ARM Mali

Page 6: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

ARM Mali-200/400

● OpenGLES 2.0● Separate Vertex (GP) and Fragment (PP)

shaders● SoCs:

● Samsung exynos 4: world beater in 2011-2012● Allwinner, Amlogic, Rockchip, Telechips,

Wondermedia, ...

● Future: Mali-450

Page 7: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

ARM Mali T6xx

● OpenGLES 3.0/OpenCL 1.1● Unified shaders● SoCs:

● Samsung exynos 5

● Future: ARM T624/T628/T658/T678

Page 8: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Project: Lima

LucVerhaegen

(libv)

ConnorAbbott

(cwabbott)

BenBrewer

(flatmush)

Page 9: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Lima● Status: research (highly advanced)

● No big secrets left in command-stream● Compiler is tough due to Mali architecture● Actual driver work will start after FOSDEM

● Full GNU/linux systems available● Website: http://limadriver.org● Repository: http://gitorious.org/lima● Demos at the end of this talk / Lima compiler

talk in X.org DevRoom (K.3.401) at 17:30.

Page 10: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

GPU #2:

Qualcomm Adreno

Page 11: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Qualcomm Adreno 2xx/3xx

● Former ATI Imageon● OpenGLES 2.0, 3.0 (3xx)● Unified shaders● SoCs:

● Qualcomm Snapdragon S1-S4● Freescale iMX5

Page 12: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Project: Freedreno

Rob Clark(robclark)

Page 13: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Freedreno

● Status: WIP driver● Job submission is like ATI radeon.● Command-stream is mostly known.● Shader architecture also mostly known.● WIP xf86 (exa), mesa (gallium) drivers available

● No proper GNU/linux available :(● Website: http://freedreno.github.com/● Further details and demos in the X.org

DevRoom (K.3.401) at 17:00 today.

Page 14: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

GPU #3:

Nvidia Geforce ULP(Tegra)

Page 15: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Nvidia Geforce ULP/Tegra

● Supposedly a cut down older Geforce but...● OpenGLES 2.0, 3.0 (tegra4),

openCL/renderscript (tegra4)● Split vertex and fragment shader design.● SoCs: well duh.

Page 16: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Project: Tegra-re

Erik Faye-Lund(kusma)

Page 17: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Tegra-re

● Status: Early research.● Job submission wrapping.● Early shader disassembler.● Early command stream capture.● Replay is up next.

● Limited availability of GNU/linux systems

(AC-100, Trimslice)● Website: https://github.com/kusma/tegra-re

Page 18: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

GPU #4:

Vivante GCxxxx

Page 19: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Vivante GCxxxx

● OpenGLES 2.0/3.0● Unified shader design● SoCs:

● Marvell Armada● Freescale iMX6● Hisilicon, Ingenic, rockchip, loongson, ...

Page 20: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Project: etna-viv

Wladimir J.Van Der Laan

(wumpus)

Page 21: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Etna-Viv

● Status: early research (rapidly advancing)● Full command stream capture and replay● Slowly prying apart command stream● Shader disassembler and assembler

● Repository: http://github.com/laanwj/etna_viv

Page 22: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

GPU #5:

Broadcom Videocore

Page 23: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Broadcom Videocore

● OpenGLES 2.0, OpenVG, OpenMax, …● … Media Decoding, Shader Compiler,

Modesetting, ARM Core bringup...● DSP based proprietary architecture.● Found in Broadcom SoCs and standalone

Broadcom Media Chips.

Page 24: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

RPi == Closed platform.● Videocore is a separate undocumented

DSP/SIMD architecture.● Runs a RTOS in a reserved bit of RAM.● Responsible for much of the system level

functionality, and even bringing up the ARM core.

● Communication from ARM userspace through a message-passing interface through the kernel and out some shared ringbuffers.

● Userspace GPU drivers are just a shim.

Page 25: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Project: videocore

Scott Mansel(phire)

Matthew Parlane(matt)

(booto) (Herman)

Tiernan Hubble

(thubble)

Mathias Gottschlag

(mgottschlag)

(eizo_san) Mark Marshall(mm120)

(David)

Page 26: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Videocore● Status: research (rapidly advancing)

● Scalar processor fully RE-ed.● Loads of documentation.● Assembler/disassembler.● Binutils● Compiler work started.● Some Hello World code for booting the RPi

● Repository: https://github.com/hermanhermitage/videocoreiv/

● IRC: #raspberrypi-internals

Page 27: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

GPU #6:

Imagination PowerVR SGX

Page 28: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

PowerVR SGX (5xx)

● OpenGLES 2.0, 3.0, OpenVG, ...● Unified shader design (USSE)● SoCs:

● Texas Instruments Omap.● Apple A4, A5, A6.● Intel Poulsbo through Medfield.● … Everyone really, at one point or another...

● Future: Rogue (6xx)

Page 29: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

PowerVR is ...

… a mix of microcode, kernel and userspace.

This makes PVR:● Highly adaptable● Scalable● Versatile

But also...● Fragile● Synchronization nightmare● Hard to debug and maintain...● … and therefore hard to Reverse Engineer.

Page 30: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Project: ...

(slightly gratuitous, but only slightly ;p)

Page 31: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Lima demo time!

Page 32: Open ARM GPU drivers - FOSDEM...Open ARM GPU drivers: Where are we today, 1 year after the unveiling of the lima driver. Luc Verhaegen libv@skynet.be ARM Mali-200/400 OpenGLES 2.0

Demo Hardware: Mele A1000

● Allwinner A10● Single ARM Cortex A8 at 1152MHz● 512MB of 360MHz DDR3● Mali-400MP1 at 320MHz

● UART exposed● http://linux-sunxi.org

● U-boot● Kernel● Further utilities and documentation.