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 210e66ae6caSJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/intel_csr.c 211ca00c2b9SJani Nikula :doc: csr support for dmc 212ca00c2b9SJani Nikula 213e66ae6caSJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/display/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 332ca69a3c6SJoonas LahtinenLocking Guidelines 333ca69a3c6SJoonas Lahtinen------------------ 334ca69a3c6SJoonas Lahtinen 335ca69a3c6SJoonas Lahtinen.. note:: 336ca69a3c6SJoonas Lahtinen This is a description of how the locking should be after 337ca69a3c6SJoonas Lahtinen refactoring is done. Does not necessarily reflect what the locking 338ca69a3c6SJoonas Lahtinen looks like while WIP. 339ca69a3c6SJoonas Lahtinen 340ca69a3c6SJoonas Lahtinen#. All locking rules and interface contracts with cross-driver interfaces 341ca69a3c6SJoonas Lahtinen (dma-buf, dma_fence) need to be followed. 342ca69a3c6SJoonas Lahtinen 343ca69a3c6SJoonas Lahtinen#. No struct_mutex anywhere in the code 344ca69a3c6SJoonas Lahtinen 345ca69a3c6SJoonas Lahtinen#. dma_resv will be the outermost lock (when needed) and ww_acquire_ctx 346ca69a3c6SJoonas Lahtinen is to be hoisted at highest level and passed down within i915_gem_ctx 347ca69a3c6SJoonas Lahtinen in the call chain 348ca69a3c6SJoonas Lahtinen 349ca69a3c6SJoonas Lahtinen#. While holding lru/memory manager (buddy, drm_mm, whatever) locks 350ca69a3c6SJoonas Lahtinen system memory allocations are not allowed 351ca69a3c6SJoonas Lahtinen 352ca69a3c6SJoonas Lahtinen * Enforce this by priming lockdep (with fs_reclaim). If we 353ca69a3c6SJoonas Lahtinen allocate memory while holding these looks we get a rehash 354ca69a3c6SJoonas Lahtinen of the shrinker vs. struct_mutex saga, and that would be 355ca69a3c6SJoonas Lahtinen real bad. 356ca69a3c6SJoonas Lahtinen 357ca69a3c6SJoonas Lahtinen#. Do not nest different lru/memory manager locks within each other. 358ca69a3c6SJoonas Lahtinen Take them in turn to update memory allocations, relying on the object’s 359ca69a3c6SJoonas Lahtinen dma_resv ww_mutex to serialize against other operations. 360ca69a3c6SJoonas Lahtinen 361ca69a3c6SJoonas Lahtinen#. The suggestion for lru/memory managers locks is that they are small 362ca69a3c6SJoonas Lahtinen enough to be spinlocks. 363ca69a3c6SJoonas Lahtinen 364ca69a3c6SJoonas Lahtinen#. All features need to come with exhaustive kernel selftests and/or 365ca69a3c6SJoonas Lahtinen IGT tests when appropriate 366ca69a3c6SJoonas Lahtinen 367ca69a3c6SJoonas Lahtinen#. All LMEM uAPI paths need to be fully restartable (_interruptible() 368ca69a3c6SJoonas Lahtinen for all locks/waits/sleeps) 369ca69a3c6SJoonas Lahtinen 370ca69a3c6SJoonas Lahtinen * Error handling validation through signal injection. 371ca69a3c6SJoonas Lahtinen Still the best strategy we have for validating GEM uAPI 372ca69a3c6SJoonas Lahtinen corner cases. 373ca69a3c6SJoonas Lahtinen Must be excessively used in the IGT, and we need to check 374ca69a3c6SJoonas Lahtinen that we really have full path coverage of all error cases. 375ca69a3c6SJoonas Lahtinen 376ca69a3c6SJoonas Lahtinen * -EDEADLK handling with ww_mutex 377ca69a3c6SJoonas Lahtinen 378fd5ff5f6SKevin RogovinGEM BO Management Implementation Details 379fd5ff5f6SKevin Rogovin---------------------------------------- 380fd5ff5f6SKevin Rogovin 38183dc7f69SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/i915_vma_types.h 382fd5ff5f6SKevin Rogovin :doc: Virtual Memory Address 383fd5ff5f6SKevin Rogovin 384fd5ff5f6SKevin RogovinBuffer Object Eviction 385fd5ff5f6SKevin Rogovin---------------------- 386fd5ff5f6SKevin Rogovin 387fd5ff5f6SKevin RogovinThis section documents the interface functions for evicting buffer 388fd5ff5f6SKevin Rogovinobjects to make space available in the virtual gpu address spaces. Note 389fd5ff5f6SKevin Rogovinthat this is mostly orthogonal to shrinking buffer objects caches, which 390fd5ff5f6SKevin Rogovinhas the goal to make main memory (shared with the gpu through the 391fd5ff5f6SKevin Rogovinunified memory architecture) available. 392fd5ff5f6SKevin Rogovin 393fd5ff5f6SKevin Rogovin.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_evict.c 394fd5ff5f6SKevin Rogovin :internal: 395fd5ff5f6SKevin Rogovin 396fd5ff5f6SKevin RogovinBuffer Object Memory Shrinking 397fd5ff5f6SKevin Rogovin------------------------------ 398fd5ff5f6SKevin Rogovin 399fd5ff5f6SKevin RogovinThis section documents the interface function for shrinking memory usage 400fd5ff5f6SKevin Rogovinof buffer object caches. Shrinking is used to make main memory 401fd5ff5f6SKevin Rogovinavailable. Note that this is mostly orthogonal to evicting buffer 402fd5ff5f6SKevin Rogovinobjects, which has the goal to make space in gpu virtual address spaces. 403fd5ff5f6SKevin Rogovin 4048a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c 405fd5ff5f6SKevin Rogovin :internal: 406fd5ff5f6SKevin Rogovin 407ca00c2b9SJani NikulaBatchbuffer Parsing 40822554020SJani Nikula------------------- 409ca00c2b9SJani Nikula 410ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c 411ca00c2b9SJani Nikula :doc: batch buffer command parser 412ca00c2b9SJani Nikula 413ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c 414ca00c2b9SJani Nikula :internal: 415ca00c2b9SJani Nikula 4164d42db18SKevin RogovinUser Batchbuffer Execution 4174d42db18SKevin Rogovin-------------------------- 4184d42db18SKevin Rogovin 4198a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c 4204d42db18SKevin Rogovin :doc: User command execution 4214d42db18SKevin Rogovin 422ca00c2b9SJani NikulaLogical Rings, Logical Ring Contexts and Execlists 42322554020SJani Nikula-------------------------------------------------- 424ca00c2b9SJani Nikula 425bcc8737dSMauro Carvalho Chehab.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_lrc.c 426ca00c2b9SJani Nikula :doc: Logical Rings, Logical Ring Contexts and Execlists 427ca00c2b9SJani Nikula 428ca00c2b9SJani NikulaGlobal GTT views 42922554020SJani Nikula---------------- 430ca00c2b9SJani Nikula 43183dc7f69SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/i915_vma_types.h 432ca00c2b9SJani Nikula :doc: Global GTT views 433ca00c2b9SJani Nikula 434ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_gtt.c 435ca00c2b9SJani Nikula :internal: 436ca00c2b9SJani Nikula 437ca00c2b9SJani NikulaGTT Fences and Swizzling 43822554020SJani Nikula------------------------ 439ca00c2b9SJani Nikula 440ba69fb16SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c 441ca00c2b9SJani Nikula :internal: 442ca00c2b9SJani Nikula 443ca00c2b9SJani NikulaGlobal GTT Fence Handling 44422554020SJani Nikula~~~~~~~~~~~~~~~~~~~~~~~~~ 445ca00c2b9SJani Nikula 446ba69fb16SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c 447ca00c2b9SJani Nikula :doc: fence register handling 448ca00c2b9SJani Nikula 449ca00c2b9SJani NikulaHardware Tiling and Swizzling Details 45022554020SJani Nikula~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 451ca00c2b9SJani Nikula 452ba69fb16SChris Wilson.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c 453ca00c2b9SJani Nikula :doc: tiling swizzling details 454ca00c2b9SJani Nikula 455ca00c2b9SJani NikulaObject Tiling IOCTLs 45622554020SJani Nikula-------------------- 457ca00c2b9SJani Nikula 4588a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c 459ca00c2b9SJani Nikula :internal: 460ca00c2b9SJani Nikula 4618a6f43d4SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c 462ca00c2b9SJani Nikula :doc: buffer object tiling 463ca00c2b9SJani Nikula 464493065e2SDaniele Ceraolo SpurioMicrocontrollers 465493065e2SDaniele Ceraolo Spurio================ 466493065e2SDaniele Ceraolo Spurio 467493065e2SDaniele Ceraolo SpurioStarting from gen9, three microcontrollers are available on the HW: the 468493065e2SDaniele Ceraolo Spuriographics microcontroller (GuC), the HEVC/H.265 microcontroller (HuC) and the 469493065e2SDaniele Ceraolo Spuriodisplay microcontroller (DMC). The driver is responsible for loading the 470493065e2SDaniele Ceraolo Spuriofirmwares on the microcontrollers; the GuC and HuC firmwares are transferred 471493065e2SDaniele Ceraolo Spurioto WOPCM using the DMA engine, while the DMC firmware is written through MMIO. 472493065e2SDaniele Ceraolo Spurio 473fbe6f8f2SYaodong LiWOPCM 4744072761bSJoonas Lahtinen----- 475fbe6f8f2SYaodong Li 476fbe6f8f2SYaodong LiWOPCM Layout 4774072761bSJoonas Lahtinen~~~~~~~~~~~~ 478fbe6f8f2SYaodong Li 479fbe6f8f2SYaodong Li.. kernel-doc:: drivers/gpu/drm/i915/intel_wopcm.c 480fbe6f8f2SYaodong Li :doc: WOPCM Layout 481fbe6f8f2SYaodong Li 482ca00c2b9SJani NikulaGuC 4834072761bSJoonas Lahtinen--- 484ca00c2b9SJani Nikula 485218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 486218151e9SDaniele Ceraolo Spurio :doc: GuC 487218151e9SDaniele Ceraolo Spurio 488218151e9SDaniele Ceraolo SpurioGuC Firmware Layout 489218151e9SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~ 490199dddedSMichal Wajdeczko 491abf30f23SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h 492199dddedSMichal Wajdeczko :doc: Firmware Layout 493199dddedSMichal Wajdeczko 494218151e9SDaniele Ceraolo SpurioGuC Memory Management 495218151e9SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~~~ 496218151e9SDaniele Ceraolo Spurio 497218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 498218151e9SDaniele Ceraolo Spurio :doc: GuC Memory Management 499218151e9SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c 500218151e9SDaniele Ceraolo Spurio :functions: intel_guc_allocate_vma 501218151e9SDaniele Ceraolo Spurio 502218151e9SDaniele Ceraolo Spurio 503ca00c2b9SJani NikulaGuC-specific firmware loader 5044072761bSJoonas Lahtinen~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 505ca00c2b9SJani Nikula 506dbbff8c3SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c 507ca00c2b9SJani Nikula :internal: 508ca00c2b9SJani Nikula 509ca00c2b9SJani NikulaGuC-based command submission 5104072761bSJoonas Lahtinen~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 511ca00c2b9SJani Nikula 512dbbff8c3SMichal Wajdeczko.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 513ca00c2b9SJani Nikula :doc: GuC-based command submission 514ca00c2b9SJani Nikula 515493065e2SDaniele Ceraolo SpurioHuC 516493065e2SDaniele Ceraolo Spurio--- 5170b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 5180b23e2a6SDaniele Ceraolo Spurio :doc: HuC 5190b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 5200b23e2a6SDaniele Ceraolo Spurio :functions: intel_huc_auth 5210b23e2a6SDaniele Ceraolo Spurio 5220b23e2a6SDaniele Ceraolo SpurioHuC Memory Management 5230b23e2a6SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~~~ 5240b23e2a6SDaniele Ceraolo Spurio 5250b23e2a6SDaniele Ceraolo Spurio.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c 5260b23e2a6SDaniele Ceraolo Spurio :doc: HuC Memory Management 5270b23e2a6SDaniele Ceraolo Spurio 5280b23e2a6SDaniele Ceraolo SpurioHuC Firmware Layout 5290b23e2a6SDaniele Ceraolo Spurio~~~~~~~~~~~~~~~~~~~ 5300b23e2a6SDaniele Ceraolo SpurioThe HuC FW layout is the same as the GuC one, see `GuC Firmware Layout`_ 531493065e2SDaniele Ceraolo Spurio 532493065e2SDaniele Ceraolo SpurioDMC 533493065e2SDaniele Ceraolo Spurio--- 534493065e2SDaniele Ceraolo SpurioSee `CSR firmware support for DMC`_ 535493065e2SDaniele Ceraolo Spurio 536ca00c2b9SJani NikulaTracing 53722554020SJani Nikula======= 538ca00c2b9SJani Nikula 539ca00c2b9SJani NikulaThis sections covers all things related to the tracepoints implemented 540ca00c2b9SJani Nikulain the i915 driver. 541ca00c2b9SJani Nikula 542ca00c2b9SJani Nikulai915_ppgtt_create and i915_ppgtt_release 54322554020SJani Nikula---------------------------------------- 544ca00c2b9SJani Nikula 545ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 546ca00c2b9SJani Nikula :doc: i915_ppgtt_create and i915_ppgtt_release tracepoints 547ca00c2b9SJani Nikula 548ca00c2b9SJani Nikulai915_context_create and i915_context_free 54922554020SJani Nikula----------------------------------------- 550ca00c2b9SJani Nikula 551ca00c2b9SJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h 552ca00c2b9SJani Nikula :doc: i915_context_create and i915_context_free tracepoints 553ca00c2b9SJani Nikula 55416d98b31SRobert BraggPerf 55516d98b31SRobert Bragg==== 55616d98b31SRobert Bragg 55716d98b31SRobert BraggOverview 55816d98b31SRobert Bragg-------- 55916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56016d98b31SRobert Bragg :doc: i915 Perf Overview 56116d98b31SRobert Bragg 56216d98b31SRobert BraggComparison with Core Perf 56316d98b31SRobert Bragg------------------------- 56416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 56516d98b31SRobert Bragg :doc: i915 Perf History and Comparison with Core Perf 56616d98b31SRobert Bragg 56716d98b31SRobert Braggi915 Driver Entry Points 56816d98b31SRobert Bragg------------------------ 56916d98b31SRobert Bragg 57016d98b31SRobert BraggThis section covers the entrypoints exported outside of i915_perf.c to 57116d98b31SRobert Braggintegrate with drm/i915 and to handle the `DRM_I915_PERF_OPEN` ioctl. 57216d98b31SRobert Bragg 57316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 57416d98b31SRobert Bragg :functions: i915_perf_init 57516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 57616d98b31SRobert Bragg :functions: i915_perf_fini 57716d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 57816d98b31SRobert Bragg :functions: i915_perf_register 57916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 58016d98b31SRobert Bragg :functions: i915_perf_unregister 58116d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 58216d98b31SRobert Bragg :functions: i915_perf_open_ioctl 58316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 58416d98b31SRobert Bragg :functions: i915_perf_release 585f89823c2SLionel Landwerlin.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 586f89823c2SLionel Landwerlin :functions: i915_perf_add_config_ioctl 587f89823c2SLionel Landwerlin.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 588f89823c2SLionel Landwerlin :functions: i915_perf_remove_config_ioctl 58916d98b31SRobert Bragg 59016d98b31SRobert Braggi915 Perf Stream 59116d98b31SRobert Bragg---------------- 59216d98b31SRobert Bragg 59316d98b31SRobert BraggThis section covers the stream-semantics-agnostic structures and functions 59416d98b31SRobert Braggfor representing an i915 perf stream FD and associated file operations. 59516d98b31SRobert Bragg 5968c638802SAnna Karas.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h 59716d98b31SRobert Bragg :functions: i915_perf_stream 5988c638802SAnna Karas.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h 59916d98b31SRobert Bragg :functions: i915_perf_stream_ops 60016d98b31SRobert Bragg 60116d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60216d98b31SRobert Bragg :functions: read_properties_unlocked 60316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60416d98b31SRobert Bragg :functions: i915_perf_open_ioctl_locked 60516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60616d98b31SRobert Bragg :functions: i915_perf_destroy_locked 60716d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 60816d98b31SRobert Bragg :functions: i915_perf_read 60916d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 61016d98b31SRobert Bragg :functions: i915_perf_ioctl 61116d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 61216d98b31SRobert Bragg :functions: i915_perf_enable_locked 61316d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 61416d98b31SRobert Bragg :functions: i915_perf_disable_locked 61516d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 61616d98b31SRobert Bragg :functions: i915_perf_poll 61716d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 61816d98b31SRobert Bragg :functions: i915_perf_poll_locked 61916d98b31SRobert Bragg 62016d98b31SRobert Braggi915 Perf Observation Architecture Stream 62116d98b31SRobert Bragg----------------------------------------- 62216d98b31SRobert Bragg 6238c638802SAnna Karas.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h 62416d98b31SRobert Bragg :functions: i915_oa_ops 62516d98b31SRobert Bragg 62616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 62716d98b31SRobert Bragg :functions: i915_oa_stream_init 62816d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 62916d98b31SRobert Bragg :functions: i915_oa_read 63016d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63116d98b31SRobert Bragg :functions: i915_oa_stream_enable 63216d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63316d98b31SRobert Bragg :functions: i915_oa_stream_disable 63416d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63516d98b31SRobert Bragg :functions: i915_oa_wait_unlocked 63616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 63716d98b31SRobert Bragg :functions: i915_oa_poll_wait 63816d98b31SRobert Bragg 639*11604da2SMauro Carvalho ChehabOther i915 Perf Internals 640*11604da2SMauro Carvalho Chehab------------------------- 64116d98b31SRobert Bragg 642*11604da2SMauro Carvalho ChehabThis section simply includes all other currently documented i915 perf internals, 643*11604da2SMauro Carvalho Chehabin no particular order, but may include some more minor utilities or platform 64416d98b31SRobert Braggspecific details than found in the more high-level sections. 64516d98b31SRobert Bragg 64616d98b31SRobert Bragg.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c 64716d98b31SRobert Bragg :internal: 648*11604da2SMauro Carvalho Chehab :no-identifiers: 649*11604da2SMauro Carvalho Chehab i915_perf_init 650*11604da2SMauro Carvalho Chehab i915_perf_fini 651*11604da2SMauro Carvalho Chehab i915_perf_register 652*11604da2SMauro Carvalho Chehab i915_perf_unregister 653*11604da2SMauro Carvalho Chehab i915_perf_open_ioctl 654*11604da2SMauro Carvalho Chehab i915_perf_release 655*11604da2SMauro Carvalho Chehab i915_perf_add_config_ioctl 656*11604da2SMauro Carvalho Chehab i915_perf_remove_config_ioctl 657*11604da2SMauro Carvalho Chehab read_properties_unlocked 658*11604da2SMauro Carvalho Chehab i915_perf_open_ioctl_locked 659*11604da2SMauro Carvalho Chehab i915_perf_destroy_locked 660*11604da2SMauro Carvalho Chehab i915_perf_read i915_perf_ioctl 661*11604da2SMauro Carvalho Chehab i915_perf_enable_locked 662*11604da2SMauro Carvalho Chehab i915_perf_disable_locked 663*11604da2SMauro Carvalho Chehab i915_perf_poll i915_perf_poll_locked 664*11604da2SMauro Carvalho Chehab i915_oa_stream_init i915_oa_read 665*11604da2SMauro Carvalho Chehab i915_oa_stream_enable 666*11604da2SMauro Carvalho Chehab i915_oa_stream_disable 667*11604da2SMauro Carvalho Chehab i915_oa_wait_unlocked 668*11604da2SMauro Carvalho Chehab i915_oa_poll_wait 6691aa920eaSJani Nikula 6701aa920eaSJani NikulaStyle 6711aa920eaSJani Nikula===== 6721aa920eaSJani Nikula 6731aa920eaSJani NikulaThe drm/i915 driver codebase has some style rules in addition to (and, in some 6741aa920eaSJani Nikulacases, deviating from) the kernel coding style. 6751aa920eaSJani Nikula 6761aa920eaSJani NikulaRegister macro definition style 6771aa920eaSJani Nikula------------------------------- 6781aa920eaSJani Nikula 6791aa920eaSJani NikulaThe style guide for ``i915_reg.h``. 6801aa920eaSJani Nikula 6811aa920eaSJani Nikula.. kernel-doc:: drivers/gpu/drm/i915/i915_reg.h 6821aa920eaSJani Nikula :doc: The i915 register macro definition style guide 683