drivers/staging/media/atomisp/pci/camera/util/interface/ia_css_util.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/camera/util/interface/ia_css_util.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/camera/util/interface/ia_css_util.h
Extension
.h
Size
2783 bytes
Lines
124
Domain
Driver Families
Bucket
drivers/staging
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __IA_CSS_UTIL_H__
#define __IA_CSS_UTIL_H__

#include <linux/errno.h>

#include <ia_css_err.h>
#include <type_support.h>
#include <ia_css_frame_public.h>
#include <ia_css_stream_public.h>
#include <ia_css_stream_format.h>

/* @brief convert "errno" error code to "ia_css_err" error code
 *
 * @param[in]	"errno" error code
 * @return	"ia_css_err" error code
 *
 */
int ia_css_convert_errno(
    int in_err);

/* @brief check vf frame info.
 *
 * @param[in] info
 * @return	0 or error code upon error.
 *
 */
int ia_css_util_check_vf_info(
    const struct ia_css_frame_info *const info);

/* @brief check input configuration.
 *
 * @param[in] stream_config
 * @param[in] must_be_raw
 * @return	0 or error code upon error.
 *
 */
int ia_css_util_check_input(
    const struct ia_css_stream_config *const stream_config,
    bool must_be_raw,
    bool must_be_yuv);

/* @brief check vf and out frame info.
 *
 * @param[in] out_info
 * @param[in] vf_info
 * @return	0 or error code upon error.
 *
 */
int ia_css_util_check_vf_out_info(
    const struct ia_css_frame_info *const out_info,
    const struct ia_css_frame_info *const vf_info);

/* @brief check width and height
 *
 * @param[in] width
 * @param[in] height
 * @return	0 or error code upon error.
 *
 */
int ia_css_util_check_res(
    unsigned int width,
    unsigned int height);

/* ISP2401 */
/* @brief compare resolutions (less or equal)
 *
 * @param[in] a resolution
 * @param[in] b resolution
 * @return    true if both dimensions of a are less or
 *            equal than those of b, false otherwise
 *
 */
bool ia_css_util_res_leq(
    struct ia_css_resolution a,
    struct ia_css_resolution b);

/* ISP2401 */
/**
 * @brief Check if resolution is zero
 *
 * @param[in] resolution The resolution to check
 *
 * @returns true if resolution is zero
 */
bool ia_css_util_resolution_is_zero(
    const struct ia_css_resolution resolution);

/* @brief check width and height
 *
 * @param[in] stream_format

Annotation

Implementation Notes