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 1216914c968SKarthik B SAsynchronous Page Flip 1226914c968SKarthik B S---------------------- 1236914c968SKarthik B S 1246914c968SKarthik B S.. kernel-doc:: drivers/gpu/drm/i915/display/intel_display.c 1256914c968SKarthik B S :doc: asynchronous flip implementation 1266914c968SKarthik B S 127ca00c2b9SJani NikulaOutput Probing 12822554020SJani Nikula-------------- 129ca00c2b9SJani Nikula 130ca00c2b9SJani NikulaThis section covers output probing and related infrastructure like the 131ca00c2b9SJani Nikulahotplug interrupt storm detection and mitigation code. Note that the 132ca00c2b9SJani Nikulai915 driver still uses most of the common DRM helper code for output 133ca00c2b9SJani Nikulaprobing, so those sections fully apply. 134ca00c2b9SJani Nikula 135ca00c2b9SJani NikulaHotplug 13622554020SJani Nikula------- 137ca00c2b9SJani Nikula 1386800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_hotplug.c 139ca00c2b9SJani Nikula :doc: Hotplug 140ca00c2b9SJani Nikula 1416800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_hotplug.c 142ca00c2b9SJani Nikula :internal: 143ca00c2b9SJani Nikula 144ca00c2b9SJani NikulaHigh Definition Audio 14522554020SJani Nikula--------------------- 146ca00c2b9SJani Nikula 1476800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_audio.c 148ca00c2b9SJani Nikula :doc: High Definition Audio over HDMI and Display Port 149ca00c2b9SJani Nikula 1506800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_audio.c 151ca00c2b9SJani Nikula :internal: 152ca00c2b9SJani Nikula 153ca00c2b9SJani Nikula.. kernel-doc:: include/drm/i915_component.h 154ca00c2b9SJani Nikula :internal: 155ca00c2b9SJani Nikula 156eacc8dafSTakashi IwaiIntel HDMI LPE Audio Support 157eacc8dafSTakashi Iwai---------------------------- 158eacc8dafSTakashi Iwai 1596800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_lpe_audio.c 160eacc8dafSTakashi Iwai :doc: LPE Audio integration for HDMI or DP playback 161eacc8dafSTakashi Iwai 1626800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_lpe_audio.c 163eacc8dafSTakashi Iwai :internal: 164eacc8dafSTakashi Iwai 165ca00c2b9SJani NikulaPanel Self Refresh PSR (PSR/SRD) 16622554020SJani Nikula-------------------------------- 167ca00c2b9SJani Nikula 1686800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_psr.c 169ca00c2b9SJani Nikula :doc: Panel Self Refresh (PSR/SRD) 170ca00c2b9SJani Nikula 1716800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_psr.c 172ca00c2b9SJani Nikula :internal: 173ca00c2b9SJani Nikula 174ca00c2b9SJani NikulaFrame Buffer Compression (FBC) 17522554020SJani Nikula------------------------------ 176ca00c2b9SJani Nikula 1776800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fbc.c 178ca00c2b9SJani Nikula :doc: Frame Buffer Compression (FBC) 179ca00c2b9SJani Nikula 1806800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fbc.c 181ca00c2b9SJani Nikula :internal: 182ca00c2b9SJani Nikula 183ca00c2b9SJani NikulaDisplay Refresh Rate Switching (DRRS) 18422554020SJani Nikula------------------------------------- 185ca00c2b9SJani Nikula 186a1b63119SJosé Roberto de Souza.. kernel-doc:: drivers/gpu/drm/i915/display/intel_drrs.c 187ca00c2b9SJani Nikula :doc: Display Refresh Rate Switching (DRRS) 188ca00c2b9SJani Nikula 189a1b63119SJosé Roberto de Souza.. kernel-doc:: drivers/gpu/drm/i915/display/intel_drrs.c 190fd048473SJosé Roberto de Souza :internal: 191ca00c2b9SJani Nikula 192ca00c2b9SJani NikulaDPIO 19322554020SJani Nikula---- 194ca00c2b9SJani Nikula 1956800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpio_phy.c 196ca00c2b9SJani Nikula :doc: DPIO 197ca00c2b9SJani Nikula 19832f9402dSAnusha SrivatsaDMC Firmware Support 19932f9402dSAnusha Srivatsa-------------------- 200ca00c2b9SJani Nikula 20132f9402dSAnusha Srivatsa.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dmc.c 20232f9402dSAnusha Srivatsa :doc: DMC Firmware Support 203ca00c2b9SJani Nikula 20432f9402dSAnusha Srivatsa.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dmc.c 205ca00c2b9SJani Nikula :internal: 206ca00c2b9SJani Nikula 207ca00c2b9SJani NikulaVideo BIOS Table (VBT) 20822554020SJani Nikula---------------------- 209ca00c2b9SJani Nikula 2106800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_bios.c 211ca00c2b9SJani Nikula :doc: Video BIOS Table (VBT) 212ca00c2b9SJani Nikula 2136800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_bios.c 214ca00c2b9SJani Nikula :internal: 215ca00c2b9SJani Nikula 2166800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_vbt_defs.h 217ca00c2b9SJani Nikula :internal: 218ca00c2b9SJani Nikula 2197ff89ca2SVille SyrjäläDisplay clocks 2207ff89ca2SVille Syrjälä-------------- 2217ff89ca2SVille Syrjälä 2226800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_cdclk.c 2237ff89ca2SVille Syrjälä :doc: CDCLK / RAWCLK 2247ff89ca2SVille Syrjälä 2256800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_cdclk.c 2267ff89ca2SVille Syrjälä :internal: 2277ff89ca2SVille Syrjälä 228294591cfSAnder Conselvan de OliveiraDisplay PLLs 229294591cfSAnder Conselvan de Oliveira------------ 230294591cfSAnder Conselvan de Oliveira 2316800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.c 232294591cfSAnder Conselvan de Oliveira :doc: Display PLLs 233294591cfSAnder Conselvan de Oliveira 2346800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.c 235294591cfSAnder Conselvan de Oliveira :internal: 236294591cfSAnder Conselvan de Oliveira 2376800d9a5SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.h 238294591cfSAnder Conselvan de Oliveira :internal: 239294591cfSAnder Conselvan de Oliveira 2405dd85e72SAnimesh MannaDisplay State Buffer 2415dd85e72SAnimesh Manna-------------------- 2425dd85e72SAnimesh Manna 2435dd85e72SAnimesh Manna.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dsb.c 2445dd85e72SAnimesh Manna :doc: DSB 2455dd85e72SAnimesh Manna 2465dd85e72SAnimesh Manna.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dsb.c 2475dd85e72SAnimesh Manna :internal: 2485dd85e72SAnimesh Manna 2493fe6c7f5SMatt RoperGT Programming 2503fe6c7f5SMatt Roper============== 2513fe6c7f5SMatt Roper 2523fe6c7f5SMatt RoperMulticast/Replicated (MCR) Registers 2533fe6c7f5SMatt Roper------------------------------------ 2543fe6c7f5SMatt Roper 2553fe6c7f5SMatt Roper.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_gt_mcr.c 2563fe6c7f5SMatt Roper :doc: GT Multicast/Replicated (MCR) Register Support 2573fe6c7f5SMatt Roper 2583fe6c7f5SMatt Roper.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_gt_mcr.c 2593fe6c7f5SMatt Roper :internal: 2603fe6c7f5SMatt Roper 261ca00c2b9SJani NikulaMemory Management and Command Submission 26222554020SJani Nikula======================================== 263ca00c2b9SJani Nikula 264ca00c2b9SJani NikulaThis sections covers all things related to the GEM implementation in the 265ca00c2b9SJani Nikulai915 driver. 266ca00c2b9SJani Nikula 267fd5ff5f6SKevin RogovinIntel GPU Basics 268fd5ff5f6SKevin Rogovin---------------- 269fd5ff5f6SKevin Rogovin 270fd5ff5f6SKevin RogovinAn Intel GPU has multiple engines. There are several engine types. 271fd5ff5f6SKevin Rogovin 272fd5ff5f6SKevin Rogovin- RCS engine is for rendering 3D and performing compute, this is named 273fd5ff5f6SKevin Rogovin `I915_EXEC_RENDER` in user space. 274fd5ff5f6SKevin Rogovin- BCS is a blitting (copy) engine, this is named `I915_EXEC_BLT` in user 275fd5ff5f6SKevin Rogovin space. 276fd5ff5f6SKevin Rogovin- VCS is a video encode and decode engine, this is named `I915_EXEC_BSD` 277fd5ff5f6SKevin Rogovin in user space 278fd5ff5f6SKevin Rogovin- VECS is video enhancement engine, this is named `I915_EXEC_VEBOX` in user 279fd5ff5f6SKevin Rogovin space. 280fd5ff5f6SKevin Rogovin- The enumeration `I915_EXEC_DEFAULT` does not refer to specific engine; 281fd5ff5f6SKevin Rogovin instead it is to be used by user space to specify a default rendering 282fd5ff5f6SKevin Rogovin engine (for 3D) that may or may not be the same as RCS. 283fd5ff5f6SKevin Rogovin 284fd5ff5f6SKevin RogovinThe Intel GPU family is a family of integrated GPU's using Unified 285fd5ff5f6SKevin RogovinMemory Access. For having the GPU "do work", user space will feed the 286fd5ff5f6SKevin RogovinGPU batch buffers via one of the ioctls `DRM_IOCTL_I915_GEM_EXECBUFFER2` 287fd5ff5f6SKevin Rogovinor `DRM_IOCTL_I915_GEM_EXECBUFFER2_WR`. Most such batchbuffers will 288fd5ff5f6SKevin Rogovininstruct the GPU to perform work (for example rendering) and that work 289fd5ff5f6SKevin Rogovinneeds memory from which to read and memory to which to write. All memory 290fd5ff5f6SKevin Rogovinis encapsulated within GEM buffer objects (usually created with the ioctl 291fd5ff5f6SKevin Rogovin`DRM_IOCTL_I915_GEM_CREATE`). An ioctl providing a batchbuffer for the GPU 292fd5ff5f6SKevin Rogovinto create will also list all GEM buffer objects that the batchbuffer reads 293fd5ff5f6SKevin Rogovinand/or writes. For implementation details of memory management see 294fd5ff5f6SKevin Rogovin`GEM BO Management Implementation Details`_. 295fd5ff5f6SKevin Rogovin 296fd5ff5f6SKevin RogovinThe i915 driver allows user space to create a context via the ioctl 297fd5ff5f6SKevin Rogovin`DRM_IOCTL_I915_GEM_CONTEXT_CREATE` which is identified by a 32-bit 298fd5ff5f6SKevin Rogovininteger. Such a context should be viewed by user-space as -loosely- 299fd5ff5f6SKevin Rogovinanalogous to the idea of a CPU process of an operating system. The i915 300fd5ff5f6SKevin Rogovindriver guarantees that commands issued to a fixed context are to be 301fd5ff5f6SKevin Rogovinexecuted so that writes of a previously issued command are seen by 302fd5ff5f6SKevin Rogovinreads of following commands. Actions issued between different contexts 303fd5ff5f6SKevin Rogovin(even if from the same file descriptor) are NOT given that guarantee 304fd5ff5f6SKevin Rogovinand the only way to synchronize across contexts (even from the same 305fd5ff5f6SKevin Rogovinfile descriptor) is through the use of fences. At least as far back as 306fd5ff5f6SKevin RogovinGen4, also have that a context carries with it a GPU HW context; 307fd5ff5f6SKevin Rogovinthe HW context is essentially (most of at least) the state of a GPU. 308fd5ff5f6SKevin RogovinIn addition to the ordering guarantees, the kernel will restore GPU 309fd5ff5f6SKevin Rogovinstate via HW context when commands are issued to a context, this saves 310fd5ff5f6SKevin Rogovinuser space the need to restore (most of at least) the GPU state at the 311fd5ff5f6SKevin Rogovinstart of each batchbuffer. The non-deprecated ioctls to submit batchbuffer 312fd5ff5f6SKevin Rogovinwork can pass that ID (in the lower bits of drm_i915_gem_execbuffer2::rsvd1) 313fd5ff5f6SKevin Rogovinto identify what context to use with the command. 314fd5ff5f6SKevin Rogovin 315fd5ff5f6SKevin RogovinThe GPU has its own memory management and address space. The kernel 316fd5ff5f6SKevin Rogovindriver maintains the memory translation table for the GPU. For older 317fd5ff5f6SKevin RogovinGPUs (i.e. those before Gen8), there is a single global such translation 318fd5ff5f6SKevin Rogovintable, a global Graphics Translation Table (GTT). For newer generation 319fd5ff5f6SKevin RogovinGPUs each context has its own translation table, called Per-Process 320fd5ff5f6SKevin RogovinGraphics Translation Table (PPGTT). Of important note, is that although 321fd5ff5f6SKevin RogovinPPGTT is named per-process it is actually per context. When user space 322fd5ff5f6SKevin Rogovinsubmits a batchbuffer, the kernel walks the list of GEM buffer objects 323fd5ff5f6SKevin Rogovinused by the batchbuffer and guarantees that not only is the memory of 324fd5ff5f6SKevin Rogovineach such GEM buffer object resident but it is also present in the 325fd5ff5f6SKevin Rogovin(PP)GTT. If the GEM buffer object is not yet placed in the (PP)GTT, 326fd5ff5f6SKevin Rogovinthen it is given an address. Two consequences of this are: the kernel 327fd5ff5f6SKevin Rogovinneeds to edit the batchbuffer submitted to write the correct value of 328fd5ff5f6SKevin Rogovinthe GPU address when a GEM BO is assigned a GPU address and the kernel 329fd5ff5f6SKevin Rogovinmight evict a different GEM BO from the (PP)GTT to make address room 330fd5ff5f6SKevin Rogovinfor another GEM BO. Consequently, the ioctls submitting a batchbuffer 331fd5ff5f6SKevin Rogovinfor execution also include a list of all locations within buffers that 332fd5ff5f6SKevin Rogovinrefer to GPU-addresses so that the kernel can edit the buffer correctly. 333fd5ff5f6SKevin RogovinThis process is dubbed relocation. 334fd5ff5f6SKevin Rogovin 335ca69a3c6SJoonas LahtinenLocking Guidelines 336ca69a3c6SJoonas Lahtinen------------------ 337ca69a3c6SJoonas Lahtinen 338ca69a3c6SJoonas Lahtinen.. note:: 339ca69a3c6SJoonas Lahtinen This is a description of how the locking should be after 340ca69a3c6SJoonas Lahtinen refactoring is done. Does not necessarily reflect what the locking 341ca69a3c6SJoonas Lahtinen looks like while WIP. 342ca69a3c6SJoonas Lahtinen 343ca69a3c6SJoonas Lahtinen#. All locking rules and interface contracts with cross-driver interfaces 344ca69a3c6SJoonas Lahtinen (dma-buf, dma_fence) need to be followed. 345ca69a3c6SJoonas Lahtinen 346ca69a3c6SJoonas Lahtinen#. No struct_mutex anywhere in the code 347ca69a3c6SJoonas Lahtinen 348ca69a3c6SJoonas Lahtinen#. dma_resv will be the outermost lock (when needed) and ww_acquire_ctx 349ca69a3c6SJoonas Lahtinen is to be hoisted at highest level and passed down within i915_gem_ctx 350ca69a3c6SJoonas Lahtinen in the call chain 351ca69a3c6SJoonas Lahtinen 352ca69a3c6SJoonas Lahtinen#. While holding lru/memory manager (buddy, drm_mm, whatever) locks 353ca69a3c6SJoonas Lahtinen system memory allocations are not allowed 354ca69a3c6SJoonas Lahtinen 355ca69a3c6SJoonas Lahtinen * Enforce this by priming lockdep (with fs_reclaim). If we 356ca69a3c6SJoonas Lahtinen allocate memory while holding these looks we get a rehash 357ca69a3c6SJoonas Lahtinen of the shrinker vs. struct_mutex saga, and that would be 358ca69a3c6SJoonas Lahtinen real bad. 359ca69a3c6SJoonas Lahtinen 360ca69a3c6SJoonas Lahtinen#. Do not nest different lru/memory manager locks within each other. 361ca69a3c6SJoonas Lahtinen Take them in turn to update memory allocations, relying on the object’s 362ca69a3c6SJoonas Lahtinen dma_resv ww_mutex to serialize against other operations. 363ca69a3c6SJoonas Lahtinen 364ca69a3c6SJoonas Lahtinen#. The suggestion for lru/memory managers locks is that they are small 365ca69a3c6SJoonas Lahtinen enough to be spinlocks. 366ca69a3c6SJoonas Lahtinen 367ca69a3c6SJoonas Lahtinen#. All features need to come with exhaustive kernel selftests and/or 368ca69a3c6SJoonas Lahtinen IGT tests when appropriate 369ca69a3c6SJoonas Lahtinen 370ca69a3c6SJoonas Lahtinen#. All LMEM uAPI paths need to be fully restartable (_interruptible() 371ca69a3c6SJoonas Lahtinen for all locks/waits/sleeps) 372ca69a3c6SJoonas Lahtinen 373ca69a3c6SJoonas Lahtinen * Error handling validation through signal injection. 374ca69a3c6SJoonas Lahtinen Still the best strategy we have for validating GEM uAPI 375ca69a3c6SJoonas Lahtinen corner cases. 376ca69a3c6SJoonas Lahtinen Must be excessively used in the IGT, and we need to check 377ca69a3c6SJoonas Lahtinen that we really have full path coverage of all error cases. 378ca69a3c6SJoonas Lahtinen 379ca69a3c6SJoonas Lahtinen * -EDEADLK handling with ww_mutex 380ca69a3c6SJoonas Lahtinen 381fd5ff5f6SKevin RogovinGEM BO Management Implementation Details 382fd5ff5f6SKevin Rogovin---------------------------------------- 383fd5ff5f6SKevin Rogovin 38483dc7f69SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/i915_vma_types.h 385fd5ff5f6SKevin Rogovin :doc: Virtual Memory Address 386fd5ff5f6SKevin Rogovin 387fd5ff5f6SKevin RogovinBuffer Object Eviction 388fd5ff5f6SKevin Rogovin---------------------- 389fd5ff5f6SKevin Rogovin 390fd5ff5f6SKevin RogovinThis section documents the interface functions for evicting buffer 391fd5ff5f6SKevin Rogovinobjects to make space available in the virtual gpu address spaces. Note 392fd5ff5f6SKevin Rogovinthat this is mostly orthogonal to shrinking buffer objects caches, which 393fd5ff5f6SKevin Rogovinhas the goal to make main memory (shared with the gpu through the 394fd5ff5f6SKevin Rogovinunified memory architecture) available. 395fd5ff5f6SKevin Rogovin 396fd5ff5f6SKevin Rogovin.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_evict.c 397fd5ff5f6SKevin Rogovin :internal: 398fd5ff5f6SKevin Rogovin 399fd5ff5f6SKevin RogovinBuffer Object Memory Shrinking 400fd5ff5f6SKevin Rogovin------------------------------ 401fd5ff5f6SKevin Rogovin 402fd5ff5f6SKevin RogovinThis section documents the interface function for shrinking memory usage 403fd5ff5f6SKevin Rogovinof buffer object caches. Shrinking is used to make main memory 404fd5ff5f6SKevin Rogovinavailable. Note that this is mostly orthogonal to evicting buffer 405fd5ff5f6SKevin Rogovinobjects, which has the goal to make space in gpu virtual address spaces. 406fd5ff5f6SKevin Rogovin 4078a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c 408fd5ff5f6SKevin Rogovin :internal: 409fd5ff5f6SKevin Rogovin 410ca00c2b9SJani NikulaBatchbuffer Parsing 41122554020SJani Nikula------------------- 412ca00c2b9SJani Nikula 413ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c 414ca00c2b9SJani Nikula :doc: batch buffer command parser 415ca00c2b9SJani Nikula 416ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c 417ca00c2b9SJani Nikula :internal: 418ca00c2b9SJani Nikula 4194d42db18SKevin RogovinUser Batchbuffer Execution 4204d42db18SKevin Rogovin-------------------------- 4214d42db18SKevin Rogovin 422f8a9a5c2SJason Ekstrand.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_context_types.h 423f8a9a5c2SJason Ekstrand 4248a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c 4254d42db18SKevin Rogovin :doc: User command execution 4264d42db18SKevin Rogovin 4273e28d371SMatthew BrostScheduling 4283e28d371SMatthew Brost---------- 4293e28d371SMatthew Brost.. kernel-doc:: drivers/gpu/drm/i915/i915_scheduler_types.h 4303e28d371SMatthew Brost :functions: i915_sched_engine 4313e28d371SMatthew Brost 432ca00c2b9SJani NikulaLogical Rings, Logical Ring Contexts and Execlists 43322554020SJani Nikula-------------------------------------------------- 434ca00c2b9SJani Nikula 4353b7bc18bSJosé Roberto de Souza.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_execlists_submission.c 436ca00c2b9SJani Nikula :doc: Logical Rings, Logical Ring Contexts and Execlists 437ca00c2b9SJani Nikula 438ca00c2b9SJani NikulaGlobal GTT views 43922554020SJani Nikula---------------- 440ca00c2b9SJani Nikula 44183dc7f69SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/i915_vma_types.h 442ca00c2b9SJani Nikula :doc: Global GTT views 443ca00c2b9SJani Nikula 444ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_gtt.c 445ca00c2b9SJani Nikula :internal: 446ca00c2b9SJani Nikula 447ca00c2b9SJani NikulaGTT Fences and Swizzling 44822554020SJani Nikula------------------------ 449ca00c2b9SJani Nikula 450ba69fb16SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c 451ca00c2b9SJani Nikula :internal: 452ca00c2b9SJani Nikula 453ca00c2b9SJani NikulaGlobal GTT Fence Handling 45422554020SJani Nikula~~~~~~~~~~~~~~~~~~~~~~~~~ 455ca00c2b9SJani Nikula 456ba69fb16SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c 457ca00c2b9SJani Nikula :doc: fence register handling 458ca00c2b9SJani Nikula 459ca00c2b9SJani NikulaHardware Tiling and Swizzling Details 46022554020SJani Nikula~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 461ca00c2b9SJani Nikula 462ba69fb16SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c 463ca00c2b9SJani Nikula :doc: tiling swizzling details 464ca00c2b9SJani Nikula 465ca00c2b9SJani NikulaObject Tiling IOCTLs 46622554020SJani Nikula-------------------- 467ca00c2b9SJani Nikula 4688a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c 469ca00c2b9SJani Nikula :internal: 470ca00c2b9SJani Nikula 4718a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c 472ca00c2b9SJani Nikula :doc: buffer object tiling 473ca00c2b9SJani Nikula 4742d5517a5SDaniele Ceraolo SpurioProtected Objects 4752d5517a5SDaniele Ceraolo Spurio----------------- 4762d5517a5SDaniele Ceraolo Spurio 4772d5517a5SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/pxp/intel_pxp.c 4782d5517a5SDaniele Ceraolo Spurio :doc: PXP 4792d5517a5SDaniele Ceraolo Spurio 4802d5517a5SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/pxp/intel_pxp_types.h 4812d5517a5SDaniele Ceraolo Spurio 482493065e2SDaniele Ceraolo SpurioMicrocontrollers 483493065e2SDaniele Ceraolo Spurio================ 484493065e2SDaniele Ceraolo Spurio 485493065e2SDaniele Ceraolo SpurioStarting from gen9, three microcontrollers are available on the HW: the 486493065e2SDaniele Ceraolo Spuriographics microcontroller (GuC), the HEVC/H.265 microcontroller (HuC) and the 487493065e2SDaniele Ceraolo Spuriodisplay microcontroller (DMC). The driver is responsible for loading the 488493065e2SDaniele Ceraolo Spuriofirmwares on the microcontrollers; the GuC and HuC firmwares are transferred 489493065e2SDaniele Ceraolo Spurioto WOPCM using the DMA engine, while the DMC firmware is written through MMIO. 490493065e2SDaniele Ceraolo Spurio 491fbe6f8f2SYaodong LiWOPCM 4924072761bSJoonas Lahtinen----- 493fbe6f8f2SYaodong Li 494fbe6f8f2SYaodong LiWOPCM Layout 4954072761bSJoonas Lahtinen~~~~~~~~~~~~ 496fbe6f8f2SYaodong Li 497*ee71434eSAravind Iddamsetty.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_wopcm.c 498fbe6f8f2SYaodong Li :doc: WOPCM Layout 499fbe6f8f2SYaodong Li 500ca00c2b9SJani NikulaGuC 5014072761bSJoonas Lahtinen--- 502ca00c2b9SJani Nikula 503218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 504218151e9SDaniele Ceraolo Spurio :doc: GuC 505218151e9SDaniele Ceraolo Spurio 5064f41ddc7SMatthew Brost.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.h 5074f41ddc7SMatthew Brost 508218151e9SDaniele Ceraolo SpurioGuC Firmware Layout 509218151e9SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~ 510199dddedSMichal Wajdeczko 511abf30f23SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h 512199dddedSMichal Wajdeczko :doc: Firmware Layout 513199dddedSMichal Wajdeczko 514218151e9SDaniele Ceraolo SpurioGuC Memory Management 515218151e9SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~~~ 516218151e9SDaniele Ceraolo Spurio 517218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 518218151e9SDaniele Ceraolo Spurio :doc: GuC Memory Management 519218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 520218151e9SDaniele Ceraolo Spurio :functions: intel_guc_allocate_vma 521218151e9SDaniele Ceraolo Spurio 522218151e9SDaniele Ceraolo Spurio 523ca00c2b9SJani NikulaGuC-specific firmware loader 5244072761bSJoonas Lahtinen~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 525ca00c2b9SJani Nikula 526dbbff8c3SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c 527ca00c2b9SJani Nikula :internal: 528ca00c2b9SJani Nikula 529ca00c2b9SJani NikulaGuC-based command submission 5304072761bSJoonas Lahtinen~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 531ca00c2b9SJani Nikula 532dbbff8c3SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 533ca00c2b9SJani Nikula :doc: GuC-based command submission 534ca00c2b9SJani Nikula 535bfde26dfSMichal WajdeczkoGuC ABI 536bfde26dfSMichal Wajdeczko~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 537bfde26dfSMichal Wajdeczko 538bfde26dfSMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_messages_abi.h 539bfde26dfSMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_communication_mmio_abi.h 540bfde26dfSMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_communication_ctb_abi.h 541bfde26dfSMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h 54277b6f79dSJohn Harrison.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h 543bfde26dfSMichal Wajdeczko 544493065e2SDaniele Ceraolo SpurioHuC 545493065e2SDaniele Ceraolo Spurio--- 5460b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 5470b23e2a6SDaniele Ceraolo Spurio :doc: HuC 5480b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 5490b23e2a6SDaniele Ceraolo Spurio :functions: intel_huc_auth 5500b23e2a6SDaniele Ceraolo Spurio 5510b23e2a6SDaniele Ceraolo SpurioHuC Memory Management 5520b23e2a6SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~~~ 5530b23e2a6SDaniele Ceraolo Spurio 5540b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 5550b23e2a6SDaniele Ceraolo Spurio :doc: HuC Memory Management 5560b23e2a6SDaniele Ceraolo Spurio 5570b23e2a6SDaniele Ceraolo SpurioHuC Firmware Layout 5580b23e2a6SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~ 5590b23e2a6SDaniele Ceraolo SpurioThe HuC FW layout is the same as the GuC one, see `GuC Firmware Layout`_ 560493065e2SDaniele Ceraolo Spurio 561493065e2SDaniele Ceraolo SpurioDMC 562493065e2SDaniele Ceraolo Spurio--- 56332f9402dSAnusha SrivatsaSee `DMC Firmware Support`_ 564493065e2SDaniele Ceraolo Spurio 565ca00c2b9SJani NikulaTracing 56622554020SJani Nikula======= 567ca00c2b9SJani Nikula 568ca00c2b9SJani NikulaThis sections covers all things related to the tracepoints implemented 569ca00c2b9SJani Nikulain the i915 driver. 570ca00c2b9SJani Nikula 571ca00c2b9SJani Nikulai915_ppgtt_create and i915_ppgtt_release 57222554020SJani Nikula---------------------------------------- 573ca00c2b9SJani Nikula 574ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 575ca00c2b9SJani Nikula :doc: i915_ppgtt_create and i915_ppgtt_release tracepoints 576ca00c2b9SJani Nikula 577ca00c2b9SJani Nikulai915_context_create and i915_context_free 57822554020SJani Nikula----------------------------------------- 579ca00c2b9SJani Nikula 580ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 581ca00c2b9SJani Nikula :doc: i915_context_create and i915_context_free tracepoints 582ca00c2b9SJani Nikula 58316d98b31SRobert BraggPerf 58416d98b31SRobert Bragg==== 58516d98b31SRobert Bragg 58616d98b31SRobert BraggOverview 58716d98b31SRobert Bragg-------- 58816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 58916d98b31SRobert Bragg :doc: i915 Perf Overview 59016d98b31SRobert Bragg 59116d98b31SRobert BraggComparison with Core Perf 59216d98b31SRobert Bragg------------------------- 59316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 59416d98b31SRobert Bragg :doc: i915 Perf History and Comparison with Core Perf 59516d98b31SRobert Bragg 59616d98b31SRobert Braggi915 Driver Entry Points 59716d98b31SRobert Bragg------------------------ 59816d98b31SRobert Bragg 59916d98b31SRobert BraggThis section covers the entrypoints exported outside of i915_perf.c to 60016d98b31SRobert Braggintegrate with drm/i915 and to handle the `DRM_I915_PERF_OPEN` ioctl. 60116d98b31SRobert Bragg 60216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60316d98b31SRobert Bragg :functions: i915_perf_init 60416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60516d98b31SRobert Bragg :functions: i915_perf_fini 60616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60716d98b31SRobert Bragg :functions: i915_perf_register 60816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60916d98b31SRobert Bragg :functions: i915_perf_unregister 61016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 61116d98b31SRobert Bragg :functions: i915_perf_open_ioctl 61216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 61316d98b31SRobert Bragg :functions: i915_perf_release 614f89823c2SLionel Landwerlin.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 615f89823c2SLionel Landwerlin :functions: i915_perf_add_config_ioctl 616f89823c2SLionel Landwerlin.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 617f89823c2SLionel Landwerlin :functions: i915_perf_remove_config_ioctl 61816d98b31SRobert Bragg 61916d98b31SRobert Braggi915 Perf Stream 62016d98b31SRobert Bragg---------------- 62116d98b31SRobert Bragg 62216d98b31SRobert BraggThis section covers the stream-semantics-agnostic structures and functions 62316d98b31SRobert Braggfor representing an i915 perf stream FD and associated file operations. 62416d98b31SRobert Bragg 6258c638802SAnna Karas.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h 62616d98b31SRobert Bragg :functions: i915_perf_stream 6278c638802SAnna Karas.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h 62816d98b31SRobert Bragg :functions: i915_perf_stream_ops 62916d98b31SRobert Bragg 63016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63116d98b31SRobert Bragg :functions: read_properties_unlocked 63216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63316d98b31SRobert Bragg :functions: i915_perf_open_ioctl_locked 63416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63516d98b31SRobert Bragg :functions: i915_perf_destroy_locked 63616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63716d98b31SRobert Bragg :functions: i915_perf_read 63816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63916d98b31SRobert Bragg :functions: i915_perf_ioctl 64016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 64116d98b31SRobert Bragg :functions: i915_perf_enable_locked 64216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 64316d98b31SRobert Bragg :functions: i915_perf_disable_locked 64416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 64516d98b31SRobert Bragg :functions: i915_perf_poll 64616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 64716d98b31SRobert Bragg :functions: i915_perf_poll_locked 64816d98b31SRobert Bragg 64916d98b31SRobert Braggi915 Perf Observation Architecture Stream 65016d98b31SRobert Bragg----------------------------------------- 65116d98b31SRobert Bragg 6528c638802SAnna Karas.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h 65316d98b31SRobert Bragg :functions: i915_oa_ops 65416d98b31SRobert Bragg 65516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 65616d98b31SRobert Bragg :functions: i915_oa_stream_init 65716d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 65816d98b31SRobert Bragg :functions: i915_oa_read 65916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 66016d98b31SRobert Bragg :functions: i915_oa_stream_enable 66116d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 66216d98b31SRobert Bragg :functions: i915_oa_stream_disable 66316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 66416d98b31SRobert Bragg :functions: i915_oa_wait_unlocked 66516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 66616d98b31SRobert Bragg :functions: i915_oa_poll_wait 66716d98b31SRobert Bragg 66811604da2SMauro Carvalho ChehabOther i915 Perf Internals 66911604da2SMauro Carvalho Chehab------------------------- 67016d98b31SRobert Bragg 67111604da2SMauro Carvalho ChehabThis section simply includes all other currently documented i915 perf internals, 67211604da2SMauro Carvalho Chehabin no particular order, but may include some more minor utilities or platform 67316d98b31SRobert Braggspecific details than found in the more high-level sections. 67416d98b31SRobert Bragg 67516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 67616d98b31SRobert Bragg :internal: 67711604da2SMauro Carvalho Chehab :no-identifiers: 67811604da2SMauro Carvalho Chehab i915_perf_init 67911604da2SMauro Carvalho Chehab i915_perf_fini 68011604da2SMauro Carvalho Chehab i915_perf_register 68111604da2SMauro Carvalho Chehab i915_perf_unregister 68211604da2SMauro Carvalho Chehab i915_perf_open_ioctl 68311604da2SMauro Carvalho Chehab i915_perf_release 68411604da2SMauro Carvalho Chehab i915_perf_add_config_ioctl 68511604da2SMauro Carvalho Chehab i915_perf_remove_config_ioctl 68611604da2SMauro Carvalho Chehab read_properties_unlocked 68711604da2SMauro Carvalho Chehab i915_perf_open_ioctl_locked 68811604da2SMauro Carvalho Chehab i915_perf_destroy_locked 68911604da2SMauro Carvalho Chehab i915_perf_read i915_perf_ioctl 69011604da2SMauro Carvalho Chehab i915_perf_enable_locked 69111604da2SMauro Carvalho Chehab i915_perf_disable_locked 69211604da2SMauro Carvalho Chehab i915_perf_poll i915_perf_poll_locked 69311604da2SMauro Carvalho Chehab i915_oa_stream_init i915_oa_read 69411604da2SMauro Carvalho Chehab i915_oa_stream_enable 69511604da2SMauro Carvalho Chehab i915_oa_stream_disable 69611604da2SMauro Carvalho Chehab i915_oa_wait_unlocked 69711604da2SMauro Carvalho Chehab i915_oa_poll_wait 6981aa920eaSJani Nikula 6991aa920eaSJani NikulaStyle 7001aa920eaSJani Nikula===== 7011aa920eaSJani Nikula 7021aa920eaSJani NikulaThe drm/i915 driver codebase has some style rules in addition to (and, in some 7031aa920eaSJani Nikulacases, deviating from) the kernel coding style. 7041aa920eaSJani Nikula 7051aa920eaSJani NikulaRegister macro definition style 7061aa920eaSJani Nikula------------------------------- 7071aa920eaSJani Nikula 7081aa920eaSJani NikulaThe style guide for ``i915_reg.h``. 7091aa920eaSJani Nikula 7101aa920eaSJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_reg.h 7111aa920eaSJani Nikula :doc: The i915 register macro definition style guide 712055634e4STvrtko Ursulin 713055634e4STvrtko Ursulin.. _i915-usage-stats: 714055634e4STvrtko Ursulin 715055634e4STvrtko Ursulini915 DRM client usage stats implementation 716055634e4STvrtko Ursulin========================================== 717055634e4STvrtko Ursulin 718055634e4STvrtko UrsulinThe drm/i915 driver implements the DRM client usage stats specification as 719055634e4STvrtko Ursulindocumented in :ref:`drm-client-usage-stats`. 720055634e4STvrtko Ursulin 721055634e4STvrtko UrsulinExample of the output showing the implemented key value pairs and entirety of 722055634e4STvrtko Ursulinthe currently possible format options: 723055634e4STvrtko Ursulin 724055634e4STvrtko Ursulin:: 725055634e4STvrtko Ursulin 726055634e4STvrtko Ursulin pos: 0 727055634e4STvrtko Ursulin flags: 0100002 728055634e4STvrtko Ursulin mnt_id: 21 729055634e4STvrtko Ursulin drm-driver: i915 730055634e4STvrtko Ursulin drm-pdev: 0000:00:02.0 731055634e4STvrtko Ursulin drm-client-id: 7 732055634e4STvrtko Ursulin drm-engine-render: 9288864723 ns 733055634e4STvrtko Ursulin drm-engine-copy: 2035071108 ns 734055634e4STvrtko Ursulin drm-engine-video: 0 ns 735055634e4STvrtko Ursulin drm-engine-capacity-video: 2 736055634e4STvrtko Ursulin drm-engine-video-enhance: 0 ns 737055634e4STvrtko Ursulin 738055634e4STvrtko UrsulinPossible `drm-engine-` key names are: `render`, `copy`, `video` and 739055634e4STvrtko Ursulin`video-enhance`. 740