"Hands-on Projects for the Linux Graphics Subsystem" by Christos Karayiannis provides structured exercises for understanding the Linux graphics stack, including PCI configuration access, framebuffer manipulation, and request analysis. The guide covers essential topics for developers, ranging from user-space interaction to modern DRM/KMS drivers. For a detailed, project-based introduction, see this Amazon listing for the eBook . Hands-on Projects for the Linux Graphics Subsystem eBook

  • Set up a wlr_cursor with wlr_input_device (libinput) for mouse.
  • Run the main loop: wl_display_run(display).
    1. Clone Mesa:
      git clone https://gitlab.freedesktop.org/mesa/mesa.git
      cd mesa
      
    2. Find the shader compilation path: For i965 (Intel) or AMDGPU (radeonsi), look in src/mesa/drivers/dri/i965/brw_program.c for brw_link_shader().
    3. Add your hook:
      static void brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) 
          fprintf(stderr, "[HANDS-ON] Shader %s compiled at %lld\n", 
                  shProg->Name, 
                  (long long)time(NULL));
          // original code continues...
      

      Implementation Steps

      Use atomic DRM APIs to set a display mode on a connector and flip between two framebuffers.