linux/drivers/mxc/ipu/pf/mxc_pf.c File Reference

MXC IPU MPEG4/H.264 Post-filtering driver. More...

Functions

static int mxc_pf_init (pf_init_params *pf_init)
static int mxc_pf_uninit (void)
static int mxc_pf_reqbufs (pf_reqbufs_params *reqbufs)
static int mxc_pf_start (pf_buf *in, pf_buf *out, int qp_buf)
static int mxc_pf_open (struct inode *inode, struct file *filp)
static int mxc_pf_release (struct inode *inode, struct file *filp)
static int mxc_pf_ioctl (struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg)
static int mxc_pf_mmap (struct file *file, struct vm_area_struct *vma)
int mxc_pf_fsync (struct file *filp, struct dentry *dentry, int datasync)
static unsigned int mxc_pf_poll (struct file *file, poll_table *wait)
int mxc_pf_dev_init (void)
static void mxc_pf_exit (void)

Variables

static struct file_operations mxc_pf_fops

Detailed Description

MXC IPU MPEG4/H.264 Post-filtering driver.

User-level API for IPU Hardware MPEG4/H.264 Post-filtering.


Function Documentation

int mxc_pf_dev_init ( void   ) 

Post Filter driver module initialization function.

static void mxc_pf_exit ( void   )  [static]

Post Filter driver module exit function.

int mxc_pf_fsync ( struct file *  filp,
struct dentry *  dentry,
int  datasync 
)

Post Filter driver fsync function. This function implements the Linux file_operations.fsync() API function.

The user must call fsync() before reading an output buffer. This call flushes the L1 and L2 caches

Parameters:
filp structure file *
dentry struct dentry *
datasync unused
Returns:
status POLLIN | POLLRDNORM
static int mxc_pf_init ( pf_init_params pf_init  )  [static]

This function handles PF_IOCTL_INIT calls. It initializes the PF channels, interrupt handlers, and channel buffers.

Returns:
This function returns 0 on success or negative error code on error.

References pf_init_params::height, pf_init_params::pf_mode, pf_init_params::stride, and pf_init_params::width.

Referenced by mxc_pf_ioctl().

static int mxc_pf_ioctl ( struct inode *  inode,
struct file *  filp,
unsigned int  cmd,
unsigned long  arg 
) [static]

Post Filter driver ioctl function. This function implements the Linux file_operations.ioctl() API function.

Parameters:
inode struct inode *
filp struct file *
cmd IOCTL command to handle
arg Pointer to arguments for IOCTL
Returns:
This function returns 0 on success or negative error code on error.

References pf_start_params::h264_pause_row, pf_start_params::in, mxc_pf_init(), mxc_pf_reqbufs(), mxc_pf_start(), mxc_pf_uninit(), pf_buf::offset, and pf_start_params::out.

static int mxc_pf_mmap ( struct file *  file,
struct vm_area_struct *  vma 
) [static]

Post Filter driver mmap function. This function implements the Linux file_operations.mmap() API function for mapping driver buffers to user space.

Parameters:
file struct file *
vma structure vm_area_struct *
Returns:
0 Success, EINTR busy lock error, ENOBUFS remap_page error.
static int mxc_pf_open ( struct inode *  inode,
struct file *  filp 
) [static]

Post Filter driver open function. This function implements the Linux file_operations.open() API function.

Parameters:
inode struct inode *
filp struct file *
Returns:
This function returns 0 on success or negative error code on error.
static unsigned int mxc_pf_poll ( struct file *  file,
poll_table *  wait 
) [static]

Post Filter driver poll function. This function implements the Linux file_operations.poll() API function.

Parameters:
file structure file *
wait structure poll_table *
Returns:
status POLLIN | POLLRDNORM
static int mxc_pf_release ( struct inode *  inode,
struct file *  filp 
) [static]

Post Filter driver release function. This function implements the Linux file_operations.release() API function.

Parameters:
inode struct inode *
filp struct file *
Returns:
This function returns 0 on success or negative error code on error.

References pf_reqbufs_params::count, mxc_pf_reqbufs(), and mxc_pf_uninit().

static int mxc_pf_reqbufs ( pf_reqbufs_params reqbufs  )  [static]

This function handles PF_IOCTL_REQBUFS calls. It initializes the PF channels and channel buffers.

Parameters:
reqbufs Input/Output Structure containing buffer mode, type, offset, and size. The offset and size of the buffer are returned for PF_MEMORY_MMAP mode.
Returns:
This function returns 0 on success or negative error code on error.

References pf_reqbufs_params::count, pf_buf::offset, and pf_buf::size.

Referenced by mxc_pf_ioctl(), and mxc_pf_release().

static int mxc_pf_start ( pf_buf in,
pf_buf out,
int  qp_buf 
) [static]

This function handles PF_IOCTL_START calls. It sets the PF channel buffers addresses and starts the channels

Returns:
This function returns 0 on success or negative error code on error.

References pf_buf::offset, pf_buf::u_offset, pf_buf::v_offset, and pf_buf::y_offset.

Referenced by mxc_pf_ioctl().

static int mxc_pf_uninit ( void   )  [static]

This function handles PF_IOCTL_UNINIT calls. It uninitializes the PF channels and interrupt handlers.

Returns:
This function returns 0 on success or negative error code on error.

Referenced by mxc_pf_ioctl(), and mxc_pf_release().


Variable Documentation

struct file_operations mxc_pf_fops [static]
Initial value:
 {
        .owner = THIS_MODULE,
        .open = mxc_pf_open,
        .release = mxc_pf_release,
        .ioctl = mxc_pf_ioctl,
        .poll = mxc_pf_poll,
        .mmap = mxc_pf_mmap,
        .fsync = mxc_pf_fsync,
}

File operation structure functions pointers.

footer
©  Freescale Semiconductor, Inc., 2007.  All rights reserved.
Freescale Confidential Proprietary
NDA Required
doxygen