2016-06-21 19:49:00 +08:00
|
|
|
|
===========================
|
|
|
|
|
drm/i915 Intel GFX Driver
|
|
|
|
|
===========================
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
The drm/i915 driver supports all (with the exception of some very early
|
|
|
|
|
models) integrated GFX chipsets with both Intel display and rendering
|
|
|
|
|
blocks. This excludes a set of SoC platforms with an SGX rendering unit,
|
|
|
|
|
those have basic support through the gma500 drm driver.
|
|
|
|
|
|
|
|
|
|
Core Driver Infrastructure
|
2016-06-21 19:49:00 +08:00
|
|
|
|
==========================
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
This section covers core driver infrastructure used by both the display
|
|
|
|
|
and the GEM parts of the driver.
|
|
|
|
|
|
|
|
|
|
Runtime Power Management
|
2016-06-21 19:49:00 +08:00
|
|
|
|
------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/intel_runtime_pm.c
|
|
|
|
|
:doc: runtime pm
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/intel_runtime_pm.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/intel_uncore.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
Interrupt Handling
|
2016-06-21 19:49:00 +08:00
|
|
|
|
------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c
|
|
|
|
|
:doc: interrupt handling
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c
|
|
|
|
|
:functions: intel_irq_init intel_irq_init_hw intel_hpd_init
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c
|
|
|
|
|
:functions: intel_runtime_pm_disable_interrupts
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_irq.c
|
|
|
|
|
:functions: intel_runtime_pm_enable_interrupts
|
|
|
|
|
|
|
|
|
|
Intel GVT-g Guest Support(vGPU)
|
2016-06-21 19:49:00 +08:00
|
|
|
|
-------------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_vgpu.c
|
|
|
|
|
:doc: Intel GVT-g guest support
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_vgpu.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
2016-10-19 14:40:59 +08:00
|
|
|
|
Intel GVT-g Host Support(vGPU device model)
|
|
|
|
|
-------------------------------------------
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/intel_gvt.c
|
|
|
|
|
:doc: Intel GVT-g host support
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/intel_gvt.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
2018-04-11 00:12:46 +08:00
|
|
|
|
Workarounds
|
|
|
|
|
-----------
|
|
|
|
|
|
2019-06-04 22:17:42 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_workarounds.c
|
2018-04-11 00:12:46 +08:00
|
|
|
|
:doc: Hardware workarounds
|
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
Display Hardware Handling
|
2016-06-21 19:49:00 +08:00
|
|
|
|
=========================
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
This section covers everything related to the display hardware including
|
|
|
|
|
the mode setting infrastructure, plane, sprite and cursor handling and
|
|
|
|
|
display, output probing and related topics.
|
|
|
|
|
|
|
|
|
|
Mode Setting Infrastructure
|
2016-06-21 19:49:00 +08:00
|
|
|
|
---------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
The i915 driver is thus far the only DRM driver which doesn't use the
|
|
|
|
|
common DRM helper code to implement mode setting sequences. Thus it has
|
|
|
|
|
its own tailor-made infrastructure for executing a display configuration
|
|
|
|
|
change.
|
|
|
|
|
|
|
|
|
|
Frontbuffer Tracking
|
2016-06-21 19:49:00 +08:00
|
|
|
|
--------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_frontbuffer.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: frontbuffer tracking
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_frontbuffer.h
|
2016-08-04 23:32:35 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_frontbuffer.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
Display FIFO Underrun Reporting
|
2016-06-21 19:49:00 +08:00
|
|
|
|
-------------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fifo_underrun.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: fifo underrun handling
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fifo_underrun.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
Plane Configuration
|
2016-06-21 19:49:00 +08:00
|
|
|
|
-------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
This section covers plane configuration and composition with the primary
|
|
|
|
|
plane, sprites, cursors and overlays. This includes the infrastructure
|
|
|
|
|
to do atomic vsync'ed updates of all this state and also tightly coupled
|
|
|
|
|
topics like watermark setup and computation, framebuffer compression and
|
|
|
|
|
panel self refresh.
|
|
|
|
|
|
|
|
|
|
Atomic Plane Helpers
|
2016-06-21 19:49:00 +08:00
|
|
|
|
--------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_atomic_plane.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: atomic plane helpers
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_atomic_plane.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2020-09-21 19:02:09 +08:00
|
|
|
|
Asynchronous Page Flip
|
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_display.c
|
|
|
|
|
:doc: asynchronous flip implementation
|
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
Output Probing
|
2016-06-21 19:49:00 +08:00
|
|
|
|
--------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
This section covers output probing and related infrastructure like the
|
|
|
|
|
hotplug interrupt storm detection and mitigation code. Note that the
|
|
|
|
|
i915 driver still uses most of the common DRM helper code for output
|
|
|
|
|
probing, so those sections fully apply.
|
|
|
|
|
|
|
|
|
|
Hotplug
|
2016-06-21 19:49:00 +08:00
|
|
|
|
-------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_hotplug.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: Hotplug
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_hotplug.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
High Definition Audio
|
2016-06-21 19:49:00 +08:00
|
|
|
|
---------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_audio.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: High Definition Audio over HDMI and Display Port
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_audio.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/i915_component.h
|
|
|
|
|
:internal:
|
|
|
|
|
|
2017-01-26 17:50:43 +08:00
|
|
|
|
Intel HDMI LPE Audio Support
|
|
|
|
|
----------------------------
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_lpe_audio.c
|
2017-01-26 17:50:43 +08:00
|
|
|
|
:doc: LPE Audio integration for HDMI or DP playback
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_lpe_audio.c
|
2017-01-26 17:50:43 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
Panel Self Refresh PSR (PSR/SRD)
|
2016-06-21 19:49:00 +08:00
|
|
|
|
--------------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_psr.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: Panel Self Refresh (PSR/SRD)
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_psr.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
Frame Buffer Compression (FBC)
|
2016-06-21 19:49:00 +08:00
|
|
|
|
------------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fbc.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: Frame Buffer Compression (FBC)
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_fbc.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
Display Refresh Rate Switching (DRRS)
|
2016-06-21 19:49:00 +08:00
|
|
|
|
-------------------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2021-08-28 01:42:52 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_drrs.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: Display Refresh Rate Switching (DRRS)
|
|
|
|
|
|
2021-08-28 01:42:52 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_drrs.c
|
2022-03-26 02:38:32 +08:00
|
|
|
|
:internal:
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
DPIO
|
2016-06-21 19:49:00 +08:00
|
|
|
|
----
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpio_phy.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: DPIO
|
|
|
|
|
|
2021-05-19 05:34:44 +08:00
|
|
|
|
DMC Firmware Support
|
|
|
|
|
--------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2021-05-19 05:34:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dmc.c
|
|
|
|
|
:doc: DMC Firmware Support
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2021-05-19 05:34:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dmc.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
Video BIOS Table (VBT)
|
2016-06-21 19:49:00 +08:00
|
|
|
|
----------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_bios.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: Video BIOS Table (VBT)
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_bios.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_vbt_defs.h
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2017-02-08 02:33:05 +08:00
|
|
|
|
Display clocks
|
|
|
|
|
--------------
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_cdclk.c
|
2017-02-08 02:33:05 +08:00
|
|
|
|
:doc: CDCLK / RAWCLK
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_cdclk.c
|
2017-02-08 02:33:05 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2016-12-29 23:22:11 +08:00
|
|
|
|
Display PLLs
|
|
|
|
|
------------
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.c
|
2016-12-29 23:22:11 +08:00
|
|
|
|
:doc: Display PLLs
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.c
|
2016-12-29 23:22:11 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2019-06-17 18:29:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dpll_mgr.h
|
2016-12-29 23:22:11 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2019-09-20 19:59:30 +08:00
|
|
|
|
Display State Buffer
|
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dsb.c
|
|
|
|
|
:doc: DSB
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/display/intel_dsb.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
2022-06-15 08:10:19 +08:00
|
|
|
|
GT Programming
|
|
|
|
|
==============
|
|
|
|
|
|
|
|
|
|
Multicast/Replicated (MCR) Registers
|
|
|
|
|
------------------------------------
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_gt_mcr.c
|
|
|
|
|
:doc: GT Multicast/Replicated (MCR) Register Support
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_gt_mcr.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
Memory Management and Command Submission
|
2016-06-21 19:49:00 +08:00
|
|
|
|
========================================
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
This sections covers all things related to the GEM implementation in the
|
|
|
|
|
i915 driver.
|
|
|
|
|
|
2018-04-06 16:05:55 +08:00
|
|
|
|
Intel GPU Basics
|
|
|
|
|
----------------
|
|
|
|
|
|
|
|
|
|
An Intel GPU has multiple engines. There are several engine types.
|
|
|
|
|
|
|
|
|
|
- RCS engine is for rendering 3D and performing compute, this is named
|
|
|
|
|
`I915_EXEC_RENDER` in user space.
|
|
|
|
|
- BCS is a blitting (copy) engine, this is named `I915_EXEC_BLT` in user
|
|
|
|
|
space.
|
|
|
|
|
- VCS is a video encode and decode engine, this is named `I915_EXEC_BSD`
|
|
|
|
|
in user space
|
|
|
|
|
- VECS is video enhancement engine, this is named `I915_EXEC_VEBOX` in user
|
|
|
|
|
space.
|
|
|
|
|
- The enumeration `I915_EXEC_DEFAULT` does not refer to specific engine;
|
|
|
|
|
instead it is to be used by user space to specify a default rendering
|
|
|
|
|
engine (for 3D) that may or may not be the same as RCS.
|
|
|
|
|
|
|
|
|
|
The Intel GPU family is a family of integrated GPU's using Unified
|
|
|
|
|
Memory Access. For having the GPU "do work", user space will feed the
|
|
|
|
|
GPU batch buffers via one of the ioctls `DRM_IOCTL_I915_GEM_EXECBUFFER2`
|
|
|
|
|
or `DRM_IOCTL_I915_GEM_EXECBUFFER2_WR`. Most such batchbuffers will
|
|
|
|
|
instruct the GPU to perform work (for example rendering) and that work
|
|
|
|
|
needs memory from which to read and memory to which to write. All memory
|
|
|
|
|
is encapsulated within GEM buffer objects (usually created with the ioctl
|
|
|
|
|
`DRM_IOCTL_I915_GEM_CREATE`). An ioctl providing a batchbuffer for the GPU
|
|
|
|
|
to create will also list all GEM buffer objects that the batchbuffer reads
|
|
|
|
|
and/or writes. For implementation details of memory management see
|
|
|
|
|
`GEM BO Management Implementation Details`_.
|
|
|
|
|
|
|
|
|
|
The i915 driver allows user space to create a context via the ioctl
|
|
|
|
|
`DRM_IOCTL_I915_GEM_CONTEXT_CREATE` which is identified by a 32-bit
|
|
|
|
|
integer. Such a context should be viewed by user-space as -loosely-
|
|
|
|
|
analogous to the idea of a CPU process of an operating system. The i915
|
|
|
|
|
driver guarantees that commands issued to a fixed context are to be
|
|
|
|
|
executed so that writes of a previously issued command are seen by
|
|
|
|
|
reads of following commands. Actions issued between different contexts
|
|
|
|
|
(even if from the same file descriptor) are NOT given that guarantee
|
|
|
|
|
and the only way to synchronize across contexts (even from the same
|
|
|
|
|
file descriptor) is through the use of fences. At least as far back as
|
|
|
|
|
Gen4, also have that a context carries with it a GPU HW context;
|
|
|
|
|
the HW context is essentially (most of atleast) the state of a GPU.
|
|
|
|
|
In addition to the ordering guarantees, the kernel will restore GPU
|
|
|
|
|
state via HW context when commands are issued to a context, this saves
|
|
|
|
|
user space the need to restore (most of atleast) the GPU state at the
|
|
|
|
|
start of each batchbuffer. The non-deprecated ioctls to submit batchbuffer
|
|
|
|
|
work can pass that ID (in the lower bits of drm_i915_gem_execbuffer2::rsvd1)
|
|
|
|
|
to identify what context to use with the command.
|
|
|
|
|
|
|
|
|
|
The GPU has its own memory management and address space. The kernel
|
|
|
|
|
driver maintains the memory translation table for the GPU. For older
|
|
|
|
|
GPUs (i.e. those before Gen8), there is a single global such translation
|
|
|
|
|
table, a global Graphics Translation Table (GTT). For newer generation
|
|
|
|
|
GPUs each context has its own translation table, called Per-Process
|
|
|
|
|
Graphics Translation Table (PPGTT). Of important note, is that although
|
|
|
|
|
PPGTT is named per-process it is actually per context. When user space
|
|
|
|
|
submits a batchbuffer, the kernel walks the list of GEM buffer objects
|
|
|
|
|
used by the batchbuffer and guarantees that not only is the memory of
|
|
|
|
|
each such GEM buffer object resident but it is also present in the
|
|
|
|
|
(PP)GTT. If the GEM buffer object is not yet placed in the (PP)GTT,
|
|
|
|
|
then it is given an address. Two consequences of this are: the kernel
|
|
|
|
|
needs to edit the batchbuffer submitted to write the correct value of
|
|
|
|
|
the GPU address when a GEM BO is assigned a GPU address and the kernel
|
|
|
|
|
might evict a different GEM BO from the (PP)GTT to make address room
|
|
|
|
|
for another GEM BO. Consequently, the ioctls submitting a batchbuffer
|
|
|
|
|
for execution also include a list of all locations within buffers that
|
|
|
|
|
refer to GPU-addresses so that the kernel can edit the buffer correctly.
|
|
|
|
|
This process is dubbed relocation.
|
|
|
|
|
|
2019-08-30 18:50:53 +08:00
|
|
|
|
Locking Guidelines
|
|
|
|
|
------------------
|
|
|
|
|
|
|
|
|
|
.. note::
|
|
|
|
|
This is a description of how the locking should be after
|
|
|
|
|
refactoring is done. Does not necessarily reflect what the locking
|
|
|
|
|
looks like while WIP.
|
|
|
|
|
|
|
|
|
|
#. All locking rules and interface contracts with cross-driver interfaces
|
|
|
|
|
(dma-buf, dma_fence) need to be followed.
|
|
|
|
|
|
|
|
|
|
#. No struct_mutex anywhere in the code
|
|
|
|
|
|
|
|
|
|
#. dma_resv will be the outermost lock (when needed) and ww_acquire_ctx
|
|
|
|
|
is to be hoisted at highest level and passed down within i915_gem_ctx
|
|
|
|
|
in the call chain
|
|
|
|
|
|
|
|
|
|
#. While holding lru/memory manager (buddy, drm_mm, whatever) locks
|
|
|
|
|
system memory allocations are not allowed
|
|
|
|
|
|
|
|
|
|
* Enforce this by priming lockdep (with fs_reclaim). If we
|
|
|
|
|
allocate memory while holding these looks we get a rehash
|
|
|
|
|
of the shrinker vs. struct_mutex saga, and that would be
|
|
|
|
|
real bad.
|
|
|
|
|
|
|
|
|
|
#. Do not nest different lru/memory manager locks within each other.
|
|
|
|
|
Take them in turn to update memory allocations, relying on the object’s
|
|
|
|
|
dma_resv ww_mutex to serialize against other operations.
|
|
|
|
|
|
|
|
|
|
#. The suggestion for lru/memory managers locks is that they are small
|
|
|
|
|
enough to be spinlocks.
|
|
|
|
|
|
|
|
|
|
#. All features need to come with exhaustive kernel selftests and/or
|
|
|
|
|
IGT tests when appropriate
|
|
|
|
|
|
|
|
|
|
#. All LMEM uAPI paths need to be fully restartable (_interruptible()
|
|
|
|
|
for all locks/waits/sleeps)
|
|
|
|
|
|
|
|
|
|
* Error handling validation through signal injection.
|
|
|
|
|
Still the best strategy we have for validating GEM uAPI
|
|
|
|
|
corner cases.
|
|
|
|
|
Must be excessively used in the IGT, and we need to check
|
|
|
|
|
that we really have full path coverage of all error cases.
|
|
|
|
|
|
|
|
|
|
* -EDEADLK handling with ww_mutex
|
|
|
|
|
|
2018-04-06 16:05:55 +08:00
|
|
|
|
GEM BO Management Implementation Details
|
|
|
|
|
----------------------------------------
|
|
|
|
|
|
2020-03-02 22:52:54 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_vma_types.h
|
2018-04-06 16:05:55 +08:00
|
|
|
|
:doc: Virtual Memory Address
|
|
|
|
|
|
|
|
|
|
Buffer Object Eviction
|
|
|
|
|
----------------------
|
|
|
|
|
|
|
|
|
|
This section documents the interface functions for evicting buffer
|
|
|
|
|
objects to make space available in the virtual gpu address spaces. Note
|
|
|
|
|
that this is mostly orthogonal to shrinking buffer objects caches, which
|
|
|
|
|
has the goal to make main memory (shared with the gpu through the
|
|
|
|
|
unified memory architecture) available.
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_evict.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
Buffer Object Memory Shrinking
|
|
|
|
|
------------------------------
|
|
|
|
|
|
|
|
|
|
This section documents the interface function for shrinking memory usage
|
|
|
|
|
of buffer object caches. Shrinking is used to make main memory
|
|
|
|
|
available. Note that this is mostly orthogonal to evicting buffer
|
|
|
|
|
objects, which has the goal to make space in gpu virtual address spaces.
|
|
|
|
|
|
2019-06-05 17:56:56 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
|
2018-04-06 16:05:55 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
Batchbuffer Parsing
|
2016-06-21 19:49:00 +08:00
|
|
|
|
-------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c
|
|
|
|
|
:doc: batch buffer command parser
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_cmd_parser.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
2018-04-06 16:05:56 +08:00
|
|
|
|
User Batchbuffer Execution
|
|
|
|
|
--------------------------
|
|
|
|
|
|
2021-07-08 23:48:20 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_context_types.h
|
|
|
|
|
|
2019-06-05 17:56:56 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
|
2018-04-06 16:05:56 +08:00
|
|
|
|
:doc: User command execution
|
|
|
|
|
|
2021-06-18 09:06:31 +08:00
|
|
|
|
Scheduling
|
|
|
|
|
----------
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_scheduler_types.h
|
|
|
|
|
:functions: i915_sched_engine
|
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
Logical Rings, Logical Ring Contexts and Execlists
|
2016-06-21 19:49:00 +08:00
|
|
|
|
--------------------------------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2020-12-15 02:54:40 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_execlists_submission.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: Logical Rings, Logical Ring Contexts and Execlists
|
|
|
|
|
|
|
|
|
|
Global GTT views
|
2016-06-21 19:49:00 +08:00
|
|
|
|
----------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2020-03-02 22:52:54 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_vma_types.h
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: Global GTT views
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_gem_gtt.c
|
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
GTT Fences and Swizzling
|
2016-06-21 19:49:00 +08:00
|
|
|
|
------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2020-03-17 22:12:50 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
Global GTT Fence Handling
|
2016-06-21 19:49:00 +08:00
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2020-03-17 22:12:50 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: fence register handling
|
|
|
|
|
|
|
|
|
|
Hardware Tiling and Swizzling Details
|
2016-06-21 19:49:00 +08:00
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2020-03-17 22:12:50 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: tiling swizzling details
|
|
|
|
|
|
|
|
|
|
Object Tiling IOCTLs
|
2016-06-21 19:49:00 +08:00
|
|
|
|
--------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-06-05 17:56:56 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
2019-06-05 17:56:56 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gem/i915_gem_tiling.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: buffer object tiling
|
|
|
|
|
|
2021-09-25 03:14:51 +08:00
|
|
|
|
Protected Objects
|
|
|
|
|
-----------------
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/pxp/intel_pxp.c
|
|
|
|
|
:doc: PXP
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/pxp/intel_pxp_types.h
|
|
|
|
|
|
2019-10-15 02:36:00 +08:00
|
|
|
|
Microcontrollers
|
|
|
|
|
================
|
|
|
|
|
|
|
|
|
|
Starting from gen9, three microcontrollers are available on the HW: the
|
|
|
|
|
graphics microcontroller (GuC), the HEVC/H.265 microcontroller (HuC) and the
|
|
|
|
|
display microcontroller (DMC). The driver is responsible for loading the
|
|
|
|
|
firmwares on the microcontrollers; the GuC and HuC firmwares are transferred
|
|
|
|
|
to WOPCM using the DMA engine, while the DMC firmware is written through MMIO.
|
|
|
|
|
|
2018-03-23 07:59:22 +08:00
|
|
|
|
WOPCM
|
2019-08-30 16:58:49 +08:00
|
|
|
|
-----
|
2018-03-23 07:59:22 +08:00
|
|
|
|
|
|
|
|
|
WOPCM Layout
|
2019-08-30 16:58:49 +08:00
|
|
|
|
~~~~~~~~~~~~
|
2018-03-23 07:59:22 +08:00
|
|
|
|
|
2022-11-08 10:05:58 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/intel_wopcm.c
|
2018-03-23 07:59:22 +08:00
|
|
|
|
:doc: WOPCM Layout
|
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
GuC
|
2019-08-30 16:58:49 +08:00
|
|
|
|
---
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-10-15 02:36:01 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c
|
|
|
|
|
:doc: GuC
|
|
|
|
|
|
2021-09-10 00:47:44 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.h
|
|
|
|
|
|
2019-10-15 02:36:01 +08:00
|
|
|
|
GuC Firmware Layout
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
2019-07-25 22:13:07 +08:00
|
|
|
|
|
2019-07-25 22:13:08 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_uc_fw_abi.h
|
2019-07-25 22:13:07 +08:00
|
|
|
|
:doc: Firmware Layout
|
|
|
|
|
|
2019-10-15 02:36:01 +08:00
|
|
|
|
GuC Memory Management
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c
|
|
|
|
|
:doc: GuC Memory Management
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc.c
|
|
|
|
|
:functions: intel_guc_allocate_vma
|
|
|
|
|
|
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
GuC-specific firmware loader
|
2019-08-30 16:58:49 +08:00
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-07-25 22:13:06 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
|
|
GuC-based command submission
|
2019-08-30 16:58:49 +08:00
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
2019-07-25 22:13:06 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
|
2016-06-21 19:48:58 +08:00
|
|
|
|
:doc: GuC-based command submission
|
|
|
|
|
|
2021-06-16 08:13:02 +08:00
|
|
|
|
GuC ABI
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_messages_abi.h
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_communication_mmio_abi.h
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_communication_ctb_abi.h
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_actions_abi.h
|
2022-01-07 08:06:21 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/abi/guc_klvs_abi.h
|
2021-06-16 08:13:02 +08:00
|
|
|
|
|
2019-10-15 02:36:00 +08:00
|
|
|
|
HuC
|
|
|
|
|
---
|
2019-10-15 02:36:02 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c
|
|
|
|
|
:doc: HuC
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c
|
|
|
|
|
:functions: intel_huc_auth
|
|
|
|
|
|
|
|
|
|
HuC Memory Management
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/gt/uc/intel_huc.c
|
|
|
|
|
:doc: HuC Memory Management
|
|
|
|
|
|
|
|
|
|
HuC Firmware Layout
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
The HuC FW layout is the same as the GuC one, see `GuC Firmware Layout`_
|
2019-10-15 02:36:00 +08:00
|
|
|
|
|
|
|
|
|
DMC
|
|
|
|
|
---
|
2021-05-19 05:34:44 +08:00
|
|
|
|
See `DMC Firmware Support`_
|
2019-10-15 02:36:00 +08:00
|
|
|
|
|
2016-06-21 19:48:58 +08:00
|
|
|
|
Tracing
|
2016-06-21 19:49:00 +08:00
|
|
|
|
=======
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
This sections covers all things related to the tracepoints implemented
|
|
|
|
|
in the i915 driver.
|
|
|
|
|
|
|
|
|
|
i915_ppgtt_create and i915_ppgtt_release
|
2016-06-21 19:49:00 +08:00
|
|
|
|
----------------------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h
|
|
|
|
|
:doc: i915_ppgtt_create and i915_ppgtt_release tracepoints
|
|
|
|
|
|
|
|
|
|
i915_context_create and i915_context_free
|
2016-06-21 19:49:00 +08:00
|
|
|
|
-----------------------------------------
|
2016-06-21 19:48:58 +08:00
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_trace.h
|
|
|
|
|
:doc: i915_context_create and i915_context_free tracepoints
|
|
|
|
|
|
2016-12-08 05:40:33 +08:00
|
|
|
|
Perf
|
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
Overview
|
|
|
|
|
--------
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:doc: i915 Perf Overview
|
|
|
|
|
|
|
|
|
|
Comparison with Core Perf
|
|
|
|
|
-------------------------
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:doc: i915 Perf History and Comparison with Core Perf
|
|
|
|
|
|
|
|
|
|
i915 Driver Entry Points
|
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
|
|
This section covers the entrypoints exported outside of i915_perf.c to
|
|
|
|
|
integrate with drm/i915 and to handle the `DRM_I915_PERF_OPEN` ioctl.
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_init
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_fini
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_register
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_unregister
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_open_ioctl
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_release
|
2017-08-04 01:05:50 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_add_config_ioctl
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_remove_config_ioctl
|
2016-12-08 05:40:33 +08:00
|
|
|
|
|
|
|
|
|
i915 Perf Stream
|
|
|
|
|
----------------
|
|
|
|
|
|
|
|
|
|
This section covers the stream-semantics-agnostic structures and functions
|
|
|
|
|
for representing an i915 perf stream FD and associated file operations.
|
|
|
|
|
|
2019-10-22 18:09:06 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h
|
2016-12-08 05:40:33 +08:00
|
|
|
|
:functions: i915_perf_stream
|
2019-10-22 18:09:06 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h
|
2016-12-08 05:40:33 +08:00
|
|
|
|
:functions: i915_perf_stream_ops
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: read_properties_unlocked
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_open_ioctl_locked
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_destroy_locked
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_read
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_ioctl
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_enable_locked
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_disable_locked
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_poll
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_perf_poll_locked
|
|
|
|
|
|
|
|
|
|
i915 Perf Observation Architecture Stream
|
|
|
|
|
-----------------------------------------
|
|
|
|
|
|
2019-10-22 18:09:06 +08:00
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf_types.h
|
2016-12-08 05:40:33 +08:00
|
|
|
|
:functions: i915_oa_ops
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_oa_stream_init
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_oa_read
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_oa_stream_enable
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_oa_stream_disable
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_oa_wait_unlocked
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:functions: i915_oa_poll_wait
|
|
|
|
|
|
docs: gpu: i915.rst: Fix several C duplication warnings
As reported by Sphinx:
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1147: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_wait_unlocked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1169: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_poll_wait'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1189: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_read'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2669: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_enable'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2734: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_disable'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2820: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_init'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3010: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_read'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3098: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_poll_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3129: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_poll'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3152: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_enable_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3181: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_disable_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3273: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3296: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_destroy_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3321: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_release'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3379: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_open_ioctl_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3534: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'read_properties_unlocked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3717: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_open_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3760: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_register'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3789: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_unregister'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4009: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_add_config_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4162: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_remove_config_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4260: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_init'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4423: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_fini'.
With Sphinx 3, C declarations can't be duplicated anymore,
so let's exclude those from the other internals found on
i915_perf.c file.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-09-29 17:41:38 +08:00
|
|
|
|
Other i915 Perf Internals
|
|
|
|
|
-------------------------
|
2016-12-08 05:40:33 +08:00
|
|
|
|
|
docs: gpu: i915.rst: Fix several C duplication warnings
As reported by Sphinx:
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1147: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_wait_unlocked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1169: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_poll_wait'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1189: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_read'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2669: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_enable'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2734: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_disable'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2820: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_init'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3010: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_read'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3098: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_poll_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3129: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_poll'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3152: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_enable_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3181: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_disable_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3273: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3296: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_destroy_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3321: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_release'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3379: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_open_ioctl_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3534: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'read_properties_unlocked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3717: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_open_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3760: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_register'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3789: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_unregister'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4009: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_add_config_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4162: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_remove_config_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4260: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_init'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4423: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_fini'.
With Sphinx 3, C declarations can't be duplicated anymore,
so let's exclude those from the other internals found on
i915_perf.c file.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-09-29 17:41:38 +08:00
|
|
|
|
This section simply includes all other currently documented i915 perf internals,
|
|
|
|
|
in no particular order, but may include some more minor utilities or platform
|
2016-12-08 05:40:33 +08:00
|
|
|
|
specific details than found in the more high-level sections.
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_perf.c
|
|
|
|
|
:internal:
|
docs: gpu: i915.rst: Fix several C duplication warnings
As reported by Sphinx:
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1147: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_wait_unlocked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1169: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_poll_wait'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:1189: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_read'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2669: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_enable'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2734: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_disable'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:2820: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_oa_stream_init'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3010: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_read'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3098: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_poll_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3129: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_poll'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3152: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_enable_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3181: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_disable_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3273: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3296: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_destroy_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3321: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_release'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3379: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_open_ioctl_locked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3534: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'read_properties_unlocked'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3717: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_open_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3760: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_register'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:3789: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_unregister'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4009: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_add_config_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4162: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_remove_config_ioctl'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4260: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_init'.
./Documentation/gpu/i915:646: ./drivers/gpu/drm/i915/i915_perf.c:4423: WARNING: Duplicate C declaration, also defined in 'gpu/i915'.
Declaration is 'i915_perf_fini'.
With Sphinx 3, C declarations can't be duplicated anymore,
so let's exclude those from the other internals found on
i915_perf.c file.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-09-29 17:41:38 +08:00
|
|
|
|
:no-identifiers:
|
|
|
|
|
i915_perf_init
|
|
|
|
|
i915_perf_fini
|
|
|
|
|
i915_perf_register
|
|
|
|
|
i915_perf_unregister
|
|
|
|
|
i915_perf_open_ioctl
|
|
|
|
|
i915_perf_release
|
|
|
|
|
i915_perf_add_config_ioctl
|
|
|
|
|
i915_perf_remove_config_ioctl
|
|
|
|
|
read_properties_unlocked
|
|
|
|
|
i915_perf_open_ioctl_locked
|
|
|
|
|
i915_perf_destroy_locked
|
|
|
|
|
i915_perf_read i915_perf_ioctl
|
|
|
|
|
i915_perf_enable_locked
|
|
|
|
|
i915_perf_disable_locked
|
|
|
|
|
i915_perf_poll i915_perf_poll_locked
|
|
|
|
|
i915_oa_stream_init i915_oa_read
|
|
|
|
|
i915_oa_stream_enable
|
|
|
|
|
i915_oa_stream_disable
|
|
|
|
|
i915_oa_wait_unlocked
|
|
|
|
|
i915_oa_poll_wait
|
2017-08-10 20:29:44 +08:00
|
|
|
|
|
|
|
|
|
Style
|
|
|
|
|
=====
|
|
|
|
|
|
|
|
|
|
The drm/i915 driver codebase has some style rules in addition to (and, in some
|
|
|
|
|
cases, deviating from) the kernel coding style.
|
|
|
|
|
|
|
|
|
|
Register macro definition style
|
|
|
|
|
-------------------------------
|
|
|
|
|
|
|
|
|
|
The style guide for ``i915_reg.h``.
|
|
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/i915/i915_reg.h
|
|
|
|
|
:doc: The i915 register macro definition style guide
|
2022-04-01 22:22:05 +08:00
|
|
|
|
|
|
|
|
|
.. _i915-usage-stats:
|
|
|
|
|
|
|
|
|
|
i915 DRM client usage stats implementation
|
|
|
|
|
==========================================
|
|
|
|
|
|
|
|
|
|
The drm/i915 driver implements the DRM client usage stats specification as
|
|
|
|
|
documented in :ref:`drm-client-usage-stats`.
|
|
|
|
|
|
|
|
|
|
Example of the output showing the implemented key value pairs and entirety of
|
|
|
|
|
the currently possible format options:
|
|
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
|
|
pos: 0
|
|
|
|
|
flags: 0100002
|
|
|
|
|
mnt_id: 21
|
|
|
|
|
drm-driver: i915
|
|
|
|
|
drm-pdev: 0000:00:02.0
|
|
|
|
|
drm-client-id: 7
|
|
|
|
|
drm-engine-render: 9288864723 ns
|
|
|
|
|
drm-engine-copy: 2035071108 ns
|
|
|
|
|
drm-engine-video: 0 ns
|
|
|
|
|
drm-engine-capacity-video: 2
|
|
|
|
|
drm-engine-video-enhance: 0 ns
|
|
|
|
|
|
|
|
|
|
Possible `drm-engine-` key names are: `render`, `copy`, `video` and
|
|
|
|
|
`video-enhance`.
|