122554020SJani Nikula=========================== 2ca00c2b9SJani Nikula drm/i915 Intel GFX Driver 322554020SJani Nikula=========================== 4ca00c2b9SJani Nikula 5ca00c2b9SJani NikulaThe drm/i915 driver supports all (with the exception of some very early 6ca00c2b9SJani Nikulamodels) integrated GFX chipsets with both Intel display and rendering 7ca00c2b9SJani Nikulablocks. This excludes a set of SoC platforms with an SGX rendering unit, 8ca00c2b9SJani Nikulathose have basic support through the gma500 drm driver. 9ca00c2b9SJani Nikula 10ca00c2b9SJani NikulaCore Driver Infrastructure 1122554020SJani Nikula========================== 12ca00c2b9SJani Nikula 13ca00c2b9SJani NikulaThis section covers core driver infrastructure used by both the display 14ca00c2b9SJani Nikulaand the GEM parts of the driver. 15ca00c2b9SJani Nikula 16ca00c2b9SJani NikulaRuntime Power Management 1722554020SJani Nikula------------------------ 18ca00c2b9SJani Nikula 19ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_runtime_pm.c 20ca00c2b9SJani Nikula :doc: runtime pm 21ca00c2b9SJani Nikula 22ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_runtime_pm.c 23ca00c2b9SJani Nikula :internal: 24ca00c2b9SJani Nikula 25ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_uncore.c 26ca00c2b9SJani Nikula :internal: 27ca00c2b9SJani Nikula 28ca00c2b9SJani NikulaInterrupt Handling 2922554020SJani Nikula------------------ 30ca00c2b9SJani Nikula 31ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c 32ca00c2b9SJani Nikula :doc: interrupt handling 33ca00c2b9SJani Nikula 34ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c 35ca00c2b9SJani Nikula :functions: intel_irq_init intel_irq_init_hw intel_hpd_init 36ca00c2b9SJani Nikula 37ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c 38ca00c2b9SJani Nikula :functions: intel_runtime_pm_disable_interrupts 39ca00c2b9SJani Nikula 40ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c 41ca00c2b9SJani Nikula :functions: intel_runtime_pm_enable_interrupts 42ca00c2b9SJani Nikula 43ca00c2b9SJani NikulaIntel GVT-g Guest Support(vGPU) 4422554020SJani Nikula------------------------------- 45ca00c2b9SJani Nikula 46ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_vgpu.c 47ca00c2b9SJani Nikula :doc: Intel GVT-g guest support 48ca00c2b9SJani Nikula 49ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_vgpu.c 50ca00c2b9SJani Nikula :internal: 51ca00c2b9SJani Nikula 5222681c7bSZhenyu WangIntel GVT-g Host Support(vGPU device model) 5322681c7bSZhenyu Wang------------------------------------------- 5422681c7bSZhenyu Wang 5522681c7bSZhenyu Wang.. kernel-doc:: drivers/gpu/drm/i915/intel_gvt.c 5622681c7bSZhenyu Wang :doc: Intel GVT-g host support 5722681c7bSZhenyu Wang 5822681c7bSZhenyu Wang.. kernel-doc:: drivers/gpu/drm/i915/intel_gvt.c 5922681c7bSZhenyu Wang :internal: 6022681c7bSZhenyu Wang 617d3c425fSOscar MateoWorkarounds 627d3c425fSOscar Mateo----------- 637d3c425fSOscar Mateo 64bcc8737dSMauro Carvalho Chehab.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_workarounds.c 657d3c425fSOscar Mateo :doc: Hardware workarounds 667d3c425fSOscar Mateo 67ca00c2b9SJani NikulaDisplay Hardware Handling 6822554020SJani Nikula========================= 69ca00c2b9SJani Nikula 70ca00c2b9SJani NikulaThis section covers everything related to the display hardware including 71ca00c2b9SJani Nikulathe mode setting infrastructure, plane, sprite and cursor handling and 72ca00c2b9SJani Nikuladisplay, output probing and related topics. 73ca00c2b9SJani Nikula 74ca00c2b9SJani NikulaMode Setting Infrastructure 7522554020SJani Nikula--------------------------- 76ca00c2b9SJani Nikula 77ca00c2b9SJani NikulaThe i915 driver is thus far the only DRM driver which doesn't use the 78ca00c2b9SJani Nikulacommon DRM helper code to implement mode setting sequences. Thus it has 79ca00c2b9SJani Nikulaits own tailor-made infrastructure for executing a display configuration 80ca00c2b9SJani Nikulachange. 81ca00c2b9SJani Nikula 82ca00c2b9SJani NikulaFrontbuffer Tracking 8322554020SJani Nikula-------------------- 84ca00c2b9SJani Nikula 856800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_frontbuffer.c 86ca00c2b9SJani Nikula :doc: frontbuffer tracking 87ca00c2b9SJani Nikula 886800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_frontbuffer.h 895d723d7aSChris Wilson :internal: 905d723d7aSChris Wilson 916800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_frontbuffer.c 92ca00c2b9SJani Nikula :internal: 93ca00c2b9SJani Nikula 94ca00c2b9SJani NikulaDisplay FIFO Underrun Reporting 9522554020SJani Nikula------------------------------- 96ca00c2b9SJani Nikula 976800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fifo_underrun.c 98ca00c2b9SJani Nikula :doc: fifo underrun handling 99ca00c2b9SJani Nikula 1006800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fifo_underrun.c 101ca00c2b9SJani Nikula :internal: 102ca00c2b9SJani Nikula 103ca00c2b9SJani NikulaPlane Configuration 10422554020SJani Nikula------------------- 105ca00c2b9SJani Nikula 106ca00c2b9SJani NikulaThis section covers plane configuration and composition with the primary 107ca00c2b9SJani Nikulaplane, sprites, cursors and overlays. This includes the infrastructure 108ca00c2b9SJani Nikulato do atomic vsync'ed updates of all this state and also tightly coupled 109ca00c2b9SJani Nikulatopics like watermark setup and computation, framebuffer compression and 110ca00c2b9SJani Nikulapanel self refresh. 111ca00c2b9SJani Nikula 112ca00c2b9SJani NikulaAtomic Plane Helpers 11322554020SJani Nikula-------------------- 114ca00c2b9SJani Nikula 1156800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_atomic_plane.c 116ca00c2b9SJani Nikula :doc: atomic plane helpers 117ca00c2b9SJani Nikula 1186800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_atomic_plane.c 119ca00c2b9SJani Nikula :internal: 120ca00c2b9SJani Nikula 121ca00c2b9SJani NikulaOutput Probing 12222554020SJani Nikula-------------- 123ca00c2b9SJani Nikula 124ca00c2b9SJani NikulaThis section covers output probing and related infrastructure like the 125ca00c2b9SJani Nikulahotplug interrupt storm detection and mitigation code. Note that the 126ca00c2b9SJani Nikulai915 driver still uses most of the common DRM helper code for output 127ca00c2b9SJani Nikulaprobing, so those sections fully apply. 128ca00c2b9SJani Nikula 129ca00c2b9SJani NikulaHotplug 13022554020SJani Nikula------- 131ca00c2b9SJani Nikula 1326800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_hotplug.c 133ca00c2b9SJani Nikula :doc: Hotplug 134ca00c2b9SJani Nikula 1356800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_hotplug.c 136ca00c2b9SJani Nikula :internal: 137ca00c2b9SJani Nikula 138ca00c2b9SJani NikulaHigh Definition Audio 13922554020SJani Nikula--------------------- 140ca00c2b9SJani Nikula 1416800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_audio.c 142ca00c2b9SJani Nikula :doc: High Definition Audio over HDMI and Display Port 143ca00c2b9SJani Nikula 1446800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_audio.c 145ca00c2b9SJani Nikula :internal: 146ca00c2b9SJani Nikula 147ca00c2b9SJani Nikula.. kernel-doc:: include/drm/i915_component.h 148ca00c2b9SJani Nikula :internal: 149ca00c2b9SJani Nikula 150eacc8dafSTakashi IwaiIntel HDMI LPE Audio Support 151eacc8dafSTakashi Iwai---------------------------- 152eacc8dafSTakashi Iwai 1536800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_lpe_audio.c 154eacc8dafSTakashi Iwai :doc: LPE Audio integration for HDMI or DP playback 155eacc8dafSTakashi Iwai 1566800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_lpe_audio.c 157eacc8dafSTakashi Iwai :internal: 158eacc8dafSTakashi Iwai 159ca00c2b9SJani NikulaPanel Self Refresh PSR (PSR/SRD) 16022554020SJani Nikula-------------------------------- 161ca00c2b9SJani Nikula 1626800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_psr.c 163ca00c2b9SJani Nikula :doc: Panel Self Refresh (PSR/SRD) 164ca00c2b9SJani Nikula 1656800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_psr.c 166ca00c2b9SJani Nikula :internal: 167ca00c2b9SJani Nikula 168ca00c2b9SJani NikulaFrame Buffer Compression (FBC) 16922554020SJani Nikula------------------------------ 170ca00c2b9SJani Nikula 1716800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fbc.c 172ca00c2b9SJani Nikula :doc: Frame Buffer Compression (FBC) 173ca00c2b9SJani Nikula 1746800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fbc.c 175ca00c2b9SJani Nikula :internal: 176ca00c2b9SJani Nikula 177ca00c2b9SJani NikulaDisplay Refresh Rate Switching (DRRS) 17822554020SJani Nikula------------------------------------- 179ca00c2b9SJani Nikula 1806800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dp.c 181ca00c2b9SJani Nikula :doc: Display Refresh Rate Switching (DRRS) 182ca00c2b9SJani Nikula 1836800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dp.c 184ca00c2b9SJani Nikula :functions: intel_dp_set_drrs_state 185ca00c2b9SJani Nikula 1866800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dp.c 187ca00c2b9SJani Nikula :functions: intel_edp_drrs_enable 188ca00c2b9SJani Nikula 1896800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dp.c 190ca00c2b9SJani Nikula :functions: intel_edp_drrs_disable 191ca00c2b9SJani Nikula 1926800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dp.c 193ca00c2b9SJani Nikula :functions: intel_edp_drrs_invalidate 194ca00c2b9SJani Nikula 1956800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dp.c 196ca00c2b9SJani Nikula :functions: intel_edp_drrs_flush 197ca00c2b9SJani Nikula 1986800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dp.c 199ca00c2b9SJani Nikula :functions: intel_dp_drrs_init 200ca00c2b9SJani Nikula 201ca00c2b9SJani NikulaDPIO 20222554020SJani Nikula---- 203ca00c2b9SJani Nikula 2046800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpio_phy.c 205ca00c2b9SJani Nikula :doc: DPIO 206ca00c2b9SJani Nikula 207ca00c2b9SJani NikulaCSR firmware support for DMC 20822554020SJani Nikula---------------------------- 209ca00c2b9SJani Nikula 210ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_csr.c 211ca00c2b9SJani Nikula :doc: csr support for dmc 212ca00c2b9SJani Nikula 213ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_csr.c 214ca00c2b9SJani Nikula :internal: 215ca00c2b9SJani Nikula 216ca00c2b9SJani NikulaVideo BIOS Table (VBT) 21722554020SJani Nikula---------------------- 218ca00c2b9SJani Nikula 2196800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_bios.c 220ca00c2b9SJani Nikula :doc: Video BIOS Table (VBT) 221ca00c2b9SJani Nikula 2226800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_bios.c 223ca00c2b9SJani Nikula :internal: 224ca00c2b9SJani Nikula 2256800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_vbt_defs.h 226ca00c2b9SJani Nikula :internal: 227ca00c2b9SJani Nikula 2287ff89ca2SVille SyrjäläDisplay clocks 2297ff89ca2SVille Syrjälä-------------- 2307ff89ca2SVille Syrjälä 2316800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_cdclk.c 2327ff89ca2SVille Syrjälä :doc: CDCLK / RAWCLK 2337ff89ca2SVille Syrjälä 2346800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_cdclk.c 2357ff89ca2SVille Syrjälä :internal: 2367ff89ca2SVille Syrjälä 237294591cfSAnder Conselvan de OliveiraDisplay PLLs 238294591cfSAnder Conselvan de Oliveira------------ 239294591cfSAnder Conselvan de Oliveira 2406800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.c 241294591cfSAnder Conselvan de Oliveira :doc: Display PLLs 242294591cfSAnder Conselvan de Oliveira 2436800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.c 244294591cfSAnder Conselvan de Oliveira :internal: 245294591cfSAnder Conselvan de Oliveira 2466800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.h 247294591cfSAnder Conselvan de Oliveira :internal: 248294591cfSAnder Conselvan de Oliveira 2495dd85e72SAnimesh MannaDisplay State Buffer 2505dd85e72SAnimesh Manna-------------------- 2515dd85e72SAnimesh Manna 2525dd85e72SAnimesh Manna.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dsb.c 2535dd85e72SAnimesh Manna :doc: DSB 2545dd85e72SAnimesh Manna 2555dd85e72SAnimesh Manna.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dsb.c 2565dd85e72SAnimesh Manna :internal: 2575dd85e72SAnimesh Manna 258ca00c2b9SJani NikulaMemory Management and Command Submission 25922554020SJani Nikula======================================== 260ca00c2b9SJani Nikula 261ca00c2b9SJani NikulaThis sections covers all things related to the GEM implementation in the 262ca00c2b9SJani Nikulai915 driver. 263ca00c2b9SJani Nikula 264fd5ff5f6SKevin RogovinIntel GPU Basics 265fd5ff5f6SKevin Rogovin---------------- 266fd5ff5f6SKevin Rogovin 267fd5ff5f6SKevin RogovinAn Intel GPU has multiple engines. There are several engine types. 268fd5ff5f6SKevin Rogovin 269fd5ff5f6SKevin Rogovin- RCS engine is for rendering 3D and performing compute, this is named 270fd5ff5f6SKevin Rogovin `I915_EXEC_RENDER` in user space. 271fd5ff5f6SKevin Rogovin- BCS is a blitting (copy) engine, this is named `I915_EXEC_BLT` in user 272fd5ff5f6SKevin Rogovin space. 273fd5ff5f6SKevin Rogovin- VCS is a video encode and decode engine, this is named `I915_EXEC_BSD` 274fd5ff5f6SKevin Rogovin in user space 275fd5ff5f6SKevin Rogovin- VECS is video enhancement engine, this is named `I915_EXEC_VEBOX` in user 276fd5ff5f6SKevin Rogovin space. 277fd5ff5f6SKevin Rogovin- The enumeration `I915_EXEC_DEFAULT` does not refer to specific engine; 278fd5ff5f6SKevin Rogovin instead it is to be used by user space to specify a default rendering 279fd5ff5f6SKevin Rogovin engine (for 3D) that may or may not be the same as RCS. 280fd5ff5f6SKevin Rogovin 281fd5ff5f6SKevin RogovinThe Intel GPU family is a family of integrated GPU's using Unified 282fd5ff5f6SKevin RogovinMemory Access. For having the GPU "do work", user space will feed the 283fd5ff5f6SKevin RogovinGPU batch buffers via one of the ioctls `DRM_IOCTL_I915_GEM_EXECBUFFER2` 284fd5ff5f6SKevin Rogovinor `DRM_IOCTL_I915_GEM_EXECBUFFER2_WR`. Most such batchbuffers will 285fd5ff5f6SKevin Rogovininstruct the GPU to perform work (for example rendering) and that work 286fd5ff5f6SKevin Rogovinneeds memory from which to read and memory to which to write. All memory 287fd5ff5f6SKevin Rogovinis encapsulated within GEM buffer objects (usually created with the ioctl 288fd5ff5f6SKevin Rogovin`DRM_IOCTL_I915_GEM_CREATE`). An ioctl providing a batchbuffer for the GPU 289fd5ff5f6SKevin Rogovinto create will also list all GEM buffer objects that the batchbuffer reads 290fd5ff5f6SKevin Rogovinand/or writes. For implementation details of memory management see 291fd5ff5f6SKevin Rogovin`GEM BO Management Implementation Details`_. 292fd5ff5f6SKevin Rogovin 293fd5ff5f6SKevin RogovinThe i915 driver allows user space to create a context via the ioctl 294fd5ff5f6SKevin Rogovin`DRM_IOCTL_I915_GEM_CONTEXT_CREATE` which is identified by a 32-bit 295fd5ff5f6SKevin Rogovininteger. Such a context should be viewed by user-space as -loosely- 296fd5ff5f6SKevin Rogovinanalogous to the idea of a CPU process of an operating system. The i915 297fd5ff5f6SKevin Rogovindriver guarantees that commands issued to a fixed context are to be 298fd5ff5f6SKevin Rogovinexecuted so that writes of a previously issued command are seen by 299fd5ff5f6SKevin Rogovinreads of following commands. Actions issued between different contexts 300fd5ff5f6SKevin Rogovin(even if from the same file descriptor) are NOT given that guarantee 301fd5ff5f6SKevin Rogovinand the only way to synchronize across contexts (even from the same 302fd5ff5f6SKevin Rogovinfile descriptor) is through the use of fences. At least as far back as 303fd5ff5f6SKevin RogovinGen4, also have that a context carries with it a GPU HW context; 304fd5ff5f6SKevin Rogovinthe HW context is essentially (most of atleast) the state of a GPU. 305fd5ff5f6SKevin RogovinIn addition to the ordering guarantees, the kernel will restore GPU 306fd5ff5f6SKevin Rogovinstate via HW context when commands are issued to a context, this saves 307fd5ff5f6SKevin Rogovinuser space the need to restore (most of atleast) the GPU state at the 308fd5ff5f6SKevin Rogovinstart of each batchbuffer. The non-deprecated ioctls to submit batchbuffer 309fd5ff5f6SKevin Rogovinwork can pass that ID (in the lower bits of drm_i915_gem_execbuffer2::rsvd1) 310fd5ff5f6SKevin Rogovinto identify what context to use with the command. 311fd5ff5f6SKevin Rogovin 312fd5ff5f6SKevin RogovinThe GPU has its own memory management and address space. The kernel 313fd5ff5f6SKevin Rogovindriver maintains the memory translation table for the GPU. For older 314fd5ff5f6SKevin RogovinGPUs (i.e. those before Gen8), there is a single global such translation 315fd5ff5f6SKevin Rogovintable, a global Graphics Translation Table (GTT). For newer generation 316fd5ff5f6SKevin RogovinGPUs each context has its own translation table, called Per-Process 317fd5ff5f6SKevin RogovinGraphics Translation Table (PPGTT). Of important note, is that although 318fd5ff5f6SKevin RogovinPPGTT is named per-process it is actually per context. When user space 319fd5ff5f6SKevin Rogovinsubmits a batchbuffer, the kernel walks the list of GEM buffer objects 320fd5ff5f6SKevin Rogovinused by the batchbuffer and guarantees that not only is the memory of 321fd5ff5f6SKevin Rogovineach such GEM buffer object resident but it is also present in the 322fd5ff5f6SKevin Rogovin(PP)GTT. If the GEM buffer object is not yet placed in the (PP)GTT, 323fd5ff5f6SKevin Rogovinthen it is given an address. Two consequences of this are: the kernel 324fd5ff5f6SKevin Rogovinneeds to edit the batchbuffer submitted to write the correct value of 325fd5ff5f6SKevin Rogovinthe GPU address when a GEM BO is assigned a GPU address and the kernel 326fd5ff5f6SKevin Rogovinmight evict a different GEM BO from the (PP)GTT to make address room 327fd5ff5f6SKevin Rogovinfor another GEM BO. Consequently, the ioctls submitting a batchbuffer 328fd5ff5f6SKevin Rogovinfor execution also include a list of all locations within buffers that 329fd5ff5f6SKevin Rogovinrefer to GPU-addresses so that the kernel can edit the buffer correctly. 330fd5ff5f6SKevin RogovinThis process is dubbed relocation. 331fd5ff5f6SKevin Rogovin 332fd5ff5f6SKevin RogovinGEM BO Management Implementation Details 333fd5ff5f6SKevin Rogovin---------------------------------------- 334fd5ff5f6SKevin Rogovin 335fd5ff5f6SKevin Rogovin.. kernel-doc:: drivers/gpu/drm/i915/i915_vma.h 336fd5ff5f6SKevin Rogovin :doc: Virtual Memory Address 337fd5ff5f6SKevin Rogovin 338fd5ff5f6SKevin RogovinBuffer Object Eviction 339fd5ff5f6SKevin Rogovin---------------------- 340fd5ff5f6SKevin Rogovin 341fd5ff5f6SKevin RogovinThis section documents the interface functions for evicting buffer 342fd5ff5f6SKevin Rogovinobjects to make space available in the virtual gpu address spaces. Note 343fd5ff5f6SKevin Rogovinthat this is mostly orthogonal to shrinking buffer objects caches, which 344fd5ff5f6SKevin Rogovinhas the goal to make main memory (shared with the gpu through the 345fd5ff5f6SKevin Rogovinunified memory architecture) available. 346fd5ff5f6SKevin Rogovin 347fd5ff5f6SKevin Rogovin.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_evict.c 348fd5ff5f6SKevin Rogovin :internal: 349fd5ff5f6SKevin Rogovin 350fd5ff5f6SKevin RogovinBuffer Object Memory Shrinking 351fd5ff5f6SKevin Rogovin------------------------------ 352fd5ff5f6SKevin Rogovin 353fd5ff5f6SKevin RogovinThis section documents the interface function for shrinking memory usage 354fd5ff5f6SKevin Rogovinof buffer object caches. Shrinking is used to make main memory 355fd5ff5f6SKevin Rogovinavailable. Note that this is mostly orthogonal to evicting buffer 356fd5ff5f6SKevin Rogovinobjects, which has the goal to make space in gpu virtual address spaces. 357fd5ff5f6SKevin Rogovin 3588a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c 359fd5ff5f6SKevin Rogovin :internal: 360fd5ff5f6SKevin Rogovin 361ca00c2b9SJani NikulaBatchbuffer Parsing 36222554020SJani Nikula------------------- 363ca00c2b9SJani Nikula 364ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c 365ca00c2b9SJani Nikula :doc: batch buffer command parser 366ca00c2b9SJani Nikula 367ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c 368ca00c2b9SJani Nikula :internal: 369ca00c2b9SJani Nikula 3704d42db18SKevin RogovinUser Batchbuffer Execution 3714d42db18SKevin Rogovin-------------------------- 3724d42db18SKevin Rogovin 3738a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c 3744d42db18SKevin Rogovin :doc: User command execution 3754d42db18SKevin Rogovin 376ca00c2b9SJani NikulaLogical Rings, Logical Ring Contexts and Execlists 37722554020SJani Nikula-------------------------------------------------- 378ca00c2b9SJani Nikula 379bcc8737dSMauro Carvalho Chehab.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_lrc.c 380ca00c2b9SJani Nikula :doc: Logical Rings, Logical Ring Contexts and Execlists 381ca00c2b9SJani Nikula 382ca00c2b9SJani NikulaGlobal GTT views 38322554020SJani Nikula---------------- 384ca00c2b9SJani Nikula 385ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_gtt.c 386ca00c2b9SJani Nikula :doc: Global GTT views 387ca00c2b9SJani Nikula 388ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_gtt.c 389ca00c2b9SJani Nikula :internal: 390ca00c2b9SJani Nikula 391ca00c2b9SJani NikulaGTT Fences and Swizzling 39222554020SJani Nikula------------------------ 393ca00c2b9SJani Nikula 394ebc896dbSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_fence_reg.c 395ca00c2b9SJani Nikula :internal: 396ca00c2b9SJani Nikula 397ca00c2b9SJani NikulaGlobal GTT Fence Handling 39822554020SJani Nikula~~~~~~~~~~~~~~~~~~~~~~~~~ 399ca00c2b9SJani Nikula 400ebc896dbSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_fence_reg.c 401ca00c2b9SJani Nikula :doc: fence register handling 402ca00c2b9SJani Nikula 403ca00c2b9SJani NikulaHardware Tiling and Swizzling Details 40422554020SJani Nikula~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 405ca00c2b9SJani Nikula 406ebc896dbSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_fence_reg.c 407ca00c2b9SJani Nikula :doc: tiling swizzling details 408ca00c2b9SJani Nikula 409ca00c2b9SJani NikulaObject Tiling IOCTLs 41022554020SJani Nikula-------------------- 411ca00c2b9SJani Nikula 4128a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c 413ca00c2b9SJani Nikula :internal: 414ca00c2b9SJani Nikula 4158a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c 416ca00c2b9SJani Nikula :doc: buffer object tiling 417ca00c2b9SJani Nikula 418493065e2SDaniele Ceraolo SpurioMicrocontrollers 419493065e2SDaniele Ceraolo Spurio================ 420493065e2SDaniele Ceraolo Spurio 421493065e2SDaniele Ceraolo SpurioStarting from gen9, three microcontrollers are available on the HW: the 422493065e2SDaniele Ceraolo Spuriographics microcontroller (GuC), the HEVC/H.265 microcontroller (HuC) and the 423493065e2SDaniele Ceraolo Spuriodisplay microcontroller (DMC). The driver is responsible for loading the 424493065e2SDaniele Ceraolo Spuriofirmwares on the microcontrollers; the GuC and HuC firmwares are transferred 425493065e2SDaniele Ceraolo Spurioto WOPCM using the DMA engine, while the DMC firmware is written through MMIO. 426493065e2SDaniele Ceraolo Spurio 427fbe6f8f2SYaodong LiWOPCM 4284072761bSJoonas Lahtinen----- 429fbe6f8f2SYaodong Li 430fbe6f8f2SYaodong LiWOPCM Layout 4314072761bSJoonas Lahtinen~~~~~~~~~~~~ 432fbe6f8f2SYaodong Li 433fbe6f8f2SYaodong Li.. kernel-doc:: drivers/gpu/drm/i915/intel_wopcm.c 434fbe6f8f2SYaodong Li :doc: WOPCM Layout 435fbe6f8f2SYaodong Li 436ca00c2b9SJani NikulaGuC 4374072761bSJoonas Lahtinen--- 438ca00c2b9SJani Nikula 439218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 440218151e9SDaniele Ceraolo Spurio :doc: GuC 441218151e9SDaniele Ceraolo Spurio 442218151e9SDaniele Ceraolo SpurioGuC Firmware Layout 443218151e9SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~ 444199dddedSMichal Wajdeczko 445abf30f23SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h 446199dddedSMichal Wajdeczko :doc: Firmware Layout 447199dddedSMichal Wajdeczko 448218151e9SDaniele Ceraolo SpurioGuC Memory Management 449218151e9SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~~~ 450218151e9SDaniele Ceraolo Spurio 451218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 452218151e9SDaniele Ceraolo Spurio :doc: GuC Memory Management 453218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 454218151e9SDaniele Ceraolo Spurio :functions: intel_guc_allocate_vma 455218151e9SDaniele Ceraolo Spurio 456218151e9SDaniele Ceraolo Spurio 457ca00c2b9SJani NikulaGuC-specific firmware loader 4584072761bSJoonas Lahtinen~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 459ca00c2b9SJani Nikula 460dbbff8c3SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c 461ca00c2b9SJani Nikula :internal: 462ca00c2b9SJani Nikula 463ca00c2b9SJani NikulaGuC-based command submission 4644072761bSJoonas Lahtinen~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 465ca00c2b9SJani Nikula 466dbbff8c3SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 467ca00c2b9SJani Nikula :doc: GuC-based command submission 468ca00c2b9SJani Nikula 469dbbff8c3SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 470ca00c2b9SJani Nikula :internal: 471ca00c2b9SJani Nikula 472493065e2SDaniele Ceraolo SpurioHuC 473493065e2SDaniele Ceraolo Spurio--- 474*0b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 475*0b23e2a6SDaniele Ceraolo Spurio :doc: HuC 476*0b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 477*0b23e2a6SDaniele Ceraolo Spurio :functions: intel_huc_auth 478*0b23e2a6SDaniele Ceraolo Spurio 479*0b23e2a6SDaniele Ceraolo SpurioHuC Memory Management 480*0b23e2a6SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~~~ 481*0b23e2a6SDaniele Ceraolo Spurio 482*0b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 483*0b23e2a6SDaniele Ceraolo Spurio :doc: HuC Memory Management 484*0b23e2a6SDaniele Ceraolo Spurio 485*0b23e2a6SDaniele Ceraolo SpurioHuC Firmware Layout 486*0b23e2a6SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~ 487*0b23e2a6SDaniele Ceraolo SpurioThe HuC FW layout is the same as the GuC one, see `GuC Firmware Layout`_ 488493065e2SDaniele Ceraolo Spurio 489493065e2SDaniele Ceraolo SpurioDMC 490493065e2SDaniele Ceraolo Spurio--- 491493065e2SDaniele Ceraolo SpurioSee `CSR firmware support for DMC`_ 492493065e2SDaniele Ceraolo Spurio 493ca00c2b9SJani NikulaTracing 49422554020SJani Nikula======= 495ca00c2b9SJani Nikula 496ca00c2b9SJani NikulaThis sections covers all things related to the tracepoints implemented 497ca00c2b9SJani Nikulain the i915 driver. 498ca00c2b9SJani Nikula 499ca00c2b9SJani Nikulai915_ppgtt_create and i915_ppgtt_release 50022554020SJani Nikula---------------------------------------- 501ca00c2b9SJani Nikula 502ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 503ca00c2b9SJani Nikula :doc: i915_ppgtt_create and i915_ppgtt_release tracepoints 504ca00c2b9SJani Nikula 505ca00c2b9SJani Nikulai915_context_create and i915_context_free 50622554020SJani Nikula----------------------------------------- 507ca00c2b9SJani Nikula 508ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 509ca00c2b9SJani Nikula :doc: i915_context_create and i915_context_free tracepoints 510ca00c2b9SJani Nikula 51116d98b31SRobert BraggPerf 51216d98b31SRobert Bragg==== 51316d98b31SRobert Bragg 51416d98b31SRobert BraggOverview 51516d98b31SRobert Bragg-------- 51616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 51716d98b31SRobert Bragg :doc: i915 Perf Overview 51816d98b31SRobert Bragg 51916d98b31SRobert BraggComparison with Core Perf 52016d98b31SRobert Bragg------------------------- 52116d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 52216d98b31SRobert Bragg :doc: i915 Perf History and Comparison with Core Perf 52316d98b31SRobert Bragg 52416d98b31SRobert Braggi915 Driver Entry Points 52516d98b31SRobert Bragg------------------------ 52616d98b31SRobert Bragg 52716d98b31SRobert BraggThis section covers the entrypoints exported outside of i915_perf.c to 52816d98b31SRobert Braggintegrate with drm/i915 and to handle the `DRM_I915_PERF_OPEN` ioctl. 52916d98b31SRobert Bragg 53016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 53116d98b31SRobert Bragg :functions: i915_perf_init 53216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 53316d98b31SRobert Bragg :functions: i915_perf_fini 53416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 53516d98b31SRobert Bragg :functions: i915_perf_register 53616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 53716d98b31SRobert Bragg :functions: i915_perf_unregister 53816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 53916d98b31SRobert Bragg :functions: i915_perf_open_ioctl 54016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 54116d98b31SRobert Bragg :functions: i915_perf_release 542f89823c2SLionel Landwerlin.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 543f89823c2SLionel Landwerlin :functions: i915_perf_add_config_ioctl 544f89823c2SLionel Landwerlin.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 545f89823c2SLionel Landwerlin :functions: i915_perf_remove_config_ioctl 54616d98b31SRobert Bragg 54716d98b31SRobert Braggi915 Perf Stream 54816d98b31SRobert Bragg---------------- 54916d98b31SRobert Bragg 55016d98b31SRobert BraggThis section covers the stream-semantics-agnostic structures and functions 55116d98b31SRobert Braggfor representing an i915 perf stream FD and associated file operations. 55216d98b31SRobert Bragg 55316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_drv.h 55416d98b31SRobert Bragg :functions: i915_perf_stream 55516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_drv.h 55616d98b31SRobert Bragg :functions: i915_perf_stream_ops 55716d98b31SRobert Bragg 55816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 55916d98b31SRobert Bragg :functions: read_properties_unlocked 56016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56116d98b31SRobert Bragg :functions: i915_perf_open_ioctl_locked 56216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56316d98b31SRobert Bragg :functions: i915_perf_destroy_locked 56416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56516d98b31SRobert Bragg :functions: i915_perf_read 56616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56716d98b31SRobert Bragg :functions: i915_perf_ioctl 56816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56916d98b31SRobert Bragg :functions: i915_perf_enable_locked 57016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 57116d98b31SRobert Bragg :functions: i915_perf_disable_locked 57216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 57316d98b31SRobert Bragg :functions: i915_perf_poll 57416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 57516d98b31SRobert Bragg :functions: i915_perf_poll_locked 57616d98b31SRobert Bragg 57716d98b31SRobert Braggi915 Perf Observation Architecture Stream 57816d98b31SRobert Bragg----------------------------------------- 57916d98b31SRobert Bragg 58016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_drv.h 58116d98b31SRobert Bragg :functions: i915_oa_ops 58216d98b31SRobert Bragg 58316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 58416d98b31SRobert Bragg :functions: i915_oa_stream_init 58516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 58616d98b31SRobert Bragg :functions: i915_oa_read 58716d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 58816d98b31SRobert Bragg :functions: i915_oa_stream_enable 58916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 59016d98b31SRobert Bragg :functions: i915_oa_stream_disable 59116d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 59216d98b31SRobert Bragg :functions: i915_oa_wait_unlocked 59316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 59416d98b31SRobert Bragg :functions: i915_oa_poll_wait 59516d98b31SRobert Bragg 59616d98b31SRobert BraggAll i915 Perf Internals 59716d98b31SRobert Bragg----------------------- 59816d98b31SRobert Bragg 59916d98b31SRobert BraggThis section simply includes all currently documented i915 perf internals, in 60016d98b31SRobert Braggno particular order, but may include some more minor utilities or platform 60116d98b31SRobert Braggspecific details than found in the more high-level sections. 60216d98b31SRobert Bragg 60316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60416d98b31SRobert Bragg :internal: 6051aa920eaSJani Nikula 6061aa920eaSJani NikulaStyle 6071aa920eaSJani Nikula===== 6081aa920eaSJani Nikula 6091aa920eaSJani NikulaThe drm/i915 driver codebase has some style rules in addition to (and, in some 6101aa920eaSJani Nikulacases, deviating from) the kernel coding style. 6111aa920eaSJani Nikula 6121aa920eaSJani NikulaRegister macro definition style 6131aa920eaSJani Nikula------------------------------- 6141aa920eaSJani Nikula 6151aa920eaSJani NikulaThe style guide for ``i915_reg.h``. 6161aa920eaSJani Nikula 6171aa920eaSJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_reg.h 6181aa920eaSJani Nikula :doc: The i915 register macro definition style guide 619