SlideShare a Scribd company logo
1 of 12
Download to read offline
Enable hardware acceleration for
GL applications without glamor on
Xorg modesetting driver
Christopher Michael <cmichael@igalia.com>
José María Casanova Crespo <jmcasanova@igalia.com>
XDC 2022 – Minneapolis, Minnesota, USA
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Outline
 Xserver Modesetting + Glamor + DRI3
 Issues on hardware with limited GPU memory.
 Technical Approach
 Current Status
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Xserver and Glamor
 Xserver modesetting driver makes X work if your GPU has KMS (Kernel Mode
Setting) available.
 If your GPU has a GL driver, GLAMOR can be enabled. Glamor will take
advantage of GL to do the 2D composition so pixmaps will be GL textures.
 Modesetting implementation of Direct Rendering Infrastructure (DRI)
requires having GLAMOR enabled.
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
The issue with limited GPU memory
 Low-end devices like Raspberry Pi 1-3 (256Mb-1Gb RAM) have limited GPU
memory addressing up to 256Mb (CMA). This is not an issue on
Raspberry Pi 4 because GPU can access memory using the MMU.
 Since bullseye Raspberry OS release, all Raspberry Pi 1-3 users are using
the modesetting driver.
 With Glamor enabled using Mesa VC4 OpenGL driver for RPi3 works fine
unless you run out of GPU memory.…
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Running out of GPU memory
 Open multiple applications full screen at Full HD resolution, being one of
them Chromium with 6-8 tabs. Every window/tab will consume GPU
memory.
 If you are lucky the application crashes, if you are unlucky the Xserver
memory allocation fails and then Xserver crashes. We don’t want this user
experience.
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Glamor disabled but we want DRI
 To avoid this issue on pre-Rpi4 devices glamor is disabled by default on
Raspberry OS.
 But, no DRI2/3 is available. So no HW accelleration is used for OpenGL
applications.
 So we explored if we can have a DRI3 implementation on modesetting
driver that does not requires glamor to be enabled.
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Technical Approach
 Use X Server software rendering for desktop
 Allow DRI imported/exported pixmaps using OpenGL/ES driver
 Found xf86-video-nouveau patch: "enable dri3 support without glamor"
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Enabling DRI3
Implement four functions:
●
dri3_screen_init: Sets up DRI3 extension function calls
●
dri3_open: Opens drm device fd and authorizes
●
dri3_pixmap_from_fds: Creates a pixmap to wrap a dma-buf fd
●
dri3_fds_from_pixmap: Backs an existing pixmap with a dma-buf fd
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Enabling DRI3 (cont)
 DRI3 extension implements sharing direct rendered buffers between DRI clients
and the X Server
●
Clients allocate render buffers themselves
●
Uses more secure sharing method based on Prime DMA-Bufs (file descriptors)
 Present extension shows rendered buffers on the screen
●
Handles synchronization of screen updates to Vblank
 GBM used to allocate buffers for pixmap backing
●
Linear modifier is negotiated so buffers can be composited by Xserver
Current Status
 Implementation is functional with VC4 (RPi 1-3) and V3D (RPi4).
 X Server renders desktop using software rendering.
 GL applications work using gbm bo’s for pixmap backing
 Compositors (mutter) work with this DRI3 implementation.
 Patches submitted upstream for review:
https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/945
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Q & A
Thank you
We are hiring: https://www.igalia.com/jobs/
Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver
Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
Enable hardware acceleration for
GL applications without glamor on
Xorg modesetting driver
Christopher Michael <cmichael@igalia.com>
José María Casanova Crespo <jmcasanova@igalia.com>
XDC 2022 – Minneapolis, Minnesota, USA

More Related Content

Similar to Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver

Introduction to 3D Mapping with X3D
Introduction to 3D Mapping with X3DIntroduction to 3D Mapping with X3D
Introduction to 3D Mapping with X3DIan Panganiban
 
Gl tf siggraph-2013
Gl tf siggraph-2013Gl tf siggraph-2013
Gl tf siggraph-2013Khaled MAMOU
 
MongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB Days UK: Run MongoDB on Google Cloud PlatformMongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB Days UK: Run MongoDB on Google Cloud PlatformMongoDB
 
Cloud Graphical Rendering: A New Paradigm
Cloud Graphical Rendering:  A New ParadigmCloud Graphical Rendering:  A New Paradigm
Cloud Graphical Rendering: A New ParadigmJoel Isaacson
 
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)Ron Munitz
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering PipelineHyungwook Lee
 
Memory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform TeamMemory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform TeamRyo Jin
 
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Ron Munitz
 
mago3D FOSS4G NA 2018
mago3D FOSS4G NA 2018mago3D FOSS4G NA 2018
mago3D FOSS4G NA 2018정대 천
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Embarcadero Technologies
 
mago3D workshop(English) in Thailand , 2018.07
mago3D workshop(English) in Thailand , 2018.07mago3D workshop(English) in Thailand , 2018.07
mago3D workshop(English) in Thailand , 2018.07Gaia3D,Inc.
 
06 html5 and cocos2d-x
06   html5 and cocos2d-x06   html5 and cocos2d-x
06 html5 and cocos2d-x乐费 胡
 
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, CitrixXPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, CitrixThe Linux Foundation
 
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...GoGrid Cloud Hosting
 
Drupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalDrupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalBrian Hay
 
PG-4119, 3D Geometry Compression on GPU, by Jacques Lefaucheux
PG-4119, 3D Geometry Compression on GPU, by Jacques LefaucheuxPG-4119, 3D Geometry Compression on GPU, by Jacques Lefaucheux
PG-4119, 3D Geometry Compression on GPU, by Jacques LefaucheuxAMD Developer Central
 
"How overlay networks can make public clouds your global WAN" by Ryan Koop o...
 "How overlay networks can make public clouds your global WAN" by Ryan Koop o... "How overlay networks can make public clouds your global WAN" by Ryan Koop o...
"How overlay networks can make public clouds your global WAN" by Ryan Koop o...Cohesive Networks
 
Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)Igalia
 

Similar to Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver (20)

Introduction to 3D Mapping with X3D
Introduction to 3D Mapping with X3DIntroduction to 3D Mapping with X3D
Introduction to 3D Mapping with X3D
 
Gl tf siggraph-2013
Gl tf siggraph-2013Gl tf siggraph-2013
Gl tf siggraph-2013
 
MongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB Days UK: Run MongoDB on Google Cloud PlatformMongoDB Days UK: Run MongoDB on Google Cloud Platform
MongoDB Days UK: Run MongoDB on Google Cloud Platform
 
Cloud Graphical Rendering: A New Paradigm
Cloud Graphical Rendering:  A New ParadigmCloud Graphical Rendering:  A New Paradigm
Cloud Graphical Rendering: A New Paradigm
 
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
Building Android for the Cloud: Android as a Server (Mobile World Congress 2014)
 
G3m overview
G3m overviewG3m overview
G3m overview
 
Android Chromium Rendering Pipeline
Android Chromium Rendering PipelineAndroid Chromium Rendering Pipeline
Android Chromium Rendering Pipeline
 
GPU Acceleration for Containers on Intel Processor Graphics
GPU Acceleration for Containers on Intel Processor GraphicsGPU Acceleration for Containers on Intel Processor Graphics
GPU Acceleration for Containers on Intel Processor Graphics
 
Memory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform TeamMemory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform Team
 
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
Building android for the Cloud: Android as a Server (AnDevConBoston 2014)
 
mago3D FOSS4G NA 2018
mago3D FOSS4G NA 2018mago3D FOSS4G NA 2018
mago3D FOSS4G NA 2018
 
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
Android on Windows 11 - A Developer's Perspective (Windows Subsystem For Andr...
 
mago3D workshop(English) in Thailand , 2018.07
mago3D workshop(English) in Thailand , 2018.07mago3D workshop(English) in Thailand , 2018.07
mago3D workshop(English) in Thailand , 2018.07
 
06 html5 and cocos2d-x
06   html5 and cocos2d-x06   html5 and cocos2d-x
06 html5 and cocos2d-x
 
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, CitrixXPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
XPDS13: Zero-copy display of guest framebuffers using GEM - John Baboval, Citrix
 
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
GoGrid 3.0 Webinar: Complex Infrastructure Made Easy - Learn About the GoGrid...
 
Drupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with DrupalDrupal 3D - Intro to Using Web 3D with Drupal
Drupal 3D - Intro to Using Web 3D with Drupal
 
PG-4119, 3D Geometry Compression on GPU, by Jacques Lefaucheux
PG-4119, 3D Geometry Compression on GPU, by Jacques LefaucheuxPG-4119, 3D Geometry Compression on GPU, by Jacques Lefaucheux
PG-4119, 3D Geometry Compression on GPU, by Jacques Lefaucheux
 
"How overlay networks can make public clouds your global WAN" by Ryan Koop o...
 "How overlay networks can make public clouds your global WAN" by Ryan Koop o... "How overlay networks can make public clouds your global WAN" by Ryan Koop o...
"How overlay networks can make public clouds your global WAN" by Ryan Koop o...
 
Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)
 

More from Igalia

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEIgalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesIgalia
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceIgalia
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfIgalia
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JITIgalia
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!Igalia
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerIgalia
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in MesaIgalia
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIgalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera LinuxIgalia
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVMIgalia
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsIgalia
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesIgalia
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSIgalia
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webIgalia
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersIgalia
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...Igalia
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on RaspberryIgalia
 

More from Igalia (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
 

Recently uploaded

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Recently uploaded (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver

  • 1. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael <cmichael@igalia.com> José María Casanova Crespo <jmcasanova@igalia.com> XDC 2022 – Minneapolis, Minnesota, USA
  • 2. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA Outline  Xserver Modesetting + Glamor + DRI3  Issues on hardware with limited GPU memory.  Technical Approach  Current Status
  • 3. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA Xserver and Glamor  Xserver modesetting driver makes X work if your GPU has KMS (Kernel Mode Setting) available.  If your GPU has a GL driver, GLAMOR can be enabled. Glamor will take advantage of GL to do the 2D composition so pixmaps will be GL textures.  Modesetting implementation of Direct Rendering Infrastructure (DRI) requires having GLAMOR enabled.
  • 4. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA The issue with limited GPU memory  Low-end devices like Raspberry Pi 1-3 (256Mb-1Gb RAM) have limited GPU memory addressing up to 256Mb (CMA). This is not an issue on Raspberry Pi 4 because GPU can access memory using the MMU.  Since bullseye Raspberry OS release, all Raspberry Pi 1-3 users are using the modesetting driver.  With Glamor enabled using Mesa VC4 OpenGL driver for RPi3 works fine unless you run out of GPU memory.…
  • 5. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA Running out of GPU memory  Open multiple applications full screen at Full HD resolution, being one of them Chromium with 6-8 tabs. Every window/tab will consume GPU memory.  If you are lucky the application crashes, if you are unlucky the Xserver memory allocation fails and then Xserver crashes. We don’t want this user experience.
  • 6. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA Glamor disabled but we want DRI  To avoid this issue on pre-Rpi4 devices glamor is disabled by default on Raspberry OS.  But, no DRI2/3 is available. So no HW accelleration is used for OpenGL applications.  So we explored if we can have a DRI3 implementation on modesetting driver that does not requires glamor to be enabled.
  • 7. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA Technical Approach  Use X Server software rendering for desktop  Allow DRI imported/exported pixmaps using OpenGL/ES driver  Found xf86-video-nouveau patch: "enable dri3 support without glamor"
  • 8. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA Enabling DRI3 Implement four functions: ● dri3_screen_init: Sets up DRI3 extension function calls ● dri3_open: Opens drm device fd and authorizes ● dri3_pixmap_from_fds: Creates a pixmap to wrap a dma-buf fd ● dri3_fds_from_pixmap: Backs an existing pixmap with a dma-buf fd
  • 9. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA Enabling DRI3 (cont)  DRI3 extension implements sharing direct rendered buffers between DRI clients and the X Server ● Clients allocate render buffers themselves ● Uses more secure sharing method based on Prime DMA-Bufs (file descriptors)  Present extension shows rendered buffers on the screen ● Handles synchronization of screen updates to Vblank  GBM used to allocate buffers for pixmap backing ● Linear modifier is negotiated so buffers can be composited by Xserver
  • 10. Current Status  Implementation is functional with VC4 (RPi 1-3) and V3D (RPi4).  X Server renders desktop using software rendering.  GL applications work using gbm bo’s for pixmap backing  Compositors (mutter) work with this DRI3 implementation.  Patches submitted upstream for review: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/945 Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
  • 11. Q & A Thank you We are hiring: https://www.igalia.com/jobs/ Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael, José María Casanova Crespo, XDC 2022, October 5 | Minneapolis, Minnesota, USA
  • 12. Enable hardware acceleration for GL applications without glamor on Xorg modesetting driver Christopher Michael <cmichael@igalia.com> José María Casanova Crespo <jmcasanova@igalia.com> XDC 2022 – Minneapolis, Minnesota, USA