Skip to content

Instantly share code, notes, and snippets.

@amshafer
amshafer / multigpu_scanout.md
Created April 25, 2024 14:26
Mutter proposed secondary GPU scanout changes

Multi-GPU scanout in Mutter

I'd like to add support for direct scanout on secondary GPUs in mutter. i.e. app becomes fullscreened on an output connected to the secondary GPU, we resend dmabuf feedback to include scanout formats for that GPU, the app reallocates buffers to use a scanout format, direct scanout takes place. When the screen leaves fullscreen dmabuf feedback is resent (no secondary scanout formats this time) and the existing buffer is copied to the primary GPU for rendered composition if needed until the app reallocates.

This is something I proposed for wlroots as well, so prior example here: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4055

There's some high level descriptions in that MR's description of how the flow works for this feature that might be helpful.

This is interesting from a performance perspective but it also opens the door to enabling features. Direct scanout is needed for GSync to take place, and some features like dynamic display muxing require the abili

@amshafer
amshafer / doom-sel4hid.c
Last active June 21, 2019 20:06
DOOM seL4 HID
/*
* seL4 doom HID serial input driver
*
* Austin Shafer - 2019
*/
#include <termios.h>
#include <stdlib.h>
#include <assert.h>
#include <fcntl.h>
#include <X11/Xlib.h>
@amshafer
amshafer / FreeBSD-RTCWake.txt
Created November 16, 2018 05:11
FreeBSD rtcwake work in progress
# Notes from implementation of RTC wake in FreeBSD
#
# Austin Shafer
The following is a preliminary idea of what a rtc enabled ACPI
driver for freebsd will look like. Some questions are attached
which will hopefully help clear up some things I saw while
learning about ACPI.
The first part of RTC support is an event handler for the