class PchEngine

Defined at line 251 of file ../../src/graphics/display/drivers/intel-display/pch-engine.h

Drives the display engine logic in the PCH (Platform Controller Hub).

Intel's documentation also refers to this logic as the South Display Engine.

This name was carried over from the Intel Hub Architecture, which had a

Northbridge, which hosted the North Display Engine, and a Southbridge.

Public Methods

void PchEngine (fdf::MmioBuffer * mmio_buffer, uint16_t device_id)

`mmio_buffer` must outlive this instance.

Defined at line 100 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void SetPchResetHandshake (bool enabled)

If `enabled` is true, the north (main) display engine notifies the PCH

display engine of resets, and waits for it to acknowledge.

This method must be called with `enabled` set to true during the cold-boot

display engine initialization sequence.

Defined at line 128 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void RestoreClockParameters ()

Overwrites the PCH clocking registers with cached values.

This method performs MMIO writes unconditionally. It must only be called

during the display engine initialization sequence, when resuming from a

low-power (suspended) state.

Defined at line 135 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void RestoreNonClockParameters ()

Overwrites most PCH configuration registers with cached values.

This method restores all PCH configuration registers, *except* for the

registers covered by RestoreClockParameters(). This separation is needed to

comply with the mode set sequences documented by the Intel PRMs.

This method performs MMIO writes unconditionally. It must only be called

when resuming from a low-power (suspended) state, after the display engine

is re-initialized. In particular, RestoreClockParameters() must have been

already called.

Calling this method will restore the PCH to the configuration it had before

entering a low-power (suspended) state, with the following exceptions:

* The panel will be powered off, awaiting pipe and transcoder

configuration.

* The backlight PWM will be disabled, since the panel is powered off.

Defined at line 159 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

PchClockParameters ClockParameters ()

Reports the current PCH clocking configuration.

This method is intended for retrieving the configuration applied by the

boot firmware. SetClockParameters() can perform any needed adjustments.

Defined at line 242 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void SetClockParameters (const PchClockParameters & parameters)

Updates the PCH clocking configuration.

No MMIO writes are performed if `parameters` already matches the clocking

configuration.

Defined at line 249 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void FixClockParameters (PchClockParameters & parameters)

Fixes clocking parameters that are obviously incorrect.

Defined at line 254 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void PchEngine (const PchEngine & )

Defined at line 256 of file ../../src/graphics/display/drivers/intel-display/pch-engine.h

void PchEngine (PchEngine && )

Defined at line 257 of file ../../src/graphics/display/drivers/intel-display/pch-engine.h

PchEngine & operator= (const PchEngine & )

Defined at line 258 of file ../../src/graphics/display/drivers/intel-display/pch-engine.h

PchEngine & operator= (PchEngine && )

Defined at line 259 of file ../../src/graphics/display/drivers/intel-display/pch-engine.h

void ~PchEngine ()

Trivially destructible.

Defined at line 262 of file ../../src/graphics/display/drivers/intel-display/pch-engine.h

PchPanelParameters PanelParameters ()

Reports the current PCH panel configuration.

This method is intended for retrieving the configuration applied by the

boot firmware. SetPanelParameters() can perform any needed adjustments.

The caller should ensure that the PCH clocking is configured correctly

before calling this method. The result is not meaningful if the PCH

clocking is incorrect.

Defined at line 501 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void SetPanelParameters (const PchPanelParameters & parameters)

Updates the PCH panel configuration.

The caller must ensure that the PCH clocks are configured correctly before

calling this method.

This method preserves (modulo precision errors) the PWM backlight's

brightness level when the PWM frequency changes. The brightness level will

be set to 0% if the PWM was not previously configured. The brightness level

will be normalized to 100% if it was (incorrectly) set above 100%.

No MMIO writes are performed if `parameters` already matches the panel

configuration (unless the PWM brightness level must be normalized).

Defined at line 590 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

PchPanelPowerTarget PanelPowerTarget ()

Reports the target configuration of the PCH panel power subsystem.

This method is intended for retrieving the configuration applied by the

boot firmware. SetPanelPowerTarget() can drive the transition to new power

states.

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

PchPanelPowerState PanelPowerState ()

Returns the panel power state reported by the PCH.

This method is not idempotent.

Defined at line 199 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

bool WaitForPanelPowerState (PchPanelPowerState power_state, int timeout_us)

Waits for the PCH panel power sequence to reach a given state.

Returns true if the PCH panel reached the given state within the allotted

time. Returns false if the timeout ran out before the PCH panel reached the

desired state.

While `power_state` can be any value, the meaningful values are kPoweredUp

and kPoweredDown.

`timeout_us` must be positive. The eDP 1.4 standard allows for 90ms. The

SPWG Notebook Panel standard allows for 210ms. The Atlas panel needs almost

400ms.

Defined at line 226 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void SetPanelPowerTarget (const PchPanelPowerTarget & power_target)

Updates the PCH panel power subsystem's target configuration.

The caller must ensure that the PCH panel parameters are configured

correctly before calling this method with `power_on` set to true.

The caller must ensure that the PCH brightness PWM is configured correctly

before calling this method with `backlight_on` set to true.

No MMIO writes are performed if `power_target` already matches the panel

power subsystem's target.

Defined at line 849 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

double PanelBrightness ()

The brightness level created by the PCH panel backlight PWM.

Returns a value between 0.0 (no brightness) and 1.0 (maximum brightness).

Defined at line 866 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void SetPanelBrightness (double brightness)

Sets the brightness level created by the PCH panel backlight PWM.

`brightness` must be between 0.0 (no brightness) and 1.0 (maximum

brightness).

The caller must ensure that the PCH backlight brightness PWM is configured

correctly before calling this method.

Defined at line 892 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc

void Log ()

Defined at line 942 of file ../../src/graphics/display/drivers/intel-display/pch-engine.cc