diff --git a/linuxgraphicsstack/.gitignore b/linuxgraphicsstack/.gitignore new file mode 100644 index 0000000..d04ef8f --- /dev/null +++ b/linuxgraphicsstack/.gitignore @@ -0,0 +1,2 @@ +work/ +out/ diff --git a/linuxgraphicsstack/Makefile b/linuxgraphicsstack/Makefile new file mode 100644 index 0000000..4a1b2c2 --- /dev/null +++ b/linuxgraphicsstack/Makefile @@ -0,0 +1,22 @@ +SRC = ./slides/*.md +TEMP_DIR = ./work/ +TEMP_MD = $(TEMP_DIR)/work.md +OUT_DIR = ./out/ +INCLUDE_DIR = ./media/ + +all: $(OUT_DIR)/index.html + +$(OUT_DIR)/index.html: $(TEMP_MD) + mkdir -p $(OUT_DIR) + mdslides $(TEMP_MD) --include $(INCLUDE_DIR) --output $(OUT_DIR) + +$(TEMP_MD): $(SRC) + mkdir -p $(TEMP_DIR) + cat $(SRC) > $(TEMP_MD) + +preview: $(OUT_DIR)/index.html + xdg-open $(OUT_DIR)/index.html + +clean: + rm -rf $(OUT_DIR)/ + rm -rf $(TEMP_DIR)/ diff --git a/linuxgraphicsstack/README.md b/linuxgraphicsstack/README.md new file mode 100644 index 0000000..be931be --- /dev/null +++ b/linuxgraphicsstack/README.md @@ -0,0 +1,17 @@ +# Linux Graphics Stack + + + +### Building + +Requirements: +- [markdown-slides](https://gitlab.com/da_doomer/markdown-slides) +- GNU Make +- A JS capable web browser + +0. Clone this repository +1. `make clean` +2. `make` +3. `make preview` or open `./out/index.html` in a JS capable web browser + +For instructions on presenting, refer to RevealJS documentation. diff --git a/linuxgraphicsstack/media/Cc-by-nc-sa_icon.svg b/linuxgraphicsstack/media/Cc-by-nc-sa_icon.svg new file mode 100644 index 0000000..7dc79d4 --- /dev/null +++ b/linuxgraphicsstack/media/Cc-by-nc-sa_icon.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/linuxgraphicsstack/media/overview.svg b/linuxgraphicsstack/media/overview.svg new file mode 100644 index 0000000..a15ee23 --- /dev/null +++ b/linuxgraphicsstack/media/overview.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + Hardware + + + + + + + + + + + + Kernel + Program + + Compositor + OpenGL + Vulkan + Mesa + + i915/xe + + iris/crocus + + radeonsi + + nouveau + + anv + + radv + + + nvk + + amdgpu + + nouveau + + DRM & KMS + + + + + + + + diff --git a/linuxgraphicsstack/media/presentationsourceqr.svg b/linuxgraphicsstack/media/presentationsourceqr.svg new file mode 100644 index 0000000..4789730 --- /dev/null +++ b/linuxgraphicsstack/media/presentationsourceqr.svg @@ -0,0 +1,1459 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linuxgraphicsstack/media/vkcube.webm b/linuxgraphicsstack/media/vkcube.webm new file mode 100644 index 0000000..aa9302d Binary files /dev/null and b/linuxgraphicsstack/media/vkcube.webm differ diff --git a/linuxgraphicsstack/slides/00-title.md b/linuxgraphicsstack/slides/00-title.md new file mode 100644 index 0000000..2af480b --- /dev/null +++ b/linuxgraphicsstack/slides/00-title.md @@ -0,0 +1,15 @@ +[comment]: # (THEME = night) +[comment]: # (CODE_THEME = base16/zenburn) + +[comment]: # (controls: true) +[comment]: # (keyboard: true) +[comment]: # (markdown: { smartypants: true }) +[comment]: # (hash: true) +[comment]: # (respondToHashChanges: true) +[comment]: # (slideNumber: 'c/t') +[comment]: # (width: 1280) +[comment]: # (height: 720) + +# Linux Graphics Stack +By Logan G +[comment]: # (!!!) diff --git a/linuxgraphicsstack/slides/01-vkcube.md b/linuxgraphicsstack/slides/01-vkcube.md new file mode 100644 index 0000000..0b05c9b --- /dev/null +++ b/linuxgraphicsstack/slides/01-vkcube.md @@ -0,0 +1,13 @@ + + +Notes: + +Here is an example of a simple graphical program. For those who do not know, this is "vkcube", +a program which, as the name suggests, draws a cube to the screen. + +Suppose I am vkcube. How do I actually get myself onto the screen? + +[comment]: # (!!!) diff --git a/linuxgraphicsstack/slides/02-overview.md b/linuxgraphicsstack/slides/02-overview.md new file mode 100644 index 0000000..0785980 --- /dev/null +++ b/linuxgraphicsstack/slides/02-overview.md @@ -0,0 +1,9 @@ +![Image.](media/overview.svg) + +Notes: + +Well, to start, lets take a look at what we have to work with. This is the simplified overview of the Linux +graphics stack, there are some intermediates that I didn't feel were worth drawing on here, but I will mention most of +them later. To start understanding this problem though, we need to start low. + +[comment]: # (!!!) diff --git a/linuxgraphicsstack/slides/03-hardware.md b/linuxgraphicsstack/slides/03-hardware.md new file mode 100644 index 0000000..ece177d --- /dev/null +++ b/linuxgraphicsstack/slides/03-hardware.md @@ -0,0 +1,40 @@ +
+
+ + +## Hardware + +- Graphics card(s) + - 3D accelerator + - Video RAM + - VBIOS +- Display controller(s) +- Monitor(s) + - EDID + +
+
+ + +![Image.](media/overview.svg) + +
+ +Note: +Starting with: Your hardware. + +In the context of graphics, hardware usually is referring to your graphics card, or GPU for short. This can be something like +an "NVIDIA RTX 2070 SUPER", "AMD Radeon RX 6700 XT", or whatever integrated solution your device has. + +GPUs are pretty complicated beasts, but for today we'll only talk about them on a very high level. +GPUs tend to consist of some sort of 3D accelerator. This is essentially just a massive pool of highly specialized CPU cores. +They also have Video RAM for storing things like game textures, geometry, and the ultimate output that is sent to the screen. +There's also the VBIOS, which is essentially the GPU's firmware. + +However, there are a few more pieces to the puzzle. There are also display controllers, which provide the video outputs. These +are usually found on the GPU itself, but not always. + +There's also of course your monitors, which are not only the ultimate destination, but are also important because they provide information +about themselves using a protocol called EDID, or Extended Display Identification Data. + +[comment]: # (!!!) diff --git a/linuxgraphicsstack/slides/04-kernel.md b/linuxgraphicsstack/slides/04-kernel.md new file mode 100644 index 0000000..90b499e --- /dev/null +++ b/linuxgraphicsstack/slides/04-kernel.md @@ -0,0 +1,41 @@ +
+
+ + +## Linux Kernel + +- Communicates "directly" with hardware + - Provides drivers + - Initializes hardware +- Provides HAL +- Provides userspace APIs + - Provides planes for userspace to draw to + +
+
+ + +![Image.](media/overview.svg) + +
+ +Notes: +Then there's the beloved Linux kernel. + +Being that it is a kernel, one of it's main jobs is to communicate with the hardware. It does this through the use of drivers, +which provides the rest of the kernel with a stable interface. + +Popular examples of these drivers are: +- i915 and xe, which are for Intel GPUs +- amdgpu, which is for AMD GPUs +- And nouveau, which is for NVIDIA. + +There are quite a few more than this, but I'd be here all day if I talked about them. + +The kernel also brings up the hardware to a usable state so that userspace can communicate with it. + +Userspace can communicate with the graphics hardware using a Hardware Abstraction Layer, which in the kernel +is provided by the Direct Rendering Manager and the Kernel Mode Setting interface. + + +[comment]: # (!!!) diff --git a/linuxgraphicsstack/slides/05-mesa.md b/linuxgraphicsstack/slides/05-mesa.md new file mode 100644 index 0000000..9b57fe0 --- /dev/null +++ b/linuxgraphicsstack/slides/05-mesa.md @@ -0,0 +1,30 @@ +
+
+ + +## Mesa + +- Provides 3D acceleration, GPU compute and HW accelerated video + - OpenGL + - OpenGL ES + - Vulkan + - OpenCL +- Provides userspace API for drawing to the screen + - OpenGL EGL/GLX + - Vulkan WSI + - Direct draw with OpenGL or Vulkan +
+
+ + +![Image.](media/overview.svg) + +
+ +Notes: + +EGL - Kronos Native Platform Graphics Interface +GLX - OpenGL Extension to the X Window System +WSI - Window System Integration + +[comment]: # (!!!) diff --git a/linuxgraphicsstack/slides/06-compositor.md b/linuxgraphicsstack/slides/06-compositor.md new file mode 100644 index 0000000..1d371d8 --- /dev/null +++ b/linuxgraphicsstack/slides/06-compositor.md @@ -0,0 +1,17 @@ +
+
+ + +## Compositor + +- Provides an API for programs to draw to the screen +
+
+ + +![Image.](media/overview.svg) + +
+ + +[comment]: # (!!!) diff --git a/linuxgraphicsstack/slides/98-source.md b/linuxgraphicsstack/slides/98-source.md new file mode 100644 index 0000000..df598a8 --- /dev/null +++ b/linuxgraphicsstack/slides/98-source.md @@ -0,0 +1,10 @@ +![Presentation Source QR](media/presentationsourceqr.svg) + +[Presentation Source](https://git.qtechofficial.com/logan/presentations/src/branch/master/linuxgraphicsstack) + +
+ +This presentation is licensed under [CC-BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en) + +![CC-BY-NC-SA Icon](media/Cc-by-nc-sa_icon.svg) +[comment]: # (!!!) diff --git a/linuxgraphicsstack/slides/99-funfacts.md b/linuxgraphicsstack/slides/99-funfacts.md new file mode 100644 index 0000000..bcc6f82 --- /dev/null +++ b/linuxgraphicsstack/slides/99-funfacts.md @@ -0,0 +1,8 @@ +## Fun Facts: + +This presentation took 0 hours + +
+ +Made with [markdown-slides](https://gitlab.com/da_doomer/markdown-slides) + reveal.js +[comment]: # (!!!) diff --git a/linuxgraphicsstack/source/overview.svgz b/linuxgraphicsstack/source/overview.svgz new file mode 100644 index 0000000..7b721b9 Binary files /dev/null and b/linuxgraphicsstack/source/overview.svgz differ