SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Kernel Recipes 2017
An introduction to the
Linux DRM subsystem
Maxime Ripard
Free Electrons
maxime@free-electrons.com
c Copyright 2004-2017, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
Embedded Linux
Developers
Free Electrons
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 1/1
Maxime Ripard
Embedded Linux engineer and trainer at Free Electrons
Embedded Linux development: kernel and driver development, system integration,
boot time and power consumption optimization, consulting, etc.
Embedded Linux training, Linux driver development training and Android system
development training, with materials freely available under a Creative Commons
license.
http://free-electrons.com
Contributions
Co-maintainer for the sunXi SoCs from Allwinner
Contributor to a couple of other open-source projects, Buildroot, U-Boot, Barebox
Living in Toulouse, south west of France
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 2/1
An introduction to the Linux DRM subsystem
Introduction
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 3/1
A long long time ago, in a galaxy (not so) far, far away
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 4/1
Framebuffers
Display hardware was dead simple...
.. and so was the API to drive it.
Introducing... fbdev!
Allows for three things:
Mode-Setting
Accessing the (only) buffer
Optional 2d acceleration: draw, copy, etc.
And access to the device registers...
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 5/1
That 90’s show
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 6/1
Back to the future
Two different trends
Embedded devices starting to show up, with their low power needs ⇒ Display
engines need to accelerate more things
Desktop displays getting more and more fancy in order to play Quake in 4k VR ⇒
Bigger and bigger GPUs
Led to two different outcomes:
Interface to drive GPU devices through the kernel: DRM
Hacks piling on in order to fit embedded use-cases: omapdss, pxafb
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 7/1
Composition Evolved
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 8/1
The droid you’re looking at
Sean Paul and Zach Reizner - Google - XDC2016
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 9/1
Can I talk to the manager?
DRM was initially introduced to deal with the GPU’s need
Initialize the card, load its firmware, etc.
Share the GPU command queue between multiple applications
Manage the memory (allocation, access)
But not modesetting!
All the modesetting was in the userspace, especially in X
Race between rendering and modesetting
Only one graphical application that needed to remain there all the time
(Lack of) Abstraction!
Introduction of the Kernel Mode-Setting (KMS) to move the modesetting back
into the kernel
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 10/1
Kill it with fire!
Now, fbdev could be implemented on top of KMS...
... Or removed entirely
Call for deprecation in 2012 (Hi Laurent!)
Last fbdev driver merged in 2014
First ARM DRM driver: exynos in 2011
Followed: arm, armada, atmel-hclcdc, fsl-dcu, hisilicon, imx, mediatek, meson,
msm, mxsfb, omapdrm, pl111, rcar-du, rockchip, shmobile, sti, stm, sun4i, tegra,
tve200, etc...
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 11/1
Two nodes to go please
Initially, DRM was created for devices that were both displaying and rendering
(your traditionnal PC graphics card).
On embedded devices, it’s never really been like that
the GPU is discrete and comes from a third party
the display engine is usually designed by the SoC vendor
DRM and KMS APIs requiring the same level of privilege, with one master, and
were both exposed on the same device file
Creation of render nodes
Also useful for things like GPGPU, off-screen rendering, more flexible access
control
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 12/1
An introduction to the Linux DRM subsystem
DRM/KMS
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 13/1
The pixels must flow
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 14/1
KMS components
Planes
Image source
Associated with one (or more!) framebuffers
Holds a resized / cropped version of that framebuffer
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 15/1
Page flipping
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 16/1
KMS components
Planes
Image source
Associated with one (or more!) framebuffers
Holds a resized / cropped version of that framebuffer
CRTCs
Take the planes, and does the composition
Contains the display mode and parameters
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 17/1
KMS components
Planes
Image source
Associated with one (or more!) framebuffers
Holds a resized / cropped version of that framebuffer
CRTCs
Take the planes, and does the composition
Contains the display mode and parameters
Encoders
Take the raw data from the CRTC and convert it to a particular format
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 17/1
KMS components
Planes
Image source
Associated with one (or more!) framebuffers
Holds a resized / cropped version of that framebuffer
CRTCs
Take the planes, and does the composition
Contains the display mode and parameters
Encoders
Take the raw data from the CRTC and convert it to a particular format
Connectors
Outputs the encoded data to an external display
Handles hotplug events
Reads EDIDs
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 17/1
Allwinner display pipeline
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 18/1
DRM vs SoC pipeline
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 19/1
DRM Stack: KMS
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 20/1
DRM Stack: GEM
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 21/1
DRM Stack: CMA
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 22/1
DRM Stack: PRIME
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 23/1
DRM Stack: GPUs
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 24/1
An introduction to the Linux DRM subsystem
Vendor solutions...
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 25/1
Solutions
The GPU found in most Allwinner SoCs is the Mali-400 from ARM (with a
variable number of cores)
There are two options to support that GPU:
Lima
Reversed engineered proof-of-concept
Triggered the reverse engineering effort of the GPUs (freedreno, etnaviv, etc.)
Development (close to?) stopped three years ago, and then resumed a couple of
monthes ago
ARM-Provided support
Featureful
Two parts: GPL kernel driver and proprietary OpenGL ES implementation
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 26/1
DRM Stack: GPU
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 27/1
Development
Everything is provided by ARM on their website (if you’re lucky)
On the userspace side, you just need to put the library they provided on your
system
On the driver side, you need to create a platform glue that will deal with:
Memory mapping
Interrupts
Clocks
Reset lines
Power Domains
Basically everything needed for the GPU to operate properly on your SoC
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 28/1
X11 integration
We need a DDX (Device Dependent X) driver
xf86-video-modesetting is working on top of KMS and GBM (MESA-defined
user-space API to allocate buffers)
ARM developped xf86-video-armsoc for SoC using a 3rd party GPU (Mali,
PowerVR, Vivante, etc.)
Relies on KMS for the display configuration, driver-specific ioctl for buffer
allocations and vendor-provided OpenGL ES implementation
Just have to write a small glue to use your driver allocator, and give some hints to
X about what your hardware support (hw cursor, vblank, etc.)
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 29/1
Questions?
Maxime Ripard
maxime@free-electrons.com
Slides under CC-BY-SA 3.0
http://free-electrons.com/pub/conferences/2017/kr/ripard-drm
Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 30/1

Weitere ähnliche Inhalte

Was ist angesagt?

COSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingCOSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingEric Lin
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)shimosawa
 
Linux SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver艾鍗科技
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Macpaul Lin
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...Anne Nicolas
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom BoardPatrick Bellasi
 
Continguous Memory Allocator in the Linux Kernel
Continguous Memory Allocator in the Linux KernelContinguous Memory Allocator in the Linux Kernel
Continguous Memory Allocator in the Linux KernelKernel TLV
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device driversHoucheng Lin
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File SystemAdrian Huang
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesChris Simmonds
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver艾鍗科技
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBshimosawa
 
linux device driver
linux device driverlinux device driver
linux device driverRahul Batra
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLinaro
 

Was ist angesagt? (20)

COSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingCOSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem porting
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
Embedded linux network device driver development
Embedded linux network device driver developmentEmbedded linux network device driver development
Embedded linux network device driver development
 
Linux SD/MMC device driver
Linux SD/MMC device driverLinux SD/MMC device driver
Linux SD/MMC device driver
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 
Continguous Memory Allocator in the Linux Kernel
Continguous Memory Allocator in the Linux KernelContinguous Memory Allocator in the Linux Kernel
Continguous Memory Allocator in the Linux Kernel
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File System
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
 
Linux Serial Driver
Linux Serial DriverLinux Serial Driver
Linux Serial Driver
 
Linux Audio Drivers. ALSA
Linux Audio Drivers. ALSALinux Audio Drivers. ALSA
Linux Audio Drivers. ALSA
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
 
Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
 
Memory model
Memory modelMemory model
Memory model
 
linux device driver
linux device driverlinux device driver
linux device driver
 
LCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted FirmwareLCU13: An Introduction to ARM Trusted Firmware
LCU13: An Introduction to ARM Trusted Firmware
 

Ähnlich wie Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard

UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processorUplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processorSatya Harish
 
Kernel Recipes 2014 - Supporting a new ARM platform: the Allwinner example
Kernel Recipes 2014 - Supporting a new ARM platform: the Allwinner exampleKernel Recipes 2014 - Supporting a new ARM platform: the Allwinner example
Kernel Recipes 2014 - Supporting a new ARM platform: the Allwinner exampleAnne Nicolas
 
0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlabNational Cheng Kung University
 
Kernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernelKernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernelAnne Nicolas
 
“Khronos Group Standards: Powering the Future of Embedded Vision,” a Presenta...
“Khronos Group Standards: Powering the Future of Embedded Vision,” a Presenta...“Khronos Group Standards: Powering the Future of Embedded Vision,” a Presenta...
“Khronos Group Standards: Powering the Future of Embedded Vision,” a Presenta...Edge AI and Vision Alliance
 
Droidcon 2013 France - Android Platform Anatomy
Droidcon 2013 France - Android Platform AnatomyDroidcon 2013 France - Android Platform Anatomy
Droidcon 2013 France - Android Platform AnatomyBenjamin Zores
 
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...Edge AI and Vision Alliance
 
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, CitrixLCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, CitrixThe Linux Foundation
 
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYWhy Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYEnterprise Management Associates
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux MultimediaCaglar Dursun
 
Kernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using BuildrootKernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using BuildrootAnne Nicolas
 
Play With Android
Play With AndroidPlay With Android
Play With AndroidChamp Yen
 
ASICSoft Technologies Overview - R&D
ASICSoft Technologies Overview - R&DASICSoft Technologies Overview - R&D
ASICSoft Technologies Overview - R&DTony Devlin
 

Ähnlich wie Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard (20)

UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processorUplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
UplinQ - ubuntu linux on the qualcomm® snapdragon™ 600 processor
 
Kernel Recipes 2014 - Supporting a new ARM platform: the Allwinner example
Kernel Recipes 2014 - Supporting a new ARM platform: the Allwinner exampleKernel Recipes 2014 - Supporting a new ARM platform: the Allwinner example
Kernel Recipes 2014 - Supporting a new ARM platform: the Allwinner example
 
ARM
ARMARM
ARM
 
Arm
ArmArm
Arm
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
 
0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab0xdroid -- community-developed Android distribution by 0xlab
0xdroid -- community-developed Android distribution by 0xlab
 
Kernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernelKernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernel
 
Resume
ResumeResume
Resume
 
“Khronos Group Standards: Powering the Future of Embedded Vision,” a Presenta...
“Khronos Group Standards: Powering the Future of Embedded Vision,” a Presenta...“Khronos Group Standards: Powering the Future of Embedded Vision,” a Presenta...
“Khronos Group Standards: Powering the Future of Embedded Vision,” a Presenta...
 
Droidcon 2013 France - Android Platform Anatomy
Droidcon 2013 France - Android Platform AnatomyDroidcon 2013 France - Android Platform Anatomy
Droidcon 2013 France - Android Platform Anatomy
 
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
“Khronos Standard APIs for Accelerating Vision and Inferencing,” a Presentati...
 
VenutoResume
VenutoResumeVenutoResume
VenutoResume
 
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, CitrixLCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
LCC17 - Securing Embedded Systems with the Hypervisor - Lars Kurth, Citrix
 
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIYWhy Pay for Open Source Linux? Avoid the Hidden Cost of DIY
Why Pay for Open Source Linux? Avoid the Hidden Cost of DIY
 
Embedded Linux Multimedia
Embedded Linux MultimediaEmbedded Linux Multimedia
Embedded Linux Multimedia
 
Kernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using BuildrootKernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using Buildroot
 
Play With Android
Play With AndroidPlay With Android
Play With Android
 
ASICSoft Technologies Overview - R&D
ASICSoft Technologies Overview - R&DASICSoft Technologies Overview - R&D
ASICSoft Technologies Overview - R&D
 
Advancement on embedded linux-v2
Advancement on embedded linux-v2Advancement on embedded linux-v2
Advancement on embedded linux-v2
 
SYCL 2020 Specification
SYCL 2020 SpecificationSYCL 2020 Specification
SYCL 2020 Specification
 

Mehr von Anne Nicolas

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstAnne Nicolas
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIAnne Nicolas
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyAnne Nicolas
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureAnne Nicolas
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Anne Nicolas
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataAnne Nicolas
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Anne Nicolas
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxAnne Nicolas
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialAnne Nicolas
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconAnne Nicolas
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureAnne Nicolas
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayAnne Nicolas
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerAnne Nicolas
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationAnne Nicolas
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingAnne Nicolas
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaAnne Nicolas
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPAnne Nicolas
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Anne Nicolas
 

Mehr von Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimediaEmbedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 

Kürzlich hochgeladen

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 

Kürzlich hochgeladen (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Kernel Recipes 2017 - An introduction to the Linux DRM subsystem - Maxime Ripard

  • 1. Kernel Recipes 2017 An introduction to the Linux DRM subsystem Maxime Ripard Free Electrons maxime@free-electrons.com c Copyright 2004-2017, Free Electrons. Creative Commons BY-SA 3.0 license. Corrections, suggestions, contributions and translations are welcome! Embedded Linux Developers Free Electrons Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 1/1
  • 2. Maxime Ripard Embedded Linux engineer and trainer at Free Electrons Embedded Linux development: kernel and driver development, system integration, boot time and power consumption optimization, consulting, etc. Embedded Linux training, Linux driver development training and Android system development training, with materials freely available under a Creative Commons license. http://free-electrons.com Contributions Co-maintainer for the sunXi SoCs from Allwinner Contributor to a couple of other open-source projects, Buildroot, U-Boot, Barebox Living in Toulouse, south west of France Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 2/1
  • 3. An introduction to the Linux DRM subsystem Introduction Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 3/1
  • 4. A long long time ago, in a galaxy (not so) far, far away Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 4/1
  • 5. Framebuffers Display hardware was dead simple... .. and so was the API to drive it. Introducing... fbdev! Allows for three things: Mode-Setting Accessing the (only) buffer Optional 2d acceleration: draw, copy, etc. And access to the device registers... Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 5/1
  • 6. That 90’s show Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 6/1
  • 7. Back to the future Two different trends Embedded devices starting to show up, with their low power needs ⇒ Display engines need to accelerate more things Desktop displays getting more and more fancy in order to play Quake in 4k VR ⇒ Bigger and bigger GPUs Led to two different outcomes: Interface to drive GPU devices through the kernel: DRM Hacks piling on in order to fit embedded use-cases: omapdss, pxafb Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 7/1
  • 8. Composition Evolved Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 8/1
  • 9. The droid you’re looking at Sean Paul and Zach Reizner - Google - XDC2016 Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 9/1
  • 10. Can I talk to the manager? DRM was initially introduced to deal with the GPU’s need Initialize the card, load its firmware, etc. Share the GPU command queue between multiple applications Manage the memory (allocation, access) But not modesetting! All the modesetting was in the userspace, especially in X Race between rendering and modesetting Only one graphical application that needed to remain there all the time (Lack of) Abstraction! Introduction of the Kernel Mode-Setting (KMS) to move the modesetting back into the kernel Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 10/1
  • 11. Kill it with fire! Now, fbdev could be implemented on top of KMS... ... Or removed entirely Call for deprecation in 2012 (Hi Laurent!) Last fbdev driver merged in 2014 First ARM DRM driver: exynos in 2011 Followed: arm, armada, atmel-hclcdc, fsl-dcu, hisilicon, imx, mediatek, meson, msm, mxsfb, omapdrm, pl111, rcar-du, rockchip, shmobile, sti, stm, sun4i, tegra, tve200, etc... Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 11/1
  • 12. Two nodes to go please Initially, DRM was created for devices that were both displaying and rendering (your traditionnal PC graphics card). On embedded devices, it’s never really been like that the GPU is discrete and comes from a third party the display engine is usually designed by the SoC vendor DRM and KMS APIs requiring the same level of privilege, with one master, and were both exposed on the same device file Creation of render nodes Also useful for things like GPGPU, off-screen rendering, more flexible access control Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 12/1
  • 13. An introduction to the Linux DRM subsystem DRM/KMS Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 13/1
  • 14. The pixels must flow Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 14/1
  • 15. KMS components Planes Image source Associated with one (or more!) framebuffers Holds a resized / cropped version of that framebuffer Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 15/1
  • 16. Page flipping Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 16/1
  • 17. KMS components Planes Image source Associated with one (or more!) framebuffers Holds a resized / cropped version of that framebuffer CRTCs Take the planes, and does the composition Contains the display mode and parameters Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 17/1
  • 18. KMS components Planes Image source Associated with one (or more!) framebuffers Holds a resized / cropped version of that framebuffer CRTCs Take the planes, and does the composition Contains the display mode and parameters Encoders Take the raw data from the CRTC and convert it to a particular format Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 17/1
  • 19. KMS components Planes Image source Associated with one (or more!) framebuffers Holds a resized / cropped version of that framebuffer CRTCs Take the planes, and does the composition Contains the display mode and parameters Encoders Take the raw data from the CRTC and convert it to a particular format Connectors Outputs the encoded data to an external display Handles hotplug events Reads EDIDs Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 17/1
  • 20. Allwinner display pipeline Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 18/1
  • 21. DRM vs SoC pipeline Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 19/1
  • 22. DRM Stack: KMS Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 20/1
  • 23. DRM Stack: GEM Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 21/1
  • 24. DRM Stack: CMA Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 22/1
  • 25. DRM Stack: PRIME Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 23/1
  • 26. DRM Stack: GPUs Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 24/1
  • 27. An introduction to the Linux DRM subsystem Vendor solutions... Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 25/1
  • 28. Solutions The GPU found in most Allwinner SoCs is the Mali-400 from ARM (with a variable number of cores) There are two options to support that GPU: Lima Reversed engineered proof-of-concept Triggered the reverse engineering effort of the GPUs (freedreno, etnaviv, etc.) Development (close to?) stopped three years ago, and then resumed a couple of monthes ago ARM-Provided support Featureful Two parts: GPL kernel driver and proprietary OpenGL ES implementation Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 26/1
  • 29. DRM Stack: GPU Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 27/1
  • 30. Development Everything is provided by ARM on their website (if you’re lucky) On the userspace side, you just need to put the library they provided on your system On the driver side, you need to create a platform glue that will deal with: Memory mapping Interrupts Clocks Reset lines Power Domains Basically everything needed for the GPU to operate properly on your SoC Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 28/1
  • 31. X11 integration We need a DDX (Device Dependent X) driver xf86-video-modesetting is working on top of KMS and GBM (MESA-defined user-space API to allocate buffers) ARM developped xf86-video-armsoc for SoC using a 3rd party GPU (Mali, PowerVR, Vivante, etc.) Relies on KMS for the display configuration, driver-specific ioctl for buffer allocations and vendor-provided OpenGL ES implementation Just have to write a small glue to use your driver allocator, and give some hints to X about what your hardware support (hw cursor, vblank, etc.) Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 29/1
  • 32. Questions? Maxime Ripard maxime@free-electrons.com Slides under CC-BY-SA 3.0 http://free-electrons.com/pub/conferences/2017/kr/ripard-drm Free Electrons. Kernel, drivers, embedded Linux and Android - Development, consulting, training and support. http://free-electrons.com 30/1