class DisplayPllManager

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

Tracks all the PLLs used as DDI clock sources in a display engine.

Protected Members

unordered_map plls_
unordered_map ref_count_
unordered_map ddi_to_dpll_

Public Methods

void ~DisplayPllManager ()

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

void DisplayPllManager (const DisplayPllManager & )

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

void DisplayPllManager (DisplayPllManager && )

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

DdiPllConfig LoadState (DdiId ddi_id)

Returns the DDI clock configuration for `ddi`.

Returns an empty `DdiPllConfig` if the DDI does not have a PLL configured

as its clock source, if the PLL is not enabled, or if the PLL configuration

is invalid. Otherwise, returns a valid DdiPllConfig.

TODO(fxbug.com/112752): This API needs to be revised.

DisplayPll * SetDdiPllConfig (DdiId ddi_id, bool is_edp, const DdiPllConfig & desired_config)

Configures a DDI's clock source to match the desired configuration.

On success, returns the PLL configured as the DDI's clock source. On

failure, returns null.

`ddi` must be usable on this display engine (not fused off), disabled and

powered down. Use `LoadState()` to have the manager reflect an association

between a powered-up DDI and its clock source.

`pll_config` must be valid.

This process entails finding a PLL that can be used as this DDI's clock

source, configuring the PLL, waiting for the PLL to lock, and associating

the PLL with the DDI. If any of these steps fails, the entire operation is

considered to have failed.

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

DisplayPllManager & operator= (const DisplayPllManager & )

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

DisplayPllManager & operator= (DisplayPllManager && )

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

bool ResetDdiPll (DdiId ddi_id)

Resets a DDI's clock source configuration.

Returns true if the DDI's clock source is reset. This method is idempotent,

so it will return true when called with a DDI without a configured clock

source.

`ddi` must be usable on this display engine (not fused off), disabled and

powered down.

This method is idempotent. It (quickly) succeeds if the DDI does not have a

clock source.

If the PLL that served as the DDI's clock source becomes unused after this

operation, the PLL is disabled and powered down, if possible.

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

bool DdiPllMatchesConfig (DdiId ddi_id, const DdiPllConfig & desired_config)

True if the PLL configured as a DDI's clock source matches a configuration.

Returns false if the DDI does not have any clock source configured.

`ddi` must be usable on this display engine (not fused off).

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

Protected Methods

void DisplayPllManager ()

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

bool SetDdiClockSource (DdiId ddi_id, PllId pll_id)

Configures a PLL to serve as a DDI's clock source.

`pll` must be locked to the desired configuration. `ddi` must be usable on

this display engine (not fused off), disabled and powered down. `pll` must

be usable as a source clock for `ddi`.

This method is idempotent. It succeeds if `ddi` already has `pll`

configured as its clock source.

Implementations perform the register-level configuration, while assuming

that logging and state updating are taken care of.

bool ResetDdiClockSource (DdiId ddi_id)

Resets the DDI's clock source so it doesn't use any PLL.

`ddi` must be usable on this display engine (not fused off), disabled and

powered down.

This method is idempotent. It succeeds if `ddi` does not have any clock

source.

Implementations perform the register-level configuration, while assuming

that logging and state updating are taken care of.

DisplayPll * FindPllFor (DdiId ddi_id, bool is_edp, const DdiPllConfig & desired_config)

Returns the most suitable PLL to serve as a DDI's clock source.

Returns null if the search fails. On success, returns a `DisplayPll` for a

PLL that is either unused, or is already locked to the desired

configuration.

`ddi` must be usable on this display engine (not fused off), disabled and

powered down. `desired_config` must be valid.

Implementations perform the register-level configuration, while assuming

that logging and state updating are taken care of.