Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
FOSDEM 2016

Contributing to the Graphics stack on FreeBSD

What is the Graphics stack?

Graphical environment

GNOME Shell screenshot

GPGPU

Use the GPU to perform general purpose computations.

Common APIs:

  • OpenCL
  • NVIDIA's CUDA

GPGPU

Scientific computations and simulations

GPGPU

Virtual currency mining

X.Org server

  • Provides 2D API and input events for applications and window managers.

  • Configures input and video devices

  • Uses "DDX" (device-dependent modules, the xf86-input-* and xf86-video-* packages) to access underlying drivers.

Mesa

  • Provides 3D APIs for applications and compositing window managers.

  • Provides OpenCL for some GPUs.

  • Allows to do hardware-assisted video decoding and encoding.

Userland


Kernel

Kernel


Hardware

Input device drivers

  • Reports input events to userland.

  • On FreeBSD, used either by TTY and moused(8) or directly by X.Org DDX (xf86-input-*).

DRM

Drives video devices:

  • Initializes hardware.
  • Manages buffers between system and video memory.
  • Configures output connectors.
  • Accessed through file I/O and ioctls.

DRM

VFS

ufs

zfs

msdosfs

...

=

DRM Core

i915

radeon

nouveau

...

X.Org server

xserver 1.17 in the Ports tree.

  1. General maintenance; xserver 1.18 in progress.
  2. signalfd equivalent in FreeBSD.
  3. libdevq / udev wrapper.
  4. libinput.
  5. systemd-logind / xserver without root privileges.

Mesa

Mesa 11.0 in the Ports tree.

  1. General maintenance; Mesa 11.1 in progress.
  2. libdevq / udev wrapper.
  3. Piglit.

Input device drivers

Need to study what we have and what needs improvement.

  1. evdev, see FreeBSD wiki page on this topic.
  2. TTY, kbdmux(8) and multiple keyboards.
  3. Link between sysctls and /dev entries.

DRM

  1. DRM updates to later Linux versions.
  2. Switch to linuxkpi.
  3. New drivers; amdgpu?
  4. Link between sysctls and /dev entries.
  5. dmabuf / DRM PRIME.
  6. Rename drm2 to drm.
  7. Backport to stable/*, drm-kmod port.
  8. Monitor hotplug notification.

Workflow

Everything on GitHub:

Forked from official FreeBSD Git mirrors.

Workflow

  • master == HEAD in Subversion.
  • Work happens in separate branches.
+--> xserver-next --> HEAD (svn) --+
|                                  |
|                                  |
+-------------------- master <-----+

Workflow

More on DRM:

Which target? Which method?
  • Linux 3.9
  • Linux 4.4
  • file-by-file
  • commit-by-commit

Closing

  • Lot of interesting work.
  • Short and longer projects.
  • Don't be afraid!

Any questions?