udi_gfx.h

Contains the graphics metalanguage interface details

Author

Marcel Sondaar

License

Public Domain

Summary
udi_gfx.hContains the graphics metalanguage interface details
UDI_GFX_PROPLists the various UDI properties
Constants
UDI_GFX_PROP_ENABLE
UDI_GFX_PROP_INPUTAny valid engine ID, provided no dependency cycles are created, or -1
UDI_GFX_PROP_WIDTHAny non-zero positive number.
UDI_GFX_PROP_HEIGHTAny non-zero positive number.
UDI_GFX_PROP_CUSTOMThe first property index of the driver’s custom range.
UDI_GFX_PROP_CLIP
UDI_GFX_PROP_UNIT_WIDTHAny non-zero positive value
UDI_GFX_PROP_UNIT_HEIGHTAny non-zero positive value
UDI_GFX_SIGNALLists the various signal types
UDI_GFX_CONNECTORLists the various external connectors
UDI_GFX_OPERATORLists the display output operator
Constants
UDI_GFX_PROVIDER_OPS_NUMthe ops number used for the graphics driver
UDI_GFX_CLIENT_OPS_NUMthe ops number used for the graphics application
udi_gfx_bind_cb_tContains the operations of a driver binding request
Variables
gcbThe main control block
Functions
udi_block_bind_reqfunction pointer prototype for connecting to a block device
udi_gfx_bind_ackfunction pointer prototype for acknowledging a connection request
udi_gfx_unbind_reqfunction pointer prototype for disconnecting a block device
udi_gfx_unbind_ackfunction pointer prototype for connecting to a block device
udi_gfx_state_cb_tContains the operations of a read/write transaction
Variables
gcbThe main control block
Functions
udi_gfx_set_engine_reqfunction pointer prototype for setting an engine state
udi_gfx_set_connector_reqfunction pointer prototype for setting an connector state
udi_gfx_set_engine_ackfunction pointer prototype for setting an engine state
udi_gfx_set_connector_ackfunction pointer prototype for setting an engine state
udi_gfx_get_engine_reqfunction pointer prototype for setting an engine state
udi_gfx_get_connector_reqfunction pointer prototype for setting an connector state
udi_gfx_get_engine_ackfunction pointer prototype for setting an engine state
udi_gfx_get_connector_ackfunction pointer prototype for setting an engine state
udi_gfx_range_cb_tContains the operations of a range request transaction
Variables
gcbThe main control block
Functions
udi_gfx_range_engine_reqfunction pointer prototype for getting an engine property range
udi_gfx_range_connector_reqfunction pointer prototype for getting a connector property range
udi_gfx_range_engine_ackfunction pointer prototype for replying an engine property range
udi_gfx_range_connector_ackfunction pointer prototype for replying a connector property range
udi_gfx_command_cb_tContains the operations of a command sequence
Variables
gcbThe main control block
Functions
udi_gfx_commandfunction pointer prototype for sending command data
udi_gfx_command_ackfunction pointer prototype for sending command data
udi_gfx_provider_ops_tThe graphics metalanguage e*ntry points (provider side)
udi_gfx_client_ops_tThe graphics metalanguage entry points (client side)

UDI_GFX_PROP

Lists the various UDI properties

Summary
Constants
UDI_GFX_PROP_ENABLE
UDI_GFX_PROP_INPUTAny valid engine ID, provided no dependency cycles are created, or -1
UDI_GFX_PROP_WIDTHAny non-zero positive number.
UDI_GFX_PROP_HEIGHTAny non-zero positive number.
UDI_GFX_PROP_CUSTOMThe first property index of the driver’s custom range.
UDI_GFX_PROP_CLIP
UDI_GFX_PROP_UNIT_WIDTHAny non-zero positive value
UDI_GFX_PROP_UNIT_HEIGHTAny non-zero positive value

Constants

UDI_GFX_PROP_ENABLE

Valid values

0disabled
1enabled

Ranges

Hardwired 1, or 0-1

The connector or engine is enabled (nonzero) or disabled (zero).  A disabled engine forwards all data from the previous stage unmodified.  A disabled connector does not send any data over the connector.  Drivers may power down the physical counterparts of disabled components to preserve power, and users should expect delays when enabling connectors or components representing framebuffers.  Disabling is however not recommended for sprite layers, which may repeatedly be enabled and disabled.  A disabled component can still have its state changed, and the driver must complete all commands and other state changes as expected, regardless of disabled or power state.  The valid ranges reported for this property may be 1 (always enabled) or 0-1 (either enabled or disabled).

UDI_GFX_PROP_INPUT

Valid values

Any valid engine ID, provided no dependency cycles are created, or -1

Ranges

Any non-empty set of valid values.  Often hardwired.

Points to the engine that is processed before this unit.  In the case of a connector, it points to the last engine in a pipeline, and each engine points to the next engine in the sequence.  A value of -1 indicates a source that only yields black pixels.  Implementations must not allow cyclic structures.  Changing this value may reallocate resources, and engines that are no longer referenced may lose their data (but not their state) when it is not part of any pipeline.  If preservation is required, the ENABLE state should be used instead.  Valid ranges includes one or more from the list of engines and -1 combined.  In most cases, this property can not be modified.

UDI_GFX_PROP_WIDTH

Valid values

Any non-zero positive number.

Ranges

Contains at least one valid value.  Often only multiples of UNIT_WIDTH or a power of two are allowed.  May be hardwired.

Contains the amount of pixels in the horizontal direction.  For connectors, this is the amount of data pixels rendered horizontally.  For engines, this is the width in pixels of the image.  Pixels requested from an engine outside the range (0..width-1) are defined according to the UDI_GFX_PROP_CLIP property.  In some cases, hardware may support only fixed combinations of width and height.  In such cases, changing the width will also change the height to a corresponding valid number.  Valid ranges include any values strictly above zero.  For connectors, expect large continuous ranges, large ranges with a certain modulus, a limited number of fixed values, or a constant value.

UDI_GFX_PROP_HEIGHT

Valid values

Any non-zero positive number.

Ranges

Contains at least one valid value.  Often only multiples of UNIT_HEIGHT or a power of two are allowed.  May be hardwired.

Contains the amount of pixels in the vertical direction.  Functions similar to the width property, but changing it will not alter the width property, and it’s range at any time contains the valid range for the currently selected width.

UDI_GFX_PROP_CUSTOM

The first property index of the driver’s custom range.  These are not assigned directly assigned by the UDI specification, but may be specified in the operator tree.

UDI_GFX_PROP_CLIP

Valid values

0points outside width x height are passed from next stage
1the engine’s contents is tiled with size width x height
2points outside the width overflow into the y coordinate
3points outside the height overflow into the x coordinate

Ranges

Hardwired zero for connectors.  Any non-empty subset for engines, usually hardwired.

For engines, contains the behaviour for pixels requested outside the width and height of the engine.  Can be either 0 (pass from next stage), 1 (the coordinates are wrapped modulus the height and width), 2 (the coordinates overflow onto the next scanline horizontally, and wrap vertically), 3 (the coordinates overflow onto the next column vertically, and wrap horizontally).  Valid ranges contain one or more of these options.  For overlays and sprites, a value 0 is common.  For framebuffers, 2 is the most common value.  For connectors, this property is always 0 since they do not store pixel data

UDI_GFX_PROP_UNIT_WIDTH

Valid values

Any non-zero positive value

Ranges

Any non-empty set of valid values.  May be hardwired to 1 for framebuffers, or a range of small values for hardware scaling, or any larger hardwired number or set for tiling engines.

Tiles are used to indicate that the hardware groups sets of pixels and have each group share certain properties, i.e. color or tile index, or share the same chroma subsample with only a different intensity.  If the engine has no such grouping, or shares all properties over the entire contents, the value of this property should be 1.  Some tile examples include rescaling, where a tile width of 2 indicates a pixel doubling in X direction, or in text mode where a tile width of 8 or 9 corresponds with the width of common bitmap fonts

UDI_GFX_PROP_UNIT_HEIGHT

Valid values

Any non-zero positive value

Ranges

Any non-empty set of valid values.  May be hardwired to 1 for framebuffers, or a range of small values for hardware scaling, or any larger hardwired number or set for tiling engines.

See UDI_GFX_PROP_UNIT_WIDTH, but for the Y direction.  Common values are 1-2 for framebuffers (doublescanning on or off), identical to the tile width, or mostly independent.

UDI_GFX_SIGNAL

Lists the various signal types

UDI_GFX_CONNECTOR

Lists the various external connectors

UDI_GFX_OPERATOR

Lists the display output operator

Summary
Constants
UDI_GFX_PROVIDER_OPS_NUMthe ops number used for the graphics driver
UDI_GFX_CLIENT_OPS_NUMthe ops number used for the graphics application

Constants

UDI_GFX_PROVIDER_OPS_NUM

the ops number used for the graphics driver

UDI_GFX_CLIENT_OPS_NUM

the ops number used for the graphics application

udi_gfx_bind_cb_t

Contains the operations of a driver binding request

Summary
Variables
gcbThe main control block
Functions
udi_block_bind_reqfunction pointer prototype for connecting to a block device
udi_gfx_bind_ackfunction pointer prototype for acknowledging a connection request
udi_gfx_unbind_reqfunction pointer prototype for disconnecting a block device
udi_gfx_unbind_ackfunction pointer prototype for connecting to a block device

Variables

gcb

udi_cb_t gcb

The main control block

Functions

udi_block_bind_req

function pointer prototype for connecting to a block device

in

cbA pointer to a udi_block_bind_cb_t

udi_gfx_bind_ack

typedef void udi_gfx_bind_ack_op_t (udi_gfx_bind_cb_t *cb,
udi_index_t sockets,
udi_index_t engines,
udi_status_t status)

function pointer prototype for acknowledging a connection request

in

cbA pointer to a udi_gfx_bind_cb_t
socketsThe number of addressable socket components
enginesThe number of addressable engine components
statusThe result of the bind operation

udi_gfx_unbind_req

typedef void udi_gfx_unbind_req_op_t (udi_gfx_bind_cb_t *cb)

function pointer prototype for disconnecting a block device

in

cbA pointer to a udi_block_bind_cb_t

udi_gfx_unbind_ack

typedef void udi_gfx_unbind_ack_op_t (udi_gfx_bind_cb_t *cb)

function pointer prototype for connecting to a block device

in

cbA pointer to a udi_gfx_bind_cb_t

udi_gfx_state_cb_t

Contains the operations of a read/write transaction

Summary
Variables
gcbThe main control block
Functions
udi_gfx_set_engine_reqfunction pointer prototype for setting an engine state
udi_gfx_set_connector_reqfunction pointer prototype for setting an connector state
udi_gfx_set_engine_ackfunction pointer prototype for setting an engine state
udi_gfx_set_connector_ackfunction pointer prototype for setting an engine state
udi_gfx_get_engine_reqfunction pointer prototype for setting an engine state
udi_gfx_get_connector_reqfunction pointer prototype for setting an connector state
udi_gfx_get_engine_ackfunction pointer prototype for setting an engine state
udi_gfx_get_connector_ackfunction pointer prototype for setting an engine state

Variables

gcb

udi_cb_t gcb

The main control block

Functions

udi_gfx_set_engine_req

typedef void udi_gfx_set_engine_req_op_t (udi_gfx_state_cb_t *cb,
udi_ubit32_t value)

function pointer prototype for setting an engine state

in

cbA pointer to a udi_gfx_state_cb_t

udi_gfx_set_connector_req

typedef void udi_gfx_set_connector_req_op_t (udi_gfx_state_cb_t *cb,
udi_ubit32_t value)

function pointer prototype for setting an connector state

in

cbA pointer to a udi_gfx_state_cb_t

udi_gfx_set_engine_ack

typedef void udi_gfx_set_engine_ack_op_t (udi_gfx_state_cb_t *cb)

function pointer prototype for setting an engine state

in

cbA pointer to a udi_gfx_state_cb_t

udi_gfx_set_connector_ack

typedef void udi_gfx_set_connector_ack_op_t (udi_gfx_state_cb_t *cb)

function pointer prototype for setting an engine state

in

cbA pointer to a udi_gfx_state_cb_t

udi_gfx_get_engine_req

typedef void udi_gfx_get_engine_req_op_t (udi_gfx_state_cb_t *cb)

function pointer prototype for setting an engine state

in

cbA pointer to a udi_gfx_state_cb_t

udi_gfx_get_connector_req

typedef void udi_gfx_get_connector_req_op_t (udi_gfx_state_cb_t *cb)

function pointer prototype for setting an connector state

in

cbA pointer to a udi_gfx_state_cb_t

udi_gfx_get_engine_ack

typedef void udi_gfx_get_engine_ack_op_t (udi_gfx_state_cb_t *cb,
udi_ubit32_t value)

function pointer prototype for setting an engine state

in

cbA pointer to a udi_gfx_state_cb_t

udi_gfx_get_connector_ack

typedef void udi_gfx_get_connector_ack_op_t (udi_gfx_state_cb_t *cb,
udi_ubit32_t value)

function pointer prototype for setting an engine state

in

cbA pointer to a udi_gfx_state_cb_t

udi_gfx_range_cb_t

Contains the operations of a range request transaction

Summary
Variables
gcbThe main control block
Functions
udi_gfx_range_engine_reqfunction pointer prototype for getting an engine property range
udi_gfx_range_connector_reqfunction pointer prototype for getting a connector property range
udi_gfx_range_engine_ackfunction pointer prototype for replying an engine property range
udi_gfx_range_connector_ackfunction pointer prototype for replying a connector property range

Variables

gcb

udi_cb_t gcb

The main control block

Functions

udi_gfx_range_engine_req

typedef void udi_gfx_range_engine_req_op_t (udi_gfx_range_cb_t *cb)

function pointer prototype for getting an engine property range

in

cbA pointer to a udi_gfx_range_cb_t

udi_gfx_range_connector_req

typedef void udi_gfx_range_connector_req_op_t (udi_gfx_range_cb_t *cb)

function pointer prototype for getting a connector property range

in

cbA pointer to a udi_gfx_range_cb_t

udi_gfx_range_engine_ack

typedef void udi_gfx_range_engine_ack_op_t (udi_gfx_range_cb_t *cb)

function pointer prototype for replying an engine property range

in

cbA pointer to a udi_gfx_range_cb_t

udi_gfx_range_connector_ack

typedef void udi_gfx_range_connector_ack_op_t (udi_gfx_range_cb_t *cb)

function pointer prototype for replying a connector property range

in

cbA pointer to a udi_gfx_range_cb_t

udi_gfx_command_cb_t

Contains the operations of a command sequence

Summary
Variables
gcbThe main control block
Functions
udi_gfx_commandfunction pointer prototype for sending command data
udi_gfx_command_ackfunction pointer prototype for sending command data

Variables

gcb

udi_cb_t gcb

The main control block

Functions

udi_gfx_command

typedef void udi_gfx_command_req_op_t (udi_gfx_command_cb_t *cb)

function pointer prototype for sending command data

in

cbA pointer to a udi_gfx_command_cb_t

udi_gfx_command_ack

typedef void udi_gfx_command_ack_op_t (udi_gfx_command_cb_t *cb)

function pointer prototype for sending command data

in

cbA pointer to a udi_gfx_command_cb_t

udi_gfx_provider_ops_t

The graphics metalanguage e*ntry points (provider side)

udi_gfx_client_ops_t

The graphics metalanguage entry points (client side)

udi_cb_t gcb
The main control block
typedef void udi_gfx_bind_ack_op_t (udi_gfx_bind_cb_t *cb,
udi_index_t sockets,
udi_index_t engines,
udi_status_t status)
function pointer prototype for acknowledging a connection request
typedef void udi_gfx_unbind_req_op_t (udi_gfx_bind_cb_t *cb)
function pointer prototype for disconnecting a block device
typedef void udi_gfx_unbind_ack_op_t (udi_gfx_bind_cb_t *cb)
function pointer prototype for connecting to a block device
udi_cb_t gcb
The main control block
typedef void udi_gfx_set_engine_req_op_t (udi_gfx_state_cb_t *cb,
udi_ubit32_t value)
function pointer prototype for setting an engine state
typedef void udi_gfx_set_connector_req_op_t (udi_gfx_state_cb_t *cb,
udi_ubit32_t value)
function pointer prototype for setting an connector state
typedef void udi_gfx_set_engine_ack_op_t (udi_gfx_state_cb_t *cb)
function pointer prototype for setting an engine state
typedef void udi_gfx_set_connector_ack_op_t (udi_gfx_state_cb_t *cb)
function pointer prototype for setting an engine state
typedef void udi_gfx_get_engine_req_op_t (udi_gfx_state_cb_t *cb)
function pointer prototype for setting an engine state
typedef void udi_gfx_get_connector_req_op_t (udi_gfx_state_cb_t *cb)
function pointer prototype for setting an connector state
typedef void udi_gfx_get_engine_ack_op_t (udi_gfx_state_cb_t *cb,
udi_ubit32_t value)
function pointer prototype for setting an engine state
typedef void udi_gfx_get_connector_ack_op_t (udi_gfx_state_cb_t *cb,
udi_ubit32_t value)
function pointer prototype for setting an engine state
udi_cb_t gcb
The main control block
typedef void udi_gfx_range_engine_req_op_t (udi_gfx_range_cb_t *cb)
function pointer prototype for getting an engine property range
typedef void udi_gfx_range_connector_req_op_t (udi_gfx_range_cb_t *cb)
function pointer prototype for getting a connector property range
typedef void udi_gfx_range_engine_ack_op_t (udi_gfx_range_cb_t *cb)
function pointer prototype for replying an engine property range
typedef void udi_gfx_range_connector_ack_op_t (udi_gfx_range_cb_t *cb)
function pointer prototype for replying a connector property range
udi_cb_t gcb
The main control block
typedef void udi_gfx_command_req_op_t (udi_gfx_command_cb_t *cb)
function pointer prototype for sending command data
typedef void udi_gfx_command_ack_op_t (udi_gfx_command_cb_t *cb)
function pointer prototype for sending command data
Any non-zero positive value
Contains the operations of a read/write transaction
Contains the operations of a driver binding request
Contains the operations of a read/write transaction
Contains the operations of a range request transaction
Contains the operations of a command sequence