v_vscaler
Vitis Drivers API Documentation
xv_vscaler.h File Reference

Data Structures

struct  XV_vscaler_Config
 This typedef contains configuration information for the vertical scaler core. More...
 
struct  XV_vscaler
 Driver instance data. More...
 

Functions

int XV_vscaler_Initialize (XV_vscaler *InstancePtr, u16 DeviceId)
 Initializes a specific XV_vscaler device instance. More...
 
XV_vscaler_ConfigXV_vscaler_LookupConfig (u16 DeviceId)
 Looks up the configuration for a specific XV_vscaler device instance. More...
 
int XV_vscaler_CfgInitialize (XV_vscaler *InstancePtr, XV_vscaler_Config *ConfigPtr, UINTPTR EffectiveAddr)
 XV_vscaler_CfgInitialize - Initialize the XV_vscaler instance. More...
 
void XV_vscaler_Start (XV_vscaler *InstancePtr)
 XV_vscaler_Start - Start the v_vscaler hardware. More...
 
u32 XV_vscaler_IsDone (XV_vscaler *InstancePtr)
 XV_vscaler_IsDone - Check if the v_vscaler hardware has finished processing. More...
 
u32 XV_vscaler_IsIdle (XV_vscaler *InstancePtr)
 XV_vscaler_IsIdle - Check if the v_vscaler hardware is idle. More...
 
u32 XV_vscaler_IsReady (XV_vscaler *InstancePtr)
 XV_vscaler_IsReady - Check if the v_vscaler hardware is ready for new input. More...
 
void XV_vscaler_EnableAutoRestart (XV_vscaler *InstancePtr)
 XV_vscaler_EnableAutoRestart - Enable auto-restart for the v_vscaler hardware. More...
 
void XV_vscaler_DisableAutoRestart (XV_vscaler *InstancePtr)
 XV_vscaler_DisableAutoRestart - Disables the auto-restart feature of the V-Scaler hardware instance. More...
 
void XV_vscaler_Set_HwReg_HeightIn (XV_vscaler *InstancePtr, u32 Data)
 XV_vscaler_Set_HwReg_HeightIn - Sets the input height hardware register for the XV_vscaler instance. More...
 
u32 XV_vscaler_Get_HwReg_HeightIn (XV_vscaler *InstancePtr)
 XV_vscaler_Get_HwReg_HeightIn - Retrieves the input height value from the hardware register for the XV_vscaler instance. More...
 
void XV_vscaler_Set_HwReg_Width (XV_vscaler *InstancePtr, u32 Data)
 XV_vscaler_Set_HwReg_Width - Sets the hardware register width for the XV_vscaler instance. More...
 
u32 XV_vscaler_Get_HwReg_Width (XV_vscaler *InstancePtr)
 XV_vscaler_Get_HwReg_Width - Retrieves the width value from the hardware register for the XV_vscaler instance. More...
 
void XV_vscaler_Set_HwReg_HeightOut (XV_vscaler *InstancePtr, u32 Data)
 XV_vscaler_Set_HwReg_HeightOut - Sets the output height hardware register for the XV_vscaler instance. More...
 
u32 XV_vscaler_Get_HwReg_HeightOut (XV_vscaler *InstancePtr)
 XV_vscaler_Get_HwReg_HeightOut - Retrieves the output height value from the hardware register for the XV_vscaler instance. More...
 
void XV_vscaler_Set_HwReg_LineRate (XV_vscaler *InstancePtr, u32 Data)
 XV_vscaler_Set_HwReg_LineRate - Sets the line rate hardware register for the XV_vscaler instance. More...
 
u32 XV_vscaler_Get_HwReg_LineRate (XV_vscaler *InstancePtr)
 XV_vscaler_Get_HwReg_LineRate - Retrieves the line rate value from the hardware register for the XV_vscaler instance. More...
 
void XV_vscaler_Set_HwReg_ColorMode (XV_vscaler *InstancePtr, u32 Data)
 XV_vscaler_Set_HwReg_ColorMode - Sets the hardware register for color mode in the XV_vscaler instance. More...
 
u32 XV_vscaler_Get_HwReg_ColorMode (XV_vscaler *InstancePtr)
 Retrieves the current color mode hardware register value from the V-Scaler instance. More...
 
UINTPTR XV_vscaler_Get_HwReg_vfltCoeff_BaseAddress (XV_vscaler *InstancePtr)
 XV_vscaler_Get_HwReg_vfltCoeff_BaseAddress - Get the base address of the vertical filter coefficient hardware register for the XV_vscaler instance. More...
 
UINTPTR XV_vscaler_Get_HwReg_vfltCoeff_HighAddress (XV_vscaler *InstancePtr)
 XV_vscaler_Get_HwReg_vfltCoeff_HighAddress - Get the high address of the vertical filter coefficient hardware register for the XV_vscaler instance. More...
 
u32 XV_vscaler_Get_HwReg_vfltCoeff_TotalBytes (XV_vscaler *InstancePtr)
 Retrieves the total number of bytes for the vertical filter coefficient hardware register in the XV_vscaler instance. More...
 
u32 XV_vscaler_Get_HwReg_vfltCoeff_BitWidth (XV_vscaler *InstancePtr)
 XV_vscaler_Get_HwReg_vfltCoeff_BitWidth - Retrieves the bit width of the vertical filter coefficient hardware register for the XV_vscaler instance. More...
 
u32 XV_vscaler_Get_HwReg_vfltCoeff_Depth (XV_vscaler *InstancePtr)
 XV_vscaler_Get_HwReg_vfltCoeff_Depth - Retrieves the depth of the vertical filter coefficient hardware register for the XV_vscaler instance. More...
 
u32 XV_vscaler_Write_HwReg_vfltCoeff_Words (XV_vscaler *InstancePtr, int offset, int *data, int length)
 XV_vscaler_Write_HwReg_vfltCoeff_Words - Writes an array of 32-bit words to the vertical filter coefficient hardware register of the XV_vscaler instance. More...
 
u32 XV_vscaler_Read_HwReg_vfltCoeff_Words (XV_vscaler *InstancePtr, int offset, int *data, int length)
 XV_vscaler_Read_HwReg_vfltCoeff_Words - Reads an array of 32-bit words from the vertical filter coefficient hardware register of the XV_vscaler instance. More...
 
u32 XV_vscaler_Write_HwReg_vfltCoeff_Bytes (XV_vscaler *InstancePtr, int offset, char *data, int length)
 This Function Writes a sequence of bytes to the HWREG_VFLTCOEFF register of the XV_vscaler hardware instance. More...
 
u32 XV_vscaler_Read_HwReg_vfltCoeff_Bytes (XV_vscaler *InstancePtr, int offset, char *data, int length)
 XV_vscaler_Read_HwReg_vfltCoeff_Bytes - Reads a sequence of bytes from the HWREG_VFLTCOEFF register of the XV_vscaler hardware instance. More...
 
void XV_vscaler_InterruptGlobalEnable (XV_vscaler *InstancePtr)
 Enables the global interrupt for the XV_vscaler instance. More...
 
void XV_vscaler_InterruptGlobalDisable (XV_vscaler *InstancePtr)
 XV_vscaler_InterruptGlobalDisable - Disables the global interrupt for the XV_vscaler instance. More...
 
void XV_vscaler_InterruptEnable (XV_vscaler *InstancePtr, u32 Mask)
 XV_vscaler_InterruptEnable - Enables specific interrupts for the XV_vscaler instance. More...
 
void XV_vscaler_InterruptDisable (XV_vscaler *InstancePtr, u32 Mask)
 XV_vscaler_InterruptDisable - Disables specific interrupts for the XV_vscaler instance. More...
 
void XV_vscaler_InterruptClear (XV_vscaler *InstancePtr, u32 Mask)
 XV_vscaler_InterruptClear - Clears specific interrupts for the XV_vscaler instance. More...
 
u32 XV_vscaler_InterruptGetEnabled (XV_vscaler *InstancePtr)
 XV_vscaler_InterruptGetEnabled - Retrieves the interrupt enable register value for the XV_vscaler instance. More...
 
u32 XV_vscaler_InterruptGetStatus (XV_vscaler *InstancePtr)
 XV_vscaler_InterruptGetStatus - Retrieves the interrupt status for the given XV_vscaler instance. More...
 

Function Documentation

int XV_vscaler_CfgInitialize ( XV_vscaler InstancePtr,
XV_vscaler_Config ConfigPtr,
UINTPTR  EffectiveAddr 
)

XV_vscaler_CfgInitialize - Initialize the XV_vscaler instance.

This function initializes an XV_vscaler instance using the provided configuration structure and effective base address. It sets up the instance configuration, assigns the base address, and marks the driver as ready.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance to initialize.
ConfigPtr,:Pointer to the configuration structure.
EffectiveAddr,:Physical base address of the device.
Returns
XST_SUCCESS if successful.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_vscaler_Initialize().

void XV_vscaler_DisableAutoRestart ( XV_vscaler InstancePtr)

XV_vscaler_DisableAutoRestart - Disables the auto-restart feature of the V-Scaler hardware instance.

This function asserts that the provided instance pointer is not NULL and that the instance is ready before writing to the control register to disable auto-restart. After calling this function, the V-Scaler hardware will not automatically restart its operation after completing a task, and must be manually started if further processing is required.

Parameters
InstancePtrPointer to the XV_vscaler instance to operate on. Must not be NULL and must point to an initialized and ready XV_vscaler structure.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, XV_vscaler::IsReady, and XV_VSCALER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VScalerStop().

void XV_vscaler_EnableAutoRestart ( XV_vscaler InstancePtr)

XV_vscaler_EnableAutoRestart - Enable auto-restart for the v_vscaler hardware.

This function sets the auto-restart bit (bit 7) in the control register, enabling the hardware to automatically restart after completing its current operation. It asserts that the InstancePtr is not NULL and that the driver is ready before accessing the hardware registers.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, XV_vscaler::IsReady, and XV_VSCALER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VScalerStart().

u32 XV_vscaler_Get_HwReg_ColorMode ( XV_vscaler InstancePtr)

Retrieves the current color mode hardware register value from the V-Scaler instance.

This function reads the value of the color mode register from the hardware using the base address specified in the instance configuration.

Parameters
InstancePtris a pointer to the XV_vscaler instance. It must be initialized and ready before calling this function.
Returns
The value of the color mode hardware register.
Note
The function asserts that the instance pointer is not NULL and that the instance is ready before accessing the hardware register.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerDbgReportStatus().

u32 XV_vscaler_Get_HwReg_HeightIn ( XV_vscaler InstancePtr)

XV_vscaler_Get_HwReg_HeightIn - Retrieves the input height value from the hardware register for the XV_vscaler instance.

This function reads the value of the input height hardware register associated with the XV_vscaler instance. It asserts that the instance pointer is not NULL and that the instance is ready before performing the register read operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
The value of the input height hardware register.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerDbgReportStatus().

u32 XV_vscaler_Get_HwReg_HeightOut ( XV_vscaler InstancePtr)

XV_vscaler_Get_HwReg_HeightOut - Retrieves the output height value from the hardware register for the XV_vscaler instance.

This function reads the value of the output height hardware register associated with the XV_vscaler instance. It asserts that the instance pointer is not NULL and that the instance is ready before performing the register read operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
The value of the output height hardware register.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerDbgReportStatus().

u32 XV_vscaler_Get_HwReg_LineRate ( XV_vscaler InstancePtr)

XV_vscaler_Get_HwReg_LineRate - Retrieves the line rate value from the hardware register for the XV_vscaler instance.

This function reads the value of the line rate hardware register associated with the XV_vscaler instance. It asserts that the instance pointer is not NULL and that the instance is ready before performing the register read operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
The value of the line rate hardware register.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerDbgReportStatus().

UINTPTR XV_vscaler_Get_HwReg_vfltCoeff_BaseAddress ( XV_vscaler InstancePtr)

XV_vscaler_Get_HwReg_vfltCoeff_BaseAddress - Get the base address of the vertical filter coefficient hardware register for the XV_vscaler instance.

This function returns the base address of the vertical filter coefficient hardware register by adding the base address from the instance configuration to the defined offset for the vertical filter coefficient register.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
Returns
The base address of the vertical filter coefficient hardware register.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerDbgReportStatus().

u32 XV_vscaler_Get_HwReg_vfltCoeff_BitWidth ( XV_vscaler InstancePtr)

XV_vscaler_Get_HwReg_vfltCoeff_BitWidth - Retrieves the bit width of the vertical filter coefficient hardware register for the XV_vscaler instance.

This function returns the bit width of the HWREG_VFLTCOEFF register as defined by the XV_VSCALER_CTRL_WIDTH_HWREG_VFLTCOEFF macro. It asserts that the instance pointer is not NULL and that the instance is ready before returning the bit width.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
Returns
The bit width of the vertical filter coefficient hardware register.

References XV_vscaler::IsReady.

u32 XV_vscaler_Get_HwReg_vfltCoeff_Depth ( XV_vscaler InstancePtr)

XV_vscaler_Get_HwReg_vfltCoeff_Depth - Retrieves the depth of the vertical filter coefficient hardware register for the XV_vscaler instance.

This function returns the depth of the HWREG_VFLTCOEFF register as defined by the XV_VSCALER_CTRL_DEPTH_HWREG_VFLTCOEFF macro. It asserts that the instance pointer is not NULL and that the instance is ready before returning the depth value.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
Returns
The depth of the vertical filter coefficient hardware register.

References XV_vscaler::IsReady.

UINTPTR XV_vscaler_Get_HwReg_vfltCoeff_HighAddress ( XV_vscaler InstancePtr)

XV_vscaler_Get_HwReg_vfltCoeff_HighAddress - Get the high address of the vertical filter coefficient hardware register for the XV_vscaler instance.

This function returns the high address of the vertical filter coefficient hardware register by adding the base address from the instance configuration to the defined high offset for the vertical filter coefficient register.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
Returns
The high address of the vertical filter coefficient hardware register.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

u32 XV_vscaler_Get_HwReg_vfltCoeff_TotalBytes ( XV_vscaler InstancePtr)

Retrieves the total number of bytes for the vertical filter coefficient hardware register in the XV_vscaler instance.

This function calculates the total byte size by subtracting the base address of the HWREG_VFLTCOEFF register from its high address and adding one, which gives the total addressable bytes for the coefficient register block.

Parameters
InstancePtris a pointer to the XV_vscaler instance. It must be a valid pointer and the instance must be ready.
Returns
The total number of bytes allocated for the HWREG_VFLTCOEFF register block.

References XV_vscaler::IsReady.

u32 XV_vscaler_Get_HwReg_Width ( XV_vscaler InstancePtr)

XV_vscaler_Get_HwReg_Width - Retrieves the width value from the hardware register for the XV_vscaler instance.

This function reads the value of the width hardware register associated with the XV_vscaler instance. It asserts that the instance pointer is not NULL and that the instance is ready before performing the register read operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
The value of the width hardware register.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerDbgReportStatus().

int XV_vscaler_Initialize ( XV_vscaler InstancePtr,
u16  DeviceId 
)

Initializes a specific XV_vscaler device instance.

This function initializes the XV_vscaler device pointed to by InstancePtr using the configuration data corresponding to the specified DeviceId. It first looks up the configuration for the given DeviceId. If the configuration is found, it calls XV_vscaler_CfgInitialize to initialize the device instance. If the configuration is not found, the function sets the IsReady flag of the instance to 0 and returns XST_DEVICE_NOT_FOUND.

Parameters
InstancePtrPointer to the XV_vscaler instance to be initialized.
DeviceIdUnique identifier for the XV_vscaler device instance.
Returns
XST_SUCCESS if initialization is successful, or XST_DEVICE_NOT_FOUND if the configuration for the specified DeviceId does not exist.

References XV_vscaler_Config::BaseAddress, XV_vscaler::IsReady, XV_vscaler_CfgInitialize(), and XV_vscaler_LookupConfig().

Referenced by XV_VScalerInitialize().

void XV_vscaler_InterruptClear ( XV_vscaler InstancePtr,
u32  Mask 
)

XV_vscaler_InterruptClear - Clears specific interrupts for the XV_vscaler instance.

This function clears the interrupts specified by the Mask parameter for the XV_vscaler hardware instance. It asserts that the provided instance pointer is not NULL and that the instance is ready before writing to the interrupt status register to clear the specified interrupts.

Parameters
InstancePtrPointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
MaskBitmask specifying which interrupts to clear.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

void XV_vscaler_InterruptDisable ( XV_vscaler InstancePtr,
u32  Mask 
)

XV_vscaler_InterruptDisable - Disables specific interrupts for the XV_vscaler instance.

This function disables the interrupts specified by the Mask parameter for the XV_vscaler hardware instance. It first asserts that the provided instance pointer is not NULL and that the instance is ready. The function reads the current interrupt enable register, clears the bits specified by Mask, and writes the updated value back to the register.

Parameters
InstancePtrPointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
MaskBitmask specifying which interrupts to disable.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

void XV_vscaler_InterruptEnable ( XV_vscaler InstancePtr,
u32  Mask 
)

XV_vscaler_InterruptEnable - Enables specific interrupts for the XV_vscaler instance.

This function enables the interrupts specified by the Mask parameter for the XV_vscaler hardware instance. It first asserts that the provided instance pointer is not NULL and that the instance is ready. The function reads the current interrupt enable register, sets the bits specified by Mask, and writes the updated value back to the register.

Parameters
InstancePtrPointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
MaskBitmask specifying which interrupts to enable.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

u32 XV_vscaler_InterruptGetEnabled ( XV_vscaler InstancePtr)

XV_vscaler_InterruptGetEnabled - Retrieves the interrupt enable register value for the XV_vscaler instance.

This function checks that the provided instance pointer is not NULL and that the instance is ready before reading the interrupt enable register from the hardware. The value returned indicates which interrupts are currently enabled for the scaler hardware.

Parameters
InstancePtris a pointer to the XV_vscaler instance.
Returns
The contents of the interrupt enable register, indicating the enabled interrupts.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

u32 XV_vscaler_InterruptGetStatus ( XV_vscaler InstancePtr)

XV_vscaler_InterruptGetStatus - Retrieves the interrupt status for the given XV_vscaler instance.

This function asserts that the provided instance pointer is not NULL and that the instance is ready before reading the interrupt status register from the hardware. The status is read from the ISR (Interrupt Status Register) at the base address specified in the configuration.

Parameters
InstancePtris a pointer to the XV_vscaler instance.
Returns
The current value of the interrupt status register.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

void XV_vscaler_InterruptGlobalDisable ( XV_vscaler InstancePtr)

XV_vscaler_InterruptGlobalDisable - Disables the global interrupt for the XV_vscaler instance.

This function asserts that the provided InstancePtr is not NULL and that the instance is ready. It then writes to the Global Interrupt Enable (GIE) register to disable global interrupts for the scaler hardware.

Parameters
InstancePtrPointer to the XV_vscaler instance for which the global interrupt should be disabled. The instance must be initialized and ready before calling this function.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

void XV_vscaler_InterruptGlobalEnable ( XV_vscaler InstancePtr)

Enables the global interrupt for the XV_vscaler instance.

This function asserts that the provided InstancePtr is not NULL and that the instance is ready. It then writes to the Global Interrupt Enable (GIE) register to enable global interrupts for the scaler hardware.

Parameters
InstancePtris a pointer to the XV_vscaler instance for which the global interrupt should be enabled. The instance must be initialized and ready before calling this function.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

u32 XV_vscaler_IsDone ( XV_vscaler InstancePtr)

XV_vscaler_IsDone - Check if the v_vscaler hardware has finished processing.

This function reads the control register and checks the ap_done bit (bit 1) to determine if the hardware has completed its operation. It asserts that the InstancePtr is not NULL and that the driver is ready before accessing the hardware registers.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
1 if the hardware is done, 0 otherwise.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, XV_vscaler::IsReady, and XV_VSCALER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VScalerDbgReportStatus().

u32 XV_vscaler_IsIdle ( XV_vscaler InstancePtr)

XV_vscaler_IsIdle - Check if the v_vscaler hardware is idle.

This function reads the control register and checks the ap_idle bit (bit 2) to determine if the hardware is currently idle. It asserts that the InstancePtr is not NULL and that the driver is ready before accessing the hardware registers.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
1 if the hardware is idle, 0 otherwise.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, XV_vscaler::IsReady, and XV_VSCALER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VScalerDbgReportStatus().

u32 XV_vscaler_IsReady ( XV_vscaler InstancePtr)

XV_vscaler_IsReady - Check if the v_vscaler hardware is ready for new input.

This function reads the control register and checks the ap_start bit (bit 0) to determine if the hardware is ready to accept new input. It asserts that the InstancePtr is not NULL and that the driver is ready before accessing the hardware registers.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
1 if the hardware is ready for new input, 0 otherwise.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, XV_vscaler::IsReady, and XV_VSCALER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VScalerDbgReportStatus().

XV_vscaler_Config* XV_vscaler_LookupConfig ( u16  DeviceId)

Looks up the configuration for a specific XV_vscaler device instance.

This function searches the XV_vscaler configuration table for an entry that matches the specified DeviceId. If a matching configuration is found, a pointer to the configuration structure is returned; otherwise, NULL is returned.

Parameters
DeviceIdThe unique identifier of the XV_vscaler device instance to look up.
Returns
Pointer to the XV_vscaler_Config structure if found, or NULL if no matching configuration exists.

Referenced by XV_vscaler_Initialize().

u32 XV_vscaler_Read_HwReg_vfltCoeff_Bytes ( XV_vscaler InstancePtr,
int  offset,
char *  data,
int  length 
)

XV_vscaler_Read_HwReg_vfltCoeff_Bytes - Reads a sequence of bytes from the HWREG_VFLTCOEFF register of the XV_vscaler hardware instance.

This function reads 'length' bytes from the hardware register starting at the specified 'offset' and stores them in the buffer pointed to by 'data'. It ensures that the read operation does not exceed the register's address range.

Parameters
InstancePtrPointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
offsetOffset from the base address of HWREG_VFLTCOEFF where reading starts.
dataPointer to the data buffer where read bytes will be stored.
lengthNumber of bytes to read from the hardware register.
Returns
Number of bytes read on success, or 0 if the operation would exceed the register's address range.

References XV_vscaler_Config::BaseAddress, and XV_vscaler::Config.

u32 XV_vscaler_Read_HwReg_vfltCoeff_Words ( XV_vscaler InstancePtr,
int  offset,
int *  data,
int  length 
)

XV_vscaler_Read_HwReg_vfltCoeff_Words - Reads an array of 32-bit words from the vertical filter coefficient hardware register of the XV_vscaler instance.

This function reads the specified number of 32-bit words from the HWREG_VFLTCOEFF register block, starting at the given offset, and stores them in the provided data array. It first checks that the instance pointer is valid and that the instance is ready. The function also ensures that the read operation does not exceed the bounds of the register block. If the operation is valid, it reads each word sequentially.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
offset,:Offset (in words) from the base of the HWREG_VFLTCOEFF register block where reading begins.
data,:Pointer to the array where the read 32-bit words will be stored.
length,:Number of 32-bit words to read.
Returns
The number of words read if successful, or 0 if the operation would exceed the register block bounds.

References XV_vscaler_Config::BaseAddress, and XV_vscaler::Config.

void XV_vscaler_Set_HwReg_ColorMode ( XV_vscaler InstancePtr,
u32  Data 
)

XV_vscaler_Set_HwReg_ColorMode - Sets the hardware register for color mode in the XV_vscaler instance.

This function writes the specified color mode data to the hardware register associated with the XV_vscaler instance. It first asserts that the instance pointer is not NULL and that the instance is ready before performing the register write operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
Data,:The color mode data to be written to the hardware register.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerSetup().

void XV_vscaler_Set_HwReg_HeightIn ( XV_vscaler InstancePtr,
u32  Data 
)

XV_vscaler_Set_HwReg_HeightIn - Sets the input height hardware register for the XV_vscaler instance.

This function writes the specified input height value to the hardware register associated with the XV_vscaler instance. It first asserts that the instance pointer is not NULL and that the instance is ready before performing the register write operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Data,:The input height value to be written to the hardware register.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerSetup().

void XV_vscaler_Set_HwReg_HeightOut ( XV_vscaler InstancePtr,
u32  Data 
)

XV_vscaler_Set_HwReg_HeightOut - Sets the output height hardware register for the XV_vscaler instance.

This function writes the specified output height value to the hardware register associated with the XV_vscaler instance. It asserts that the instance pointer is not NULL and that the instance is ready before performing the register write operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Data,:The output height value to be written to the hardware register.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerSetup().

void XV_vscaler_Set_HwReg_LineRate ( XV_vscaler InstancePtr,
u32  Data 
)

XV_vscaler_Set_HwReg_LineRate - Sets the line rate hardware register for the XV_vscaler instance.

This function writes the specified line rate value to the hardware register associated with the XV_vscaler instance. It asserts that the instance pointer is not NULL and that the instance is ready before performing the register write operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Data,:The line rate value to be written to the hardware register.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerSetup().

void XV_vscaler_Set_HwReg_Width ( XV_vscaler InstancePtr,
u32  Data 
)

XV_vscaler_Set_HwReg_Width - Sets the hardware register width for the XV_vscaler instance.

This function writes the specified width value to the hardware register associated with the XV_vscaler instance. It asserts that the instance pointer is not NULL and that the instance is ready before performing the register write operation.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance. Must not be NULL and must be initialized.
Data,:The width value to be written to the hardware register.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, and XV_vscaler::IsReady.

Referenced by XV_VScalerSetup().

void XV_vscaler_Start ( XV_vscaler InstancePtr)

XV_vscaler_Start - Start the v_vscaler hardware.

This function sets the ap_start bit in the control register to start the hardware. It preserves the auto-restart bit (bit 7) if it was previously set. The function asserts that the InstancePtr is not NULL and that the driver is ready before accessing the hardware registers.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance.
Returns
None.

References XV_vscaler_Config::BaseAddress, XV_vscaler::Config, XV_vscaler::IsReady, and XV_VSCALER_CTRL_ADDR_AP_CTRL.

Referenced by XV_VScalerStart().

u32 XV_vscaler_Write_HwReg_vfltCoeff_Bytes ( XV_vscaler InstancePtr,
int  offset,
char *  data,
int  length 
)

This Function Writes a sequence of bytes to the HWREG_VFLTCOEFF register of the XV_vscaler hardware instance.

This function writes 'length' bytes from the buffer pointed to by 'data' into the hardware register starting at the specified 'offset'. It ensures that the write operation does not exceed the register's address range.

Parameters
InstancePtrPointer to the XV_vscaler instance.
offsetOffset from the base address of HWREG_VFLTCOEFF where writing starts.
dataPointer to the data buffer containing bytes to write.
lengthNumber of bytes to write from the data buffer.
Returns
Number of bytes written on success, or 0 if the operation would exceed the register's address range.

References XV_vscaler_Config::BaseAddress, and XV_vscaler::Config.

u32 XV_vscaler_Write_HwReg_vfltCoeff_Words ( XV_vscaler InstancePtr,
int  offset,
int *  data,
int  length 
)

XV_vscaler_Write_HwReg_vfltCoeff_Words - Writes an array of 32-bit words to the vertical filter coefficient hardware register of the XV_vscaler instance.

This function writes the specified number of 32-bit words from the provided data array to the HWREG_VFLTCOEFF register block, starting at the given offset. It first checks that the instance pointer is valid and that the instance is ready. The function also ensures that the write operation does not exceed the bounds of the register block. If the operation is valid, it writes each word sequentially.

Parameters
InstancePtr,:Pointer to the XV_vscaler instance. Must not be NULL and must be initialized and ready.
offset,:Offset (in words) from the base of the HWREG_VFLTCOEFF register block where writing begins.
data,:Pointer to the array of 32-bit words to write.
length,:Number of 32-bit words to write.
Returns
The number of words written if successful, or 0 if the operation would exceed the register block bounds.

References XV_vscaler_Config::BaseAddress, and XV_vscaler::Config.