class VideoInputUnit
Defined at line 32 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.h
The Video Input Unit (VIU) retrieves pixel data (images) from its input
channels, and scales, post-processes and blends the pixel data into the
display contents for the Video Output (VOUT) module to encode and transmit
as electronic signals.
The VideoInputUnit class is an abstraction of the VIU hardware block. It
controls the OSD layers, scalers and blenders within the VIU.
Public Methods
void VideoInputUnit (VideoInputUnit & other)
Defined at line 54 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.h
PixelGridSize2D layer_image_size ()
Defined at line 90 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.h
PixelGridSize2D display_contents_size ()
Defined at line 92 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.h
zx::result<std::unique_ptr<VideoInputUnit>> Create (fidl::UnownedClientEnd<fuchsia_hardware_platform_device::Device> platform_device, inspect::Node * video_input_unit_node)
Factory method for production use.
`platform_device` must be valid.
`video_input_unit_node` must outlive the `VideoInputUnit` instance.
Defined at line 811 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
zx::result<std::unique_ptr<VideoInputUnit>> CreateForTesting (fdf::MmioBuffer vpu_mmio, std::unique_ptr<RdmaEngine> rdma, PixelGridSize2D layer_image_size, PixelGridSize2D display_contents_size)
Creates a VideoInputUnit with `vpu_mmio`, `rdma` injected and
`layer_image_size` / `display_contents_size` set.
This factory method must only be used for testing.
Defined at line 844 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
void VideoInputUnit (fdf::MmioBuffer vpu_mmio, std::unique_ptr<RdmaEngine> rdma)
Production code should prefer using the `Create()` factory method instead.
Defined at line 182 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
void DisableLayer (display::DriverConfigStamp config_stamp)
Disable the OSD layer and set the latest stamp to |config_stamp|.
If the driver disables (pauses) the layer because the client sets an empty
config, the |config_stamp| should be the client-provided stamp; otherwise
it should use the invalid stamp value indicating that the OSD has been
invalidated.
Defined at line 185 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
void EnableLayer ()
Defined at line 191 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
void FlipOnVsync (const display::DriverLayer & layer, const display::Mode & display_mode, const display::ColorConversion & color_conversion, display::DriverConfigStamp config_stamp)
Schedules the given |config| to be applied by the RDMA engine when the next VSYNC interrupt
occurs.
Defined at line 266 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
display::DriverConfigStamp GetLastConfigStampApplied ()
Returns the image handle that was most recently processed by the RDMA engine. If RDMA is
determined to be in progress and incomplete, then the previously applied image is returned. If
RDMA is determined to be complete at the time of a call, then the RDMA engine registers are
updated accordingly.
This function is used by the vsync thread to determine the latest applied config.
Defined at line 178 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
void Dump ()
Defined at line 719 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
void Release ()
Defined at line 805 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
uint32_t FloatToFixed3_10 (float f)
This function converts a float into Signed fixed point 3.10 format
[12][11:10][9:0] = [sign][integer][fraction]
Defined at line 204 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
uint32_t FloatToFixed2_10 (float f)
This function converts a float into Signed fixed point 2.10 format
[11][10][9:0] = [sign][integer][fraction]
Defined at line 195 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc
void SetMinimumRgb (uint8_t minimum_rgb)
Defined at line 613 of file ../../src/graphics/display/drivers/amlogic-display/video-input-unit.cc