class PipeManager
Defined at line 59 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.h
`PipeManager` manages state of all `Pipe`s on the display engine.
The set of `Pipe`s is defined at creation and is fixed and static over the
lifetime of `PipeManager`. Callers can borrow a Pipe instance when they need
it for display devices, and must return it before `PipeManager` is destroyed.
Public Methods
Pipe * RequestPipe (DisplayDevice & display)
Request an unused Pipe for a new display, and attach the Pipe to |display|.
Returned Pipes are guaranteed to outlive the display; On display removal,
The Pipe must be recycled by calling |ReturnPipe()|.
Returns |nullptr| if there is no Pipe available.
TODO(https://fxbug.dev/42056163): This is error-prone because the caller has to call
`ReturnPipe()` to recycle used pipe manually. Instead we should add a
wrapper class (like `BorrowedPipeRef`) which could automatically return the
Pipe after use.
Defined at line 25 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
Pipe * RequestPipeFromHardwareState (DisplayDevice & display, fdf::MmioBuffer * mmio_space)
Request the Pipe that have been attached to |display| by other drivers
(i.e. BIOS / bootloader) by reading the pipe's hardware register state, and
then update the Pipe's state to note that it's attached to |display|.
Returned Pipes are guaranteed to outlive the display; On display removal,
The Pipe must be recycled by calling |ReturnPipe()|.
Returns |nullptr| if
- No Pipe has been ever attached to this |display|, or
- Error occurs when reading the hardware state.
Defined at line 34 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
void ~PipeManager ()
Defined at line 61 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.h
void PipeManager (PipeManager && )
Defined at line 63 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.h
void PipeManager (const PipeManager & )
Defined at line 64 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.h
void ResetInactiveTranscoders ()
Reset pipe transcoders that are not actively in use, e.g. due to pipe being
inactive, or its corresponding pipe currently connects to another
transcoder.
void ReturnPipe (Pipe * pipe)
Return unused Pipe back to |PipeManager| when the display device is
removed; |pipe| must be a return value of previous |RequestPipe| or
|RequestPipeFromHardwareState| calls.
Defined at line 44 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
bool PipeReallocated ()
Returns whether there is any new Pipe allocated to displays, or unused
Pipe gets reset since last |PipeReallocated()| call.
Defined at line 54 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
Pipe * operator[] (PipeId idx)
Random accessor and forward iterator so that we can access the pipes
using
<algorithms
> methods and range-based for loop.
TODO(https://fxbug.dev/42056164): This (and the pipe iterator class) adds some
unnecessary complexity to the PipeManager; we can just replace it with a
method which returns `std::span
<Pipe
*>` instead.
Defined at line 60 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
Pipe * At (PipeId idx)
Defined at line 65 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
PipeIterator begin ()
Defined at line 69 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
PipeIterator end ()
Defined at line 70 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
PipeConstIterator begin ()
Defined at line 71 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
PipeConstIterator end ()
Defined at line 74 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
Protected Methods
void PipeManager (std::vector<std::unique_ptr<Pipe>> pipes)
Defined at line 23 of file ../../src/graphics/display/drivers/intel-display/pipe-manager.cc
Pipe * GetAvailablePipe ()
Platform specific functions to get a new available pipe for an arbitrary
display device. Return |nullptr| if such a pipe is not available.
Pipe * GetPipeFromHwState (DdiId ddi_id, fdf::MmioBuffer * mmio_space)
Platform specific functions to get a pipe that has been bound to this
DDI (usually by bootloader) for a display device.
Return |nullptr| if there is no such a pipe or if there is any other
internal error when loading the hardware state.