Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6b1e669 authored by Mukund Madhusudan Atre's avatar Mukund Madhusudan Atre Committed by Pavan Kumar Chilamkurthi
Browse files

msm: camera: uapi: Remove Camera uapi headers



Move camera codebase from kernel project to camera kernel
component. This change removes camera realted uapi headers.

Change-Id: Id232c409c67ebdaa372bb374474ecf27d0518d77
Signed-off-by: default avatarJigarkumar Zala <jzala@codeaurora.org>
Signed-off-by: default avatarMukund Madhusudan Atre <matre@codeaurora.org>
Signed-off-by: default avatarPavan Kumar Chilamkurthi <pchilamk@codeaurora.org>
parent 1fbb5370
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note

header-y += cam_cpas.h
header-y += cam_defs.h
header-y += cam_fd.h
header-y += cam_icp.h
header-y += cam_isp.h
header-y += cam_isp_vfe.h
header-y += cam_isp_ife.h
header-y += cam_jpeg.h
header-y += cam_req_mgr.h
header-y += cam_sensor.h
header-y += cam_sync.h
header-y += cam_lrme.h
header-y += radio-iris.h
header-y += radio-iris-commands.h
header-y += synx.h

include/uapi/media/cam_cpas.h

deleted100644 → 0
+0 −89
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 */

#ifndef __UAPI_CAM_CPAS_H__
#define __UAPI_CAM_CPAS_H__

#include "cam_defs.h"

#define CAM_FAMILY_CAMERA_SS     1
#define CAM_FAMILY_CPAS_SS       2

/* AXI BW Voting Version */
#define CAM_AXI_BW_VOTING_V2                2

/* AXI BW Voting Transaction Type */
#define CAM_AXI_TRANSACTION_READ            0
#define CAM_AXI_TRANSACTION_WRITE           1

/* AXI BW Voting Path Data Type */
#define CAM_AXI_PATH_DATA_IFE_START_OFFSET 0
#define CAM_AXI_PATH_DATA_IFE_LINEAR    (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 0)
#define CAM_AXI_PATH_DATA_IFE_VID       (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 1)
#define CAM_AXI_PATH_DATA_IFE_DISP      (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 2)
#define CAM_AXI_PATH_DATA_IFE_STATS     (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 3)
#define CAM_AXI_PATH_DATA_IFE_RDI0      (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 4)
#define CAM_AXI_PATH_DATA_IFE_RDI1      (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 5)
#define CAM_AXI_PATH_DATA_IFE_RDI2      (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 6)
#define CAM_AXI_PATH_DATA_IFE_RDI3      (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 7)
#define CAM_AXI_PATH_DATA_IFE_PDAF      (CAM_AXI_PATH_DATA_IFE_START_OFFSET + 8)
#define CAM_AXI_PATH_DATA_IFE_PIXEL_RAW \
	(CAM_AXI_PATH_DATA_IFE_START_OFFSET + 9)
#define CAM_AXI_PATH_DATA_IFE_MAX_OFFSET \
	(CAM_AXI_PATH_DATA_IFE_START_OFFSET + 31)

#define CAM_AXI_PATH_DATA_IPE_START_OFFSET 32
#define CAM_AXI_PATH_DATA_IPE_RD_IN     (CAM_AXI_PATH_DATA_IPE_START_OFFSET + 0)
#define CAM_AXI_PATH_DATA_IPE_RD_REF    (CAM_AXI_PATH_DATA_IPE_START_OFFSET + 1)
#define CAM_AXI_PATH_DATA_IPE_WR_VID    (CAM_AXI_PATH_DATA_IPE_START_OFFSET + 2)
#define CAM_AXI_PATH_DATA_IPE_WR_DISP   (CAM_AXI_PATH_DATA_IPE_START_OFFSET + 3)
#define CAM_AXI_PATH_DATA_IPE_WR_REF    (CAM_AXI_PATH_DATA_IPE_START_OFFSET + 4)
#define CAM_AXI_PATH_DATA_IPE_MAX_OFFSET \
	(CAM_AXI_PATH_DATA_IPE_START_OFFSET + 31)

#define CAM_AXI_PATH_DATA_ALL              256

/**
 * struct cam_cpas_query_cap - CPAS query device capability payload
 *
 * @camera_family     : Camera family type
 * @reserved          : Reserved field for alignment
 * @camera_version    : Camera platform version
 * @cpas_version      : Camera CPAS version within camera platform
 *
 */
struct cam_cpas_query_cap {
	uint32_t                 camera_family;
	uint32_t                 reserved;
	struct cam_hw_version    camera_version;
	struct cam_hw_version    cpas_version;
};

/**
 * struct cam_axi_per_path_bw_vote - Per path bandwidth vote information
 *
 * @usage_data               client usage data (left/right/rdi)
 * @transac_type             Transaction type on the path (read/write)
 * @path_data_type           Path for which vote is given (video, display, rdi)
 * @reserved                 Reserved for alignment
 * @camnoc_bw                CAMNOC bw for this path
 * @mnoc_ab_bw               MNOC AB bw for this path
 * @mnoc_ib_bw               MNOC IB bw for this path
 * @ddr_ab_bw                DDR AB bw for this path
 * @ddr_ib_bw                DDR IB bw for this path
 */
struct cam_axi_per_path_bw_vote {
	uint32_t                      usage_data;
	uint32_t                      transac_type;
	uint32_t                      path_data_type;
	uint32_t                      reserved;
	uint64_t                      camnoc_bw;
	uint64_t                      mnoc_ab_bw;
	uint64_t                      mnoc_ib_bw;
	uint64_t                      ddr_ab_bw;
	uint64_t                      ddr_ib_bw;
};

#endif /* __UAPI_CAM_CPAS_H__ */

include/uapi/media/cam_defs.h

deleted100644 → 0
+0 −860

File deleted.

Preview size limit exceeded, changes collapsed.

include/uapi/media/cam_fd.h

deleted100644 → 0
+0 −132
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 */

#ifndef __UAPI_CAM_FD_H__
#define __UAPI_CAM_FD_H__

#include "cam_defs.h"

#define CAM_FD_MAX_FACES                       35
#define CAM_FD_RAW_RESULT_ENTRIES              512

/* FD Op Codes */
#define CAM_PACKET_OPCODES_FD_FRAME_UPDATE     0x0

/* FD Command Buffer identifiers */
#define CAM_FD_CMD_BUFFER_ID_GENERIC           0x0
#define CAM_FD_CMD_BUFFER_ID_CDM               0x1
#define CAM_FD_CMD_BUFFER_ID_MAX               0x2

/* FD Blob types */
#define CAM_FD_BLOB_TYPE_SOC_CLOCK_BW_REQUEST  0x0
#define CAM_FD_BLOB_TYPE_RAW_RESULTS_REQUIRED  0x1

/* FD Resource IDs */
#define CAM_FD_INPUT_PORT_ID_IMAGE             0x0
#define CAM_FD_INPUT_PORT_ID_MAX               0x1

#define CAM_FD_OUTPUT_PORT_ID_RESULTS          0x0
#define CAM_FD_OUTPUT_PORT_ID_RAW_RESULTS      0x1
#define CAM_FD_OUTPUT_PORT_ID_WORK_BUFFER      0x2
#define CAM_FD_OUTPUT_PORT_ID_MAX              0x3

/**
 * struct cam_fd_soc_clock_bw_request - SOC clock, bandwidth request info
 *
 * @clock_rate : Clock rate required while processing frame
 * @bandwidth  : Bandwidth required while processing frame
 * @reserved   : Reserved for future use
 */
struct cam_fd_soc_clock_bw_request {
	uint64_t    clock_rate;
	uint64_t    bandwidth;
	uint64_t    reserved[4];
};

/**
 * struct cam_fd_face - Face properties
 *
 * @prop1 : Property 1 of face
 * @prop2 : Property 2 of face
 * @prop3 : Property 3 of face
 * @prop4 : Property 4 of face
 *
 * Do not change this layout, this is inline with how HW writes
 * these values directly when the buffer is programmed to HW
 */
struct cam_fd_face {
	uint32_t    prop1;
	uint32_t    prop2;
	uint32_t    prop3;
	uint32_t    prop4;
};

/**
 * struct cam_fd_results - FD results layout
 *
 * @faces      : Array of faces with face properties
 * @face_count : Number of faces detected
 * @reserved   : Reserved for alignment
 *
 * Do not change this layout, this is inline with how HW writes
 * these values directly when the buffer is programmed to HW
 */
struct cam_fd_results {
	struct cam_fd_face    faces[CAM_FD_MAX_FACES];
	uint32_t              face_count;
	uint32_t              reserved[3];
};

/**
 * struct cam_fd_hw_caps - Face properties
 *
 * @core_version          : FD core version
 * @wrapper_version       : FD wrapper version
 * @raw_results_available : Whether raw results are available on this HW
 * @supported_modes       : Modes supported by this HW.
 * @reserved              : Reserved for future use
 */
struct cam_fd_hw_caps {
	struct cam_hw_version    core_version;
	struct cam_hw_version    wrapper_version;
	uint32_t                 raw_results_available;
	uint32_t                 supported_modes;
	uint64_t                 reserved;
};

/**
 * struct cam_fd_query_cap_cmd - FD Query capabilities information
 *
 * @device_iommu : FD IOMMU handles
 * @cdm_iommu    : CDM iommu handles
 * @hw_caps      : FD HW capabilities
 * @reserved     : Reserved for alignment
 */
struct cam_fd_query_cap_cmd {
	struct cam_iommu_handle    device_iommu;
	struct cam_iommu_handle    cdm_iommu;
	struct cam_fd_hw_caps      hw_caps;
	uint64_t                   reserved;
};

/**
 * struct cam_fd_acquire_dev_info - FD acquire device information
 *
 * @clk_bw_request  : SOC clock, bandwidth request
 * @priority        : Priority for this acquire
 * @mode            : Mode in which to run FD HW.
 * @get_raw_results : Whether this acquire needs face raw results
 *                    while frame processing
 * @reserved        : Reserved field for 64 bit alignment
 */
struct cam_fd_acquire_dev_info {
	struct cam_fd_soc_clock_bw_request clk_bw_request;
	uint32_t                           priority;
	uint32_t                           mode;
	uint32_t                           get_raw_results;
	uint32_t                           reserved[13];
};

#endif /* __UAPI_CAM_FD_H__ */

include/uapi/media/cam_icp.h

deleted100644 → 0
+0 −213
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
 * Copyright (c) 2016-2019, The Linux Foundation. All rights reserved.
 */

#ifndef __UAPI_CAM_ICP_H__
#define __UAPI_CAM_ICP_H__

#include "cam_defs.h"
#include "cam_cpas.h"

/* icp, ipe, bps, cdm(ipe/bps) are used in querycap */
#define CAM_ICP_DEV_TYPE_A5      1
#define CAM_ICP_DEV_TYPE_IPE     2
#define CAM_ICP_DEV_TYPE_BPS     3
#define CAM_ICP_DEV_TYPE_IPE_CDM 4
#define CAM_ICP_DEV_TYPE_BPS_CDM 5
#define CAM_ICP_DEV_TYPE_MAX     5

/* definitions needed for icp aquire device */
#define CAM_ICP_RES_TYPE_BPS         1
#define CAM_ICP_RES_TYPE_IPE_RT      2
#define CAM_ICP_RES_TYPE_IPE         3
#define CAM_ICP_RES_TYPE_IPE_SEMI_RT 4
#define CAM_ICP_RES_TYPE_BPS_RT      5
#define CAM_ICP_RES_TYPE_BPS_SEMI_RT 6
#define CAM_ICP_RES_TYPE_MAX         7

/* packet opcode types */
#define CAM_ICP_OPCODE_IPE_UPDATE   0
#define CAM_ICP_OPCODE_BPS_UPDATE   1
#define CAM_ICP_OPCODE_IPE_SETTINGS 2
#define CAM_ICP_OPCODE_BPS_SETTINGS 3


/* IPE input port resource type */
#define CAM_ICP_IPE_INPUT_IMAGE_FULL            0x0
#define CAM_ICP_IPE_INPUT_IMAGE_DS4             0x1
#define CAM_ICP_IPE_INPUT_IMAGE_DS16            0x2
#define CAM_ICP_IPE_INPUT_IMAGE_DS64            0x3
#define CAM_ICP_IPE_INPUT_IMAGE_FULL_REF        0x4
#define CAM_ICP_IPE_INPUT_IMAGE_DS4_REF         0x5
#define CAM_ICP_IPE_INPUT_IMAGE_DS16_REF        0x6
#define CAM_ICP_IPE_INPUT_IMAGE_DS64_REF        0x7

/* IPE output port resource type */
#define CAM_ICP_IPE_OUTPUT_IMAGE_DISPLAY        0x8
#define CAM_ICP_IPE_OUTPUT_IMAGE_VIDEO          0x9
#define CAM_ICP_IPE_OUTPUT_IMAGE_FULL_REF       0xA
#define CAM_ICP_IPE_OUTPUT_IMAGE_DS4_REF        0xB
#define CAM_ICP_IPE_OUTPUT_IMAGE_DS16_REF       0xC
#define CAM_ICP_IPE_OUTPUT_IMAGE_DS64_REF       0xD

#define CAM_ICP_IPE_IMAGE_MAX                   0xE

/* BPS input port resource type */
#define CAM_ICP_BPS_INPUT_IMAGE                 0x0

/* BPS output port resource type */
#define CAM_ICP_BPS_OUTPUT_IMAGE_FULL           0x1
#define CAM_ICP_BPS_OUTPUT_IMAGE_DS4            0x2
#define CAM_ICP_BPS_OUTPUT_IMAGE_DS16           0x3
#define CAM_ICP_BPS_OUTPUT_IMAGE_DS64           0x4
#define CAM_ICP_BPS_OUTPUT_IMAGE_STATS_BG       0x5
#define CAM_ICP_BPS_OUTPUT_IMAGE_STATS_BHIST    0x6
#define CAM_ICP_BPS_OUTPUT_IMAGE_REG1           0x7
#define CAM_ICP_BPS_OUTPUT_IMAGE_REG2           0x8

#define CAM_ICP_BPS_IO_IMAGES_MAX               0x9

/* Command meta types */
#define CAM_ICP_CMD_META_GENERIC_BLOB           0x1

/* Generic blob types */
#define CAM_ICP_CMD_GENERIC_BLOB_CLK            0x1
#define CAM_ICP_CMD_GENERIC_BLOB_CFG_IO         0x2
#define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_MAP     0x3
#define CAM_ICP_CMD_GENERIC_BLOB_FW_MEM_UNMAP   0x4
#define CAM_ICP_CMD_GENERIC_BLOB_CLK_V2         0x5

/**
 * struct cam_icp_clk_bw_request_v2
 *
 * @budget_ns: Time required to process frame
 * @frame_cycles: Frame cycles needed to process the frame
 * @rt_flag: Flag to indicate real time stream
 * @reserved: For memory alignment
 * @num_paths: Number of axi paths in bw request
 * @axi_path: Per path vote info for IPE/BPS
 */
struct cam_icp_clk_bw_request_v2 {
	uint64_t                          budget_ns;
	uint32_t                          frame_cycles;
	uint32_t                          rt_flag;
	uint32_t                          reserved;
	uint32_t                          num_paths;
	struct cam_axi_per_path_bw_vote   axi_path[1];
};

/**
 * struct cam_icp_clk_bw_request
 *
 * @budget_ns: Time required to process frame
 * @frame_cycles: Frame cycles needed to process the frame
 * @rt_flag: Flag to indicate real time stream
 * @uncompressed_bw: Bandwidth required to process frame
 * @compressed_bw: Compressed bandwidth to process frame
 */
struct cam_icp_clk_bw_request {
	uint64_t budget_ns;
	uint32_t frame_cycles;
	uint32_t rt_flag;
	uint64_t uncompressed_bw;
	uint64_t compressed_bw;
};

/**
 * struct cam_icp_dev_ver - Device information for particular hw type
 *
 * This is used to get device version info of
 * ICP, IPE, BPS and CDM related IPE and BPS from firmware
 * and use this info in CAM_QUERY_CAP IOCTL
 *
 * @dev_type: hardware type for the cap info(icp, ipe, bps, cdm(ipe/bps))
 * @reserved: reserved field
 * @hw_ver: major, minor and incr values of a device version
 */
struct cam_icp_dev_ver {
	uint32_t dev_type;
	uint32_t reserved;
	struct cam_hw_version hw_ver;
};

/**
 * struct cam_icp_ver - ICP version info
 *
 * This strcuture is used for fw and api version
 * this is used to get firmware version and api version from firmware
 * and use this info in CAM_QUERY_CAP IOCTL
 *
 * @major: FW version major
 * @minor: FW version minor
 * @revision: FW version increment
 */
struct cam_icp_ver {
	uint32_t major;
	uint32_t minor;
	uint32_t revision;
	uint32_t reserved;
};

/**
 * struct cam_icp_query_cap_cmd - ICP query device capability payload
 *
 * @dev_iommu_handle: icp iommu handles for secure/non secure modes
 * @cdm_iommu_handle: iommu handles for secure/non secure modes
 * @fw_version: firmware version info
 * @api_version: api version info
 * @num_ipe: number of ipes
 * @num_bps: number of bps
 * @dev_ver: returned device capability array
 */
struct cam_icp_query_cap_cmd {
	struct cam_iommu_handle dev_iommu_handle;
	struct cam_iommu_handle cdm_iommu_handle;
	struct cam_icp_ver fw_version;
	struct cam_icp_ver api_version;
	uint32_t num_ipe;
	uint32_t num_bps;
	struct cam_icp_dev_ver dev_ver[CAM_ICP_DEV_TYPE_MAX];
};

/**
 * struct cam_icp_res_info - ICP output resource info
 *
 * @format: format of the resource
 * @width:  width in pixels
 * @height: height in lines
 * @fps:  fps
 */
struct cam_icp_res_info {
	uint32_t format;
	uint32_t width;
	uint32_t height;
	uint32_t fps;
};

/**
 * struct cam_icp_acquire_dev_info - An ICP device info
 *
 * @scratch_mem_size: Output param - size of scratch memory
 * @dev_type: device type (IPE_RT/IPE_NON_RT/BPS)
 * @io_config_cmd_size: size of IO config command
 * @io_config_cmd_handle: IO config command for each acquire
 * @secure_mode: camera mode (secure/non secure)
 * @chain_info: chaining info of FW device handles
 * @in_res: resource info used for clock and bandwidth calculation
 * @num_out_res: number of output resources
 * @out_res: output resource
 */
struct cam_icp_acquire_dev_info {
	uint32_t scratch_mem_size;
	uint32_t dev_type;
	uint32_t io_config_cmd_size;
	int32_t  io_config_cmd_handle;
	uint32_t secure_mode;
	int32_t chain_info;
	struct cam_icp_res_info in_res;
	uint32_t num_out_res;
	struct cam_icp_res_info out_res[1];
} __attribute__((__packed__));

#endif /* __UAPI_CAM_ICP_H__ */
Loading