Chapter 4. drm/i915 Intel GFX Driver

Table of Contents

Core Driver Infrastructure
Runtime Power Management
Interrupt Handling
Display Hardware Handling
Mode Setting Infrastructure
Frontbuffer Tracking
Display FIFO Underrun Reporting
Plane Configuration
Output Probing
High Definition Audio
Panel Self Refresh PSR (PSR/SRD)
DPIO
Memory Management and Command Submission
Batchbuffer Parsing
Logical Rings, Logical Ring Contexts and Execlists
Tracing
i915_ppgtt_create and i915_ppgtt_release
i915_context_create and i915_context_free
switch_mm

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

This section covers core driver infrastructure used by both the display and the GEM parts of the driver.

Runtime Power Management

__intel_display_power_is_enabled — unlocked check for a power domain
intel_display_power_is_enabled — unlocked check for a power domain
intel_display_set_init_power — set the initial power domain state
intel_display_power_get — grab a power domain reference
intel_display_power_put — release a power domain reference
intel_power_domains_init — initializes the power domain structures
intel_power_domains_fini — finalizes the power domain structures
intel_power_domains_init_hw — initialize hardware power domain state
intel_aux_display_runtime_get — grab an auxilliary power domain reference
intel_aux_display_runtime_put — release an auxilliary power domain reference
intel_runtime_pm_get — grab a runtime pm reference
intel_runtime_pm_get_noresume — grab a runtime pm reference
intel_runtime_pm_put — release a runtime pm reference
intel_runtime_pm_enable — enable runtime pm

The i915 driver supports dynamic enabling and disabling of entire hardware blocks at runtime. This is especially important on the display side where software is supposed to control many power gates manually on recent hardware, since on the GT side a lot of the power management is done by the hardware. But even there some manual control at the device level is required.

Since i915 supports a diverse set of platforms with a unified codebase and hardware engineers just love to shuffle functionality around between power domains there's a sizeable amount of indirection required. This file provides generic functions to the driver for grabbing and releasing references for abstract power domains. It then maps those to the actual power wells present for a given platform.

Interrupt Handling

intel_irq_init — initializes irq support
intel_hpd_init — initializes and enables hpd support
/build/linux-Oh2Y1R/linux-3.19.0//drivers/gpu/drm/i915/i915_irq.c — Document generation inconsistency
intel_runtime_pm_disable_interrupts — runtime interrupt disabling
intel_runtime_pm_enable_interrupts — runtime interrupt enabling

These functions provide the basic support for enabling and disabling the interrupt handling support. There's a lot more functionality in i915_irq.c and related files, but that will be described in separate chapters.