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 61*7d3c425fSOscar MateoWorkarounds 62*7d3c425fSOscar Mateo----------- 63*7d3c425fSOscar Mateo 64*7d3c425fSOscar Mateo.. kernel-doc:: drivers/gpu/drm/i915/intel_workarounds.c 65*7d3c425fSOscar Mateo :doc: Hardware workarounds 66*7d3c425fSOscar 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 85ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_frontbuffer.c 86ca00c2b9SJani Nikula :doc: frontbuffer tracking 87ca00c2b9SJani Nikula 885d723d7aSChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/intel_frontbuffer.h 895d723d7aSChris Wilson :internal: 905d723d7aSChris Wilson 91ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_frontbuffer.c 92ca00c2b9SJani Nikula :internal: 93ca00c2b9SJani Nikula 94ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem.c 95ca00c2b9SJani Nikula :functions: i915_gem_track_fb 96ca00c2b9SJani Nikula 97ca00c2b9SJani NikulaDisplay FIFO Underrun Reporting 9822554020SJani Nikula------------------------------- 99ca00c2b9SJani Nikula 100ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_fifo_underrun.c 101ca00c2b9SJani Nikula :doc: fifo underrun handling 102ca00c2b9SJani Nikula 103ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_fifo_underrun.c 104ca00c2b9SJani Nikula :internal: 105ca00c2b9SJani Nikula 106ca00c2b9SJani NikulaPlane Configuration 10722554020SJani Nikula------------------- 108ca00c2b9SJani Nikula 109ca00c2b9SJani NikulaThis section covers plane configuration and composition with the primary 110ca00c2b9SJani Nikulaplane, sprites, cursors and overlays. This includes the infrastructure 111ca00c2b9SJani Nikulato do atomic vsync'ed updates of all this state and also tightly coupled 112ca00c2b9SJani Nikulatopics like watermark setup and computation, framebuffer compression and 113ca00c2b9SJani Nikulapanel self refresh. 114ca00c2b9SJani Nikula 115ca00c2b9SJani NikulaAtomic Plane Helpers 11622554020SJani Nikula-------------------- 117ca00c2b9SJani Nikula 118ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_atomic_plane.c 119ca00c2b9SJani Nikula :doc: atomic plane helpers 120ca00c2b9SJani Nikula 121ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_atomic_plane.c 122ca00c2b9SJani Nikula :internal: 123ca00c2b9SJani Nikula 124ca00c2b9SJani NikulaOutput Probing 12522554020SJani Nikula-------------- 126ca00c2b9SJani Nikula 127ca00c2b9SJani NikulaThis section covers output probing and related infrastructure like the 128ca00c2b9SJani Nikulahotplug interrupt storm detection and mitigation code. Note that the 129ca00c2b9SJani Nikulai915 driver still uses most of the common DRM helper code for output 130ca00c2b9SJani Nikulaprobing, so those sections fully apply. 131ca00c2b9SJani Nikula 132ca00c2b9SJani NikulaHotplug 13322554020SJani Nikula------- 134ca00c2b9SJani Nikula 135ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_hotplug.c 136ca00c2b9SJani Nikula :doc: Hotplug 137ca00c2b9SJani Nikula 138ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_hotplug.c 139ca00c2b9SJani Nikula :internal: 140ca00c2b9SJani Nikula 141ca00c2b9SJani NikulaHigh Definition Audio 14222554020SJani Nikula--------------------- 143ca00c2b9SJani Nikula 144ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_audio.c 145ca00c2b9SJani Nikula :doc: High Definition Audio over HDMI and Display Port 146ca00c2b9SJani Nikula 147ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_audio.c 148ca00c2b9SJani Nikula :internal: 149ca00c2b9SJani Nikula 150ca00c2b9SJani Nikula.. kernel-doc:: include/drm/i915_component.h 151ca00c2b9SJani Nikula :internal: 152ca00c2b9SJani Nikula 153eacc8dafSTakashi IwaiIntel HDMI LPE Audio Support 154eacc8dafSTakashi Iwai---------------------------- 155eacc8dafSTakashi Iwai 156eacc8dafSTakashi Iwai.. kernel-doc:: drivers/gpu/drm/i915/intel_lpe_audio.c 157eacc8dafSTakashi Iwai :doc: LPE Audio integration for HDMI or DP playback 158eacc8dafSTakashi Iwai 159eacc8dafSTakashi Iwai.. kernel-doc:: drivers/gpu/drm/i915/intel_lpe_audio.c 160eacc8dafSTakashi Iwai :internal: 161eacc8dafSTakashi Iwai 162ca00c2b9SJani NikulaPanel Self Refresh PSR (PSR/SRD) 16322554020SJani Nikula-------------------------------- 164ca00c2b9SJani Nikula 165ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_psr.c 166ca00c2b9SJani Nikula :doc: Panel Self Refresh (PSR/SRD) 167ca00c2b9SJani Nikula 168ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_psr.c 169ca00c2b9SJani Nikula :internal: 170ca00c2b9SJani Nikula 171ca00c2b9SJani NikulaFrame Buffer Compression (FBC) 17222554020SJani Nikula------------------------------ 173ca00c2b9SJani Nikula 174ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_fbc.c 175ca00c2b9SJani Nikula :doc: Frame Buffer Compression (FBC) 176ca00c2b9SJani Nikula 177ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_fbc.c 178ca00c2b9SJani Nikula :internal: 179ca00c2b9SJani Nikula 180ca00c2b9SJani NikulaDisplay Refresh Rate Switching (DRRS) 18122554020SJani Nikula------------------------------------- 182ca00c2b9SJani Nikula 183ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_dp.c 184ca00c2b9SJani Nikula :doc: Display Refresh Rate Switching (DRRS) 185ca00c2b9SJani Nikula 186ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_dp.c 187ca00c2b9SJani Nikula :functions: intel_dp_set_drrs_state 188ca00c2b9SJani Nikula 189ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_dp.c 190ca00c2b9SJani Nikula :functions: intel_edp_drrs_enable 191ca00c2b9SJani Nikula 192ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_dp.c 193ca00c2b9SJani Nikula :functions: intel_edp_drrs_disable 194ca00c2b9SJani Nikula 195ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_dp.c 196ca00c2b9SJani Nikula :functions: intel_edp_drrs_invalidate 197ca00c2b9SJani Nikula 198ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_dp.c 199ca00c2b9SJani Nikula :functions: intel_edp_drrs_flush 200ca00c2b9SJani Nikula 201ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_dp.c 202ca00c2b9SJani Nikula :functions: intel_dp_drrs_init 203ca00c2b9SJani Nikula 204ca00c2b9SJani NikulaDPIO 20522554020SJani Nikula---- 206ca00c2b9SJani Nikula 207f38861b8SAnder Conselvan de Oliveira.. kernel-doc:: drivers/gpu/drm/i915/intel_dpio_phy.c 208ca00c2b9SJani Nikula :doc: DPIO 209ca00c2b9SJani Nikula 210ca00c2b9SJani NikulaCSR firmware support for DMC 21122554020SJani Nikula---------------------------- 212ca00c2b9SJani Nikula 213ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_csr.c 214ca00c2b9SJani Nikula :doc: csr support for dmc 215ca00c2b9SJani Nikula 216ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_csr.c 217ca00c2b9SJani Nikula :internal: 218ca00c2b9SJani Nikula 219ca00c2b9SJani NikulaVideo BIOS Table (VBT) 22022554020SJani Nikula---------------------- 221ca00c2b9SJani Nikula 222ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_bios.c 223ca00c2b9SJani Nikula :doc: Video BIOS Table (VBT) 224ca00c2b9SJani Nikula 225ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_bios.c 226ca00c2b9SJani Nikula :internal: 227ca00c2b9SJani Nikula 228ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_vbt_defs.h 229ca00c2b9SJani Nikula :internal: 230ca00c2b9SJani Nikula 2317ff89ca2SVille SyrjäläDisplay clocks 2327ff89ca2SVille Syrjälä-------------- 2337ff89ca2SVille Syrjälä 2347ff89ca2SVille Syrjälä.. kernel-doc:: drivers/gpu/drm/i915/intel_cdclk.c 2357ff89ca2SVille Syrjälä :doc: CDCLK / RAWCLK 2367ff89ca2SVille Syrjälä 2377ff89ca2SVille Syrjälä.. kernel-doc:: drivers/gpu/drm/i915/intel_cdclk.c 2387ff89ca2SVille Syrjälä :internal: 2397ff89ca2SVille Syrjälä 240294591cfSAnder Conselvan de OliveiraDisplay PLLs 241294591cfSAnder Conselvan de Oliveira------------ 242294591cfSAnder Conselvan de Oliveira 243294591cfSAnder Conselvan de Oliveira.. kernel-doc:: drivers/gpu/drm/i915/intel_dpll_mgr.c 244294591cfSAnder Conselvan de Oliveira :doc: Display PLLs 245294591cfSAnder Conselvan de Oliveira 246294591cfSAnder Conselvan de Oliveira.. kernel-doc:: drivers/gpu/drm/i915/intel_dpll_mgr.c 247294591cfSAnder Conselvan de Oliveira :internal: 248294591cfSAnder Conselvan de Oliveira 249294591cfSAnder Conselvan de Oliveira.. kernel-doc:: drivers/gpu/drm/i915/intel_dpll_mgr.h 250294591cfSAnder Conselvan de Oliveira :internal: 251294591cfSAnder Conselvan de Oliveira 252ca00c2b9SJani NikulaMemory Management and Command Submission 25322554020SJani Nikula======================================== 254ca00c2b9SJani Nikula 255ca00c2b9SJani NikulaThis sections covers all things related to the GEM implementation in the 256ca00c2b9SJani Nikulai915 driver. 257ca00c2b9SJani Nikula 258fd5ff5f6SKevin RogovinIntel GPU Basics 259fd5ff5f6SKevin Rogovin---------------- 260fd5ff5f6SKevin Rogovin 261fd5ff5f6SKevin RogovinAn Intel GPU has multiple engines. There are several engine types. 262fd5ff5f6SKevin Rogovin 263fd5ff5f6SKevin Rogovin- RCS engine is for rendering 3D and performing compute, this is named 264fd5ff5f6SKevin Rogovin `I915_EXEC_RENDER` in user space. 265fd5ff5f6SKevin Rogovin- BCS is a blitting (copy) engine, this is named `I915_EXEC_BLT` in user 266fd5ff5f6SKevin Rogovin space. 267fd5ff5f6SKevin Rogovin- VCS is a video encode and decode engine, this is named `I915_EXEC_BSD` 268fd5ff5f6SKevin Rogovin in user space 269fd5ff5f6SKevin Rogovin- VECS is video enhancement engine, this is named `I915_EXEC_VEBOX` in user 270fd5ff5f6SKevin Rogovin space. 271fd5ff5f6SKevin Rogovin- The enumeration `I915_EXEC_DEFAULT` does not refer to specific engine; 272fd5ff5f6SKevin Rogovin instead it is to be used by user space to specify a default rendering 273fd5ff5f6SKevin Rogovin engine (for 3D) that may or may not be the same as RCS. 274fd5ff5f6SKevin Rogovin 275fd5ff5f6SKevin RogovinThe Intel GPU family is a family of integrated GPU's using Unified 276fd5ff5f6SKevin RogovinMemory Access. For having the GPU "do work", user space will feed the 277fd5ff5f6SKevin RogovinGPU batch buffers via one of the ioctls `DRM_IOCTL_I915_GEM_EXECBUFFER2` 278fd5ff5f6SKevin Rogovinor `DRM_IOCTL_I915_GEM_EXECBUFFER2_WR`. Most such batchbuffers will 279fd5ff5f6SKevin Rogovininstruct the GPU to perform work (for example rendering) and that work 280fd5ff5f6SKevin Rogovinneeds memory from which to read and memory to which to write. All memory 281fd5ff5f6SKevin Rogovinis encapsulated within GEM buffer objects (usually created with the ioctl 282fd5ff5f6SKevin Rogovin`DRM_IOCTL_I915_GEM_CREATE`). An ioctl providing a batchbuffer for the GPU 283fd5ff5f6SKevin Rogovinto create will also list all GEM buffer objects that the batchbuffer reads 284fd5ff5f6SKevin Rogovinand/or writes. For implementation details of memory management see 285fd5ff5f6SKevin Rogovin`GEM BO Management Implementation Details`_. 286fd5ff5f6SKevin Rogovin 287fd5ff5f6SKevin RogovinThe i915 driver allows user space to create a context via the ioctl 288fd5ff5f6SKevin Rogovin`DRM_IOCTL_I915_GEM_CONTEXT_CREATE` which is identified by a 32-bit 289fd5ff5f6SKevin Rogovininteger. Such a context should be viewed by user-space as -loosely- 290fd5ff5f6SKevin Rogovinanalogous to the idea of a CPU process of an operating system. The i915 291fd5ff5f6SKevin Rogovindriver guarantees that commands issued to a fixed context are to be 292fd5ff5f6SKevin Rogovinexecuted so that writes of a previously issued command are seen by 293fd5ff5f6SKevin Rogovinreads of following commands. Actions issued between different contexts 294fd5ff5f6SKevin Rogovin(even if from the same file descriptor) are NOT given that guarantee 295fd5ff5f6SKevin Rogovinand the only way to synchronize across contexts (even from the same 296fd5ff5f6SKevin Rogovinfile descriptor) is through the use of fences. At least as far back as 297fd5ff5f6SKevin RogovinGen4, also have that a context carries with it a GPU HW context; 298fd5ff5f6SKevin Rogovinthe HW context is essentially (most of atleast) the state of a GPU. 299fd5ff5f6SKevin RogovinIn addition to the ordering guarantees, the kernel will restore GPU 300fd5ff5f6SKevin Rogovinstate via HW context when commands are issued to a context, this saves 301fd5ff5f6SKevin Rogovinuser space the need to restore (most of atleast) the GPU state at the 302fd5ff5f6SKevin Rogovinstart of each batchbuffer. The non-deprecated ioctls to submit batchbuffer 303fd5ff5f6SKevin Rogovinwork can pass that ID (in the lower bits of drm_i915_gem_execbuffer2::rsvd1) 304fd5ff5f6SKevin Rogovinto identify what context to use with the command. 305fd5ff5f6SKevin Rogovin 306fd5ff5f6SKevin RogovinThe GPU has its own memory management and address space. The kernel 307fd5ff5f6SKevin Rogovindriver maintains the memory translation table for the GPU. For older 308fd5ff5f6SKevin RogovinGPUs (i.e. those before Gen8), there is a single global such translation 309fd5ff5f6SKevin Rogovintable, a global Graphics Translation Table (GTT). For newer generation 310fd5ff5f6SKevin RogovinGPUs each context has its own translation table, called Per-Process 311fd5ff5f6SKevin RogovinGraphics Translation Table (PPGTT). Of important note, is that although 312fd5ff5f6SKevin RogovinPPGTT is named per-process it is actually per context. When user space 313fd5ff5f6SKevin Rogovinsubmits a batchbuffer, the kernel walks the list of GEM buffer objects 314fd5ff5f6SKevin Rogovinused by the batchbuffer and guarantees that not only is the memory of 315fd5ff5f6SKevin Rogovineach such GEM buffer object resident but it is also present in the 316fd5ff5f6SKevin Rogovin(PP)GTT. If the GEM buffer object is not yet placed in the (PP)GTT, 317fd5ff5f6SKevin Rogovinthen it is given an address. Two consequences of this are: the kernel 318fd5ff5f6SKevin Rogovinneeds to edit the batchbuffer submitted to write the correct value of 319fd5ff5f6SKevin Rogovinthe GPU address when a GEM BO is assigned a GPU address and the kernel 320fd5ff5f6SKevin Rogovinmight evict a different GEM BO from the (PP)GTT to make address room 321fd5ff5f6SKevin Rogovinfor another GEM BO. Consequently, the ioctls submitting a batchbuffer 322fd5ff5f6SKevin Rogovinfor execution also include a list of all locations within buffers that 323fd5ff5f6SKevin Rogovinrefer to GPU-addresses so that the kernel can edit the buffer correctly. 324fd5ff5f6SKevin RogovinThis process is dubbed relocation. 325fd5ff5f6SKevin Rogovin 326fd5ff5f6SKevin RogovinGEM BO Management Implementation Details 327fd5ff5f6SKevin Rogovin---------------------------------------- 328fd5ff5f6SKevin Rogovin 329fd5ff5f6SKevin Rogovin.. kernel-doc:: drivers/gpu/drm/i915/i915_vma.h 330fd5ff5f6SKevin Rogovin :doc: Virtual Memory Address 331fd5ff5f6SKevin Rogovin 332fd5ff5f6SKevin RogovinBuffer Object Eviction 333fd5ff5f6SKevin Rogovin---------------------- 334fd5ff5f6SKevin Rogovin 335fd5ff5f6SKevin RogovinThis section documents the interface functions for evicting buffer 336fd5ff5f6SKevin Rogovinobjects to make space available in the virtual gpu address spaces. Note 337fd5ff5f6SKevin Rogovinthat this is mostly orthogonal to shrinking buffer objects caches, which 338fd5ff5f6SKevin Rogovinhas the goal to make main memory (shared with the gpu through the 339fd5ff5f6SKevin Rogovinunified memory architecture) available. 340fd5ff5f6SKevin Rogovin 341fd5ff5f6SKevin Rogovin.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_evict.c 342fd5ff5f6SKevin Rogovin :internal: 343fd5ff5f6SKevin Rogovin 344fd5ff5f6SKevin RogovinBuffer Object Memory Shrinking 345fd5ff5f6SKevin Rogovin------------------------------ 346fd5ff5f6SKevin Rogovin 347fd5ff5f6SKevin RogovinThis section documents the interface function for shrinking memory usage 348fd5ff5f6SKevin Rogovinof buffer object caches. Shrinking is used to make main memory 349fd5ff5f6SKevin Rogovinavailable. Note that this is mostly orthogonal to evicting buffer 350fd5ff5f6SKevin Rogovinobjects, which has the goal to make space in gpu virtual address spaces. 351fd5ff5f6SKevin Rogovin 352fd5ff5f6SKevin Rogovin.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_shrinker.c 353fd5ff5f6SKevin Rogovin :internal: 354fd5ff5f6SKevin Rogovin 355ca00c2b9SJani NikulaBatchbuffer Parsing 35622554020SJani Nikula------------------- 357ca00c2b9SJani Nikula 358ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c 359ca00c2b9SJani Nikula :doc: batch buffer command parser 360ca00c2b9SJani Nikula 361ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c 362ca00c2b9SJani Nikula :internal: 363ca00c2b9SJani Nikula 364ca00c2b9SJani NikulaBatchbuffer Pools 36522554020SJani Nikula----------------- 366ca00c2b9SJani Nikula 367ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_batch_pool.c 368ca00c2b9SJani Nikula :doc: batch pool 369ca00c2b9SJani Nikula 370ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_batch_pool.c 371ca00c2b9SJani Nikula :internal: 372ca00c2b9SJani Nikula 3734d42db18SKevin RogovinUser Batchbuffer Execution 3744d42db18SKevin Rogovin-------------------------- 3754d42db18SKevin Rogovin 3764d42db18SKevin Rogovin.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_execbuffer.c 3774d42db18SKevin Rogovin :doc: User command execution 3784d42db18SKevin Rogovin 379ca00c2b9SJani NikulaLogical Rings, Logical Ring Contexts and Execlists 38022554020SJani Nikula-------------------------------------------------- 381ca00c2b9SJani Nikula 382ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_lrc.c 383ca00c2b9SJani Nikula :doc: Logical Rings, Logical Ring Contexts and Execlists 384ca00c2b9SJani Nikula 385ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_lrc.c 386ca00c2b9SJani Nikula :internal: 387ca00c2b9SJani Nikula 388ca00c2b9SJani NikulaGlobal GTT views 38922554020SJani Nikula---------------- 390ca00c2b9SJani Nikula 391ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_gtt.c 392ca00c2b9SJani Nikula :doc: Global GTT views 393ca00c2b9SJani Nikula 394ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_gtt.c 395ca00c2b9SJani Nikula :internal: 396ca00c2b9SJani Nikula 397ca00c2b9SJani NikulaGTT Fences and Swizzling 39822554020SJani Nikula------------------------ 399ca00c2b9SJani Nikula 400ebc896dbSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_fence_reg.c 401ca00c2b9SJani Nikula :internal: 402ca00c2b9SJani Nikula 403ca00c2b9SJani NikulaGlobal GTT Fence Handling 40422554020SJani Nikula~~~~~~~~~~~~~~~~~~~~~~~~~ 405ca00c2b9SJani Nikula 406ebc896dbSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_fence_reg.c 407ca00c2b9SJani Nikula :doc: fence register handling 408ca00c2b9SJani Nikula 409ca00c2b9SJani NikulaHardware Tiling and Swizzling Details 41022554020SJani Nikula~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 411ca00c2b9SJani Nikula 412ebc896dbSDaniel Vetter.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_fence_reg.c 413ca00c2b9SJani Nikula :doc: tiling swizzling details 414ca00c2b9SJani Nikula 415ca00c2b9SJani NikulaObject Tiling IOCTLs 41622554020SJani Nikula-------------------- 417ca00c2b9SJani Nikula 418ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_tiling.c 419ca00c2b9SJani Nikula :internal: 420ca00c2b9SJani Nikula 421ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_tiling.c 422ca00c2b9SJani Nikula :doc: buffer object tiling 423ca00c2b9SJani Nikula 424fbe6f8f2SYaodong LiWOPCM 425fbe6f8f2SYaodong Li===== 426fbe6f8f2SYaodong Li 427fbe6f8f2SYaodong LiWOPCM Layout 428fbe6f8f2SYaodong Li------------ 429fbe6f8f2SYaodong Li 430fbe6f8f2SYaodong Li.. kernel-doc:: drivers/gpu/drm/i915/intel_wopcm.c 431fbe6f8f2SYaodong Li :doc: WOPCM Layout 432fbe6f8f2SYaodong Li 433ca00c2b9SJani NikulaGuC 43422554020SJani Nikula=== 435ca00c2b9SJani Nikula 436ca00c2b9SJani NikulaGuC-specific firmware loader 43722554020SJani Nikula---------------------------- 438ca00c2b9SJani Nikula 439006c2332SRandy Dunlap.. kernel-doc:: drivers/gpu/drm/i915/intel_guc_fw.c 440ca00c2b9SJani Nikula :internal: 441ca00c2b9SJani Nikula 442ca00c2b9SJani NikulaGuC-based command submission 44322554020SJani Nikula---------------------------- 444ca00c2b9SJani Nikula 445a2695744SSagar Arun Kamble.. kernel-doc:: drivers/gpu/drm/i915/intel_guc_submission.c 446ca00c2b9SJani Nikula :doc: GuC-based command submission 447ca00c2b9SJani Nikula 448a2695744SSagar Arun Kamble.. kernel-doc:: drivers/gpu/drm/i915/intel_guc_submission.c 449ca00c2b9SJani Nikula :internal: 450ca00c2b9SJani Nikula 451ca00c2b9SJani NikulaGuC Firmware Layout 45222554020SJani Nikula------------------- 453ca00c2b9SJani Nikula 454ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/intel_guc_fwif.h 455ca00c2b9SJani Nikula :doc: GuC Firmware Layout 456ca00c2b9SJani Nikula 457fbe6f8f2SYaodong LiGuC Address Space 458fbe6f8f2SYaodong Li----------------- 459fbe6f8f2SYaodong Li 460fbe6f8f2SYaodong Li.. kernel-doc:: drivers/gpu/drm/i915/intel_guc.c 461fbe6f8f2SYaodong Li :doc: GuC Address Space 462fbe6f8f2SYaodong Li 463ca00c2b9SJani NikulaTracing 46422554020SJani Nikula======= 465ca00c2b9SJani Nikula 466ca00c2b9SJani NikulaThis sections covers all things related to the tracepoints implemented 467ca00c2b9SJani Nikulain the i915 driver. 468ca00c2b9SJani Nikula 469ca00c2b9SJani Nikulai915_ppgtt_create and i915_ppgtt_release 47022554020SJani Nikula---------------------------------------- 471ca00c2b9SJani Nikula 472ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 473ca00c2b9SJani Nikula :doc: i915_ppgtt_create and i915_ppgtt_release tracepoints 474ca00c2b9SJani Nikula 475ca00c2b9SJani Nikulai915_context_create and i915_context_free 47622554020SJani Nikula----------------------------------------- 477ca00c2b9SJani Nikula 478ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 479ca00c2b9SJani Nikula :doc: i915_context_create and i915_context_free tracepoints 480ca00c2b9SJani Nikula 481ca00c2b9SJani Nikulaswitch_mm 48222554020SJani Nikula--------- 483ca00c2b9SJani Nikula 484ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 485ca00c2b9SJani Nikula :doc: switch_mm tracepoint 486ca00c2b9SJani Nikula 48716d98b31SRobert BraggPerf 48816d98b31SRobert Bragg==== 48916d98b31SRobert Bragg 49016d98b31SRobert BraggOverview 49116d98b31SRobert Bragg-------- 49216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 49316d98b31SRobert Bragg :doc: i915 Perf Overview 49416d98b31SRobert Bragg 49516d98b31SRobert BraggComparison with Core Perf 49616d98b31SRobert Bragg------------------------- 49716d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 49816d98b31SRobert Bragg :doc: i915 Perf History and Comparison with Core Perf 49916d98b31SRobert Bragg 50016d98b31SRobert Braggi915 Driver Entry Points 50116d98b31SRobert Bragg------------------------ 50216d98b31SRobert Bragg 50316d98b31SRobert BraggThis section covers the entrypoints exported outside of i915_perf.c to 50416d98b31SRobert Braggintegrate with drm/i915 and to handle the `DRM_I915_PERF_OPEN` ioctl. 50516d98b31SRobert Bragg 50616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 50716d98b31SRobert Bragg :functions: i915_perf_init 50816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 50916d98b31SRobert Bragg :functions: i915_perf_fini 51016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 51116d98b31SRobert Bragg :functions: i915_perf_register 51216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 51316d98b31SRobert Bragg :functions: i915_perf_unregister 51416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 51516d98b31SRobert Bragg :functions: i915_perf_open_ioctl 51616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 51716d98b31SRobert Bragg :functions: i915_perf_release 518f89823c2SLionel Landwerlin.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 519f89823c2SLionel Landwerlin :functions: i915_perf_add_config_ioctl 520f89823c2SLionel Landwerlin.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 521f89823c2SLionel Landwerlin :functions: i915_perf_remove_config_ioctl 52216d98b31SRobert Bragg 52316d98b31SRobert Braggi915 Perf Stream 52416d98b31SRobert Bragg---------------- 52516d98b31SRobert Bragg 52616d98b31SRobert BraggThis section covers the stream-semantics-agnostic structures and functions 52716d98b31SRobert Braggfor representing an i915 perf stream FD and associated file operations. 52816d98b31SRobert Bragg 52916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_drv.h 53016d98b31SRobert Bragg :functions: i915_perf_stream 53116d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_drv.h 53216d98b31SRobert Bragg :functions: i915_perf_stream_ops 53316d98b31SRobert Bragg 53416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 53516d98b31SRobert Bragg :functions: read_properties_unlocked 53616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 53716d98b31SRobert Bragg :functions: i915_perf_open_ioctl_locked 53816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 53916d98b31SRobert Bragg :functions: i915_perf_destroy_locked 54016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 54116d98b31SRobert Bragg :functions: i915_perf_read 54216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 54316d98b31SRobert Bragg :functions: i915_perf_ioctl 54416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 54516d98b31SRobert Bragg :functions: i915_perf_enable_locked 54616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 54716d98b31SRobert Bragg :functions: i915_perf_disable_locked 54816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 54916d98b31SRobert Bragg :functions: i915_perf_poll 55016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 55116d98b31SRobert Bragg :functions: i915_perf_poll_locked 55216d98b31SRobert Bragg 55316d98b31SRobert Braggi915 Perf Observation Architecture Stream 55416d98b31SRobert Bragg----------------------------------------- 55516d98b31SRobert Bragg 55616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_drv.h 55716d98b31SRobert Bragg :functions: i915_oa_ops 55816d98b31SRobert Bragg 55916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56016d98b31SRobert Bragg :functions: i915_oa_stream_init 56116d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56216d98b31SRobert Bragg :functions: i915_oa_read 56316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56416d98b31SRobert Bragg :functions: i915_oa_stream_enable 56516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56616d98b31SRobert Bragg :functions: i915_oa_stream_disable 56716d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56816d98b31SRobert Bragg :functions: i915_oa_wait_unlocked 56916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 57016d98b31SRobert Bragg :functions: i915_oa_poll_wait 57116d98b31SRobert Bragg 57216d98b31SRobert BraggAll i915 Perf Internals 57316d98b31SRobert Bragg----------------------- 57416d98b31SRobert Bragg 57516d98b31SRobert BraggThis section simply includes all currently documented i915 perf internals, in 57616d98b31SRobert Braggno particular order, but may include some more minor utilities or platform 57716d98b31SRobert Braggspecific details than found in the more high-level sections. 57816d98b31SRobert Bragg 57916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 58016d98b31SRobert Bragg :internal: 5811aa920eaSJani Nikula 5821aa920eaSJani NikulaStyle 5831aa920eaSJani Nikula===== 5841aa920eaSJani Nikula 5851aa920eaSJani NikulaThe drm/i915 driver codebase has some style rules in addition to (and, in some 5861aa920eaSJani Nikulacases, deviating from) the kernel coding style. 5871aa920eaSJani Nikula 5881aa920eaSJani NikulaRegister macro definition style 5891aa920eaSJani Nikula------------------------------- 5901aa920eaSJani Nikula 5911aa920eaSJani NikulaThe style guide for ``i915_reg.h``. 5921aa920eaSJani Nikula 5931aa920eaSJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_reg.h 5941aa920eaSJani Nikula :doc: The i915 register macro definition style guide 595