class VideoInputWriteControl

Defined at line 740 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

VDIN0_WR_CTRL, VDIN1_WR_CTRL.

A311D Datasheet, Section 10.2.3.42 VDIN, Pages 1093, 1115-1116.

S905D2 Datasheet, Section 7.2.3.41 VDIN, Pages 784-785, 808-809.

S905D3 Datasheet, Section 8.2.3.42 VDIN, Pages 720-721, 743.

Private correspondence with Amlogic (Re: display loopback mode), June 27,

2019.

Public Members

 field_chroma_horizontal_subsampling_mode_822
 field_memory_interface_clock_gate_disabled_827
 field_memory_interface_response_counter_cleared_831
 field_line_end_indicator_selection_834
 field_frame_reset_on_vsync_837
 field_line_fifo_reset_on_vsync_840
 field_direct_write_done_cleared_844
 field_noise_reduced_write_done_cleared_848
 field_consecutive_64bit_pairs_reordered_852
 field_chroma_channel_layout_857
 field_chroma_vertical_subsampling_mode_860
 field_yuv_sampling_storage_format_863
 field_luma_canvas_address_double_buffered_867
 field_write_request_unpaused_875
 field_write_request_urgent_878
 field_write_request_enabled_881
 field_luma_canvas_address_884

Public Methods

hwreg::RegisterAddr<VideoInputWriteControl> Get (VideoInputModuleId video_input)

Defined at line 810 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
ChromaHorizontalSubsamplingMode chroma_horizontal_subsampling_mode ()

Effective iff `yuv_sampling_storage_format` is `kYuv422Packed` or

`kSemiPlanar`.

Defined at line 822 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_chroma_horizontal_subsampling_mode (ChromaHorizontalSubsamplingMode val)

Effective iff `yuv_sampling_storage_format` is `kYuv422Packed` or

`kSemiPlanar`.

Defined at line 822 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType memory_interface_clock_gate_disabled ()

True iff the clock gate for the memory interface is disabled, which means

that the memory interface uses a free running clock (i.e. a clock that is

not interrupted nor gated).

Defined at line 827 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_memory_interface_clock_gate_disabled (typename SelfType::ValueType val)

True iff the clock gate for the memory interface is disabled, which means

that the memory interface uses a free running clock (i.e. a clock that is

not interrupted nor gated).

Defined at line 827 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType memory_interface_response_counter_cleared ()

If true, the counter field for memory interface responses is cleared.

The register it clears is unknown from the datasheets.

Defined at line 831 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_memory_interface_response_counter_cleared (typename SelfType::ValueType val)

If true, the counter field for memory interface responses is cleared.

The register it clears is unknown from the datasheets.

Defined at line 831 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
LineEndIndicator line_end_indicator_selection ()

Selects the line end indicator in the memory write interface.

Defined at line 834 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_line_end_indicator_selection (LineEndIndicator val)

Selects the line end indicator in the memory write interface.

Defined at line 834 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType frame_reset_on_vsync ()

True iff the frame is reset on each Vsync.

Defined at line 837 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_frame_reset_on_vsync (typename SelfType::ValueType val)

True iff the frame is reset on each Vsync.

Defined at line 837 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType line_fifo_reset_on_vsync ()

True iff a software reset is performed on the line FIFO on each Vsync.

Defined at line 840 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_line_fifo_reset_on_vsync (typename SelfType::ValueType val)

True iff a software reset is performed on the line FIFO on each Vsync.

Defined at line 840 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType direct_write_done_cleared ()

If true, the `direct_write_done` bit of the `VideoInputCommandStatus0`

register is cleared.

Defined at line 844 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_direct_write_done_cleared (typename SelfType::ValueType val)

If true, the `direct_write_done` bit of the `VideoInputCommandStatus0`

register is cleared.

Defined at line 844 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType noise_reduced_write_done_cleared ()

If true, the `noise_reduced_write_done` bit of the

`VideoInputCommandStatus0` register is cleared.

Defined at line 848 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_noise_reduced_write_done_cleared (typename SelfType::ValueType val)

If true, the `noise_reduced_write_done` bit of the

`VideoInputCommandStatus0` register is cleared.

Defined at line 848 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType consecutive_64bit_pairs_reordered ()

True iff the data is reordered by swapping consecutive pairs of 64-bit

chunks.

Defined at line 852 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_consecutive_64bit_pairs_reordered (typename SelfType::ValueType val)

True iff the data is reordered by swapping consecutive pairs of 64-bit

chunks.

Defined at line 852 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
ChromaChannelLayout chroma_channel_layout ()

The layout of channels in each macropixel of the chroma subplane.

Effective iff `yuv_sampling_storage_format` is `kSemiPlanar`.

Defined at line 857 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_chroma_channel_layout (ChromaChannelLayout val)

The layout of channels in each macropixel of the chroma subplane.

Effective iff `yuv_sampling_storage_format` is `kSemiPlanar`.

Defined at line 857 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
ChromaVerticalSubsamplingMode chroma_vertical_subsampling_mode ()

Effective iff `yuv_sampling_storage_format` is `kSemiPlanar`.

Defined at line 860 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_chroma_vertical_subsampling_mode (ChromaVerticalSubsamplingMode val)

Effective iff `yuv_sampling_storage_format` is `kSemiPlanar`.

Defined at line 860 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_yuv_sampling_storage_format (YuvSamplingStorageFormat val)

YUV sampling and storage format of the image to write.

Defined at line 863 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
YuvSamplingStorageFormat yuv_sampling_storage_format ()

YUV sampling and storage format of the image to write.

Defined at line 863 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType luma_canvas_address_double_buffered ()

True iff the value of `luma_canvas_address` is double-buffered. In that

case, the new value written to the register field is applied on each Vsync.

Defined at line 867 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_luma_canvas_address_double_buffered (typename SelfType::ValueType val)

True iff the value of `luma_canvas_address` is double-buffered. In that

case, the new value written to the register field is applied on each Vsync.

Defined at line 867 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_write_request_unpaused (typename SelfType::ValueType val)

If true, unpauses the write request.

This bit is not in any datasheet but was mentioned in private

correspondence with Amlogic. Experiments on Khadas VIM3 (A311D),

Astro (S905D2) and Nelson (S905D3) all show that this bit is available

and functions as described above.

Defined at line 875 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType write_request_unpaused ()

If true, unpauses the write request.

This bit is not in any datasheet but was mentioned in private

correspondence with Amlogic. Experiments on Khadas VIM3 (A311D),

Astro (S905D2) and Nelson (S905D3) all show that this bit is available

and functions as described above.

Defined at line 875 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_write_request_urgent (typename SelfType::ValueType val)

True iff the next memory write request is of higher priority.

Defined at line 878 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType write_request_urgent ()

True iff the next memory write request is of higher priority.

Defined at line 878 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_write_request_enabled (typename SelfType::ValueType val)

True iff the memory write interface allows memory write requests.

Defined at line 881 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType write_request_enabled ()

True iff the memory write interface allows memory write requests.

Defined at line 881 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType luma_canvas_address ()

The address to the Luma canvas for the memory interface to write to.

Defined at line 884 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_luma_canvas_address (typename SelfType::ValueType val)

The address to the Luma canvas for the memory interface to write to.

Defined at line 884 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

Enumerations

enum class ChromaHorizontalSubsamplingMode : uint8_t
Name Value Comments
kEvenPixelsOnly 0

Only the chroma channels of even pixels in a row are sampled.
The image is downsampled to YUV 4:2:x format.

kOddPixelsOnly 1

Only the chroma channels of odd pixels in a row are sampled.
The image is downsampled to YUV 4:2:x format.

kAveragedPixels 2

The average value of chroma channel of each pixel pair in a row are
sampled.
The image is downsampled to YUV 4:2:x format.

kAllPixels 3

The Chroma channels of all pixels are used; no subsampling is performed.
The image is downsampled to YUV 4:4:x format.

To use this subsampling mode, `write_format` must be `kSemiPlanar`.

Defined at line 742 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

enum class LineEndIndicator : uint8_t
Name Value Comments
kEol 0

Uses EOL (End of Line) as the line-end indication. The precise
definition of "EOL" is unclear from the datasheets.

kWidth 1

Uses the line width, as specified in the `VideoInputInterfaceWidth`
register, to determine line endings.

Defined at line 760 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

enum class ChromaChannelLayout : uint8_t
Name Value Comments
kCbCr 0

First Cb (U), then Cr (V). Used in the NV12 chroma subplane.

kCrCb 1

First Cr (V), then Cb (U). Used in the NV21 chroma subplane.

Defined at line 769 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

enum class ChromaVerticalSubsamplingMode : uint8_t
Name Value Comments
kEvenRowsOnly 0

Only the chroma channels of pixels in even rows will be sampled.
The image will be downsampled to YUV 4:x:0 format.

kOddRowsOnly 1

Only the chroma channels of pixels in odd rows will be sampled.
The image will be downsampled to YUV 4:x:0 format.

kReserved 2

Only the chroma channels of pixels in odd rows will be sampled.
The image will be downsampled to YUV 4:x:0 format.

kAllRows 3

Chroma channels of all rows will be used; no subsampling is performed.
The image will be downsampled to YUV 4:x:x format.

Defined at line 776 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

enum class YuvSamplingStorageFormat : uint8_t
Name Value Comments
kYuv422Packed 0

Image is in a YUV 4:2:2 packed (single-planar) format, stored in the Luma
canvas.
The detailed macropixel encoding is unclear.

kYuv444Packed 1

Image is in a YUV 4:4:4 packed (single-planar) format, stored in the Luma
canvas.

Note: RGB888 format can be considered as a special YUV 4:4:4 packed
format where the R/G/B channels correspond to Y/Cb/Cr channels
respectively.

kSemiPlanar 2

Image is in a YUV semi-planar format. The Luma plane is stored in the
Luma canvas and the Chroma plane is stored in the Chroma canvas.

kYuv422FullyPackedMode 3

Image is in a YUV 4:2:2 10-bit "fully packed" (single-planar) format,
stored in the Luma canvas.
The detailed macropixel encoding is unclear.

Defined at line 789 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

Records