class Controller

Defined at line 64 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

Public Methods

fdf::MmioBuffer * mmio_space ()

Defined at line 152 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

Interrupts * interrupts ()

Defined at line 153 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

uint16_t device_id ()

Defined at line 154 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

const IgdOpRegion & igd_opregion ()

Defined at line 155 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

Power * power ()

Defined at line 156 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

PipeManager * pipe_manager ()

Defined at line 157 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

DisplayPllManager * dpll_manager ()

Defined at line 158 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

IgdOpRegion * igd_opregion_for_testing ()

Non-const getter to allow unit tests to modify the IGD.

TODO(https://fxbug.dev/42164736): Consider making a fake IGD object injectable as allowing

mutable access to internal state that is intended to be externally immutable can be source of

bugs if used incorrectly. The various "ForTesting" methods are a typical anti-pattern that

exposes internal state and makes the class state machine harder to reason about.

Defined at line 165 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

void SetDpllManagerForTesting (std::unique_ptr<DisplayPllManager> dpll_manager)

Defined at line 173 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

void SetPipeManagerForTesting (std::unique_ptr<PipeManager> pipe_manager)

Defined at line 176 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

void SetPowerWellForTesting (std::unique_ptr<Power> power_well)

Defined at line 179 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

void SetMmioForTesting (const fdf::MmioView & mmio_space)

Defined at line 180 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

void ResetMmioSpaceForTesting ()

Defined at line 182 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

zx_status_t SetAndInitSysmemForTesting (fidl::WireSyncClient<fuchsia_sysmem2::Allocator> sysmem)

Defined at line 184 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

inspect::Inspector & inspector ()

Defined at line 206 of file ../../src/graphics/display/drivers/intel-display/intel-display.h

zx::result<std::unique_ptr<Controller>> Create (fidl::ClientEnd<fuchsia_sysmem2::Allocator> sysmem, fidl::ClientEnd<fuchsia_hardware_pci::Device> pci, ControllerResources resources, std::optional<zbi_swfb_t> framebuffer_info, display::DisplayEngineEventsInterface * engine_events, inspect::Inspector inspector)

Creates a `Controller` instance and performs short-running initialization

of all subcomponents.

Long-running initialization is performed in the Start() hook.

`sysmem` must be non-null.

`pci` must be non-null.

`resources` must be valid while the Controller instance is alive.

`engine_events` must be non-null and must outlive the created `Controller`

instance.

Defined at line 2310 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void Controller (fidl::ClientEnd<fuchsia_sysmem2::Allocator> sysmem, fidl::ClientEnd<fuchsia_hardware_pci::Device> pci, ControllerResources resources, std::optional<zbi_swfb_t> framebuffer_info, display::DisplayEngineEventsInterface * engine_events, inspect::Inspector inspector)

Prefer to use the `Create()` factory function in production code.

Defined at line 2279 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void Controller (display::DisplayEngineEventsInterface * engine_events, inspect::Inspector inspector)

Creates a Controller with no valid FIDL clients and no resources for

testing purpose only.

`engine_events` must be non-null and must outlive the created `Controller`

instance.

Defined at line 2293 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void ~Controller ()

Defined at line 2299 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void Start (fdf::StartCompleter completer)

Corresponds to DFv2 `Start()`.

Defined at line 2031 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void PrepareStopOnPowerOn (fdf::PrepareStopCompleter completer)

Corresponds to DFv2 `PrepareStop()`.

Defined at line 2054 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void PrepareStopOnPowerStateTransition (fuchsia_system_state::SystemPowerState power_state, fdf::PrepareStopCompleter completer)

Corresponds to DFv2 `PrepareStop()`.

Defined at line 2063 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

display::EngineInfo CompleteCoordinatorConnection ()

DisplayEngine methods

Defined at line 782 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx::result<> ImportBufferCollection (display::DriverBufferCollectionId buffer_collection_id, fidl::ClientEnd<fuchsia_sysmem2::BufferCollectionToken> buffer_collection_token)

Defined at line 839 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx::result<> ReleaseBufferCollection (display::DriverBufferCollectionId buffer_collection_id)

Defined at line 869 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx::result<display::DriverImageId> ImportImage (const display::ImageMetadata & image_metadata, display::DriverBufferCollectionId buffer_collection_id, uint32_t buffer_index)

Defined at line 880 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx::result<display::DriverCaptureImageId> ImportImageForCapture (display::DriverBufferCollectionId buffer_collection_id, uint32_t buffer_index)

Defined at line 1047 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void ReleaseImage (display::DriverImageId driver_image_id)

Defined at line 1052 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

display::ConfigCheckResult CheckConfiguration (display::DisplayId display_id, display::ModeId mode_id, display::ColorConversion color_conversion, cpp20::span<const display::DriverLayer> layers)

Defined at line 1548 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void ApplyConfiguration (display::DisplayId display_id, display::ModeId display_mode_id, display::ColorConversion color_conversion, cpp20::span<const display::DriverLayer> layers, display::DriverConfigStamp driver_config_stamp)

Defined at line 1761 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx::result<> SetBufferCollectionConstraints (const display::ImageBufferUsage & image_buffer_usage, display::DriverBufferCollectionId buffer_collection_id)

Defined at line 1816 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx::result<> SetDisplayPowerMode (display::DisplayId display_id, display::PowerMode power_mode)

Defined at line 1914 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreReadPciConfig16 (uint16_t addr, uint16_t * value_out)

Intel GPU core methods

Defined at line 1921 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreMapPciMmio (uint32_t pci_bar, uint8_t ** addr_out, uint64_t * size_out)

Defined at line 1925 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreUnmapPciMmio (uint32_t pci_bar)

Defined at line 1946 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreGetPciBti (uint32_t index, zx::bti * bti_out)

Defined at line 1954 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreRegisterInterruptCallback (const intel_gpu_core_interrupt_t * callback, uint32_t interrupt_mask)

Defined at line 1958 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreUnregisterInterruptCallback ()

Defined at line 1964 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

uint64_t IntelGpuCoreGttGetSize ()

Defined at line 1970 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreGttAlloc (uint64_t page_count, uint64_t * addr_out)

Defined at line 1975 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreGttFree (uint64_t addr)

Defined at line 1994 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreGttClear (uint64_t addr)

Defined at line 2005 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t IntelGpuCoreGttInsert (uint64_t addr, zx::vmo buffer, uint64_t page_offset, uint64_t page_count)

Defined at line 2016 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void HandleHotplug (DdiId ddi_id, bool long_pulse)

Defined at line 162 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void HandlePipeVsync (PipeId pipe_id_num, zx::time_monotonic timestamp)

Defined at line 207 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

void ResetPipePlaneBuffers (PipeId pipe_id)

Defined at line 447 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

bool ResetDdi (DdiId ddi_id, std::optional<TranscoderId> transcoder_id)

Defined at line 455 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx_status_t InitGttForTesting (const ddk::Pci & pci, fdf::MmioBuffer buffer, uint32_t fb_offset)

Defined at line 507 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

const GttRegion & SetupGttImage (const display::ImageMetadata & image_metadata, display::DriverImageId image_id, display::CoordinateTransformation coordinate_transformation)

For every frame, in order to use the imported image, it is required to set

up the image based on given rotation in GTT and use the handle offset in

GTT. Returns the Gtt region representing the image.

Defined at line 513 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

PixelFormatAndModifier GetImportedImagePixelFormat (display::DriverImageId image_id)

The pixel format negotiated by sysmem for an imported image.

`image_id` must correspond to an image that was successfully imported, and

was not released.

Defined at line 1064 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc

zx::result<ddk::AnyProtocol> GetProtocol (uint32_t proto_id)

Defined at line 2268 of file ../../src/graphics/display/drivers/intel-display/intel-display.cc