msm: camera: jpeg: Add UAPI support for JPEG retry mechanism
Add uapi structure to add support for enforcing the size restriction on JPEG thumbnail images. CRs-Fixed: 2999106 Change-Id: Icee615eb5674b3f0869631a57eed0d46aa6c2799 Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef __UAPI_CAM_JPEG_H__
|
||||
@@ -26,21 +26,40 @@
|
||||
|
||||
/* ENC input port resource type */
|
||||
#define CAM_JPEG_ENC_INPUT_IMAGE 0x0
|
||||
|
||||
/* ENC output port resource type */
|
||||
#define CAM_JPEG_ENC_OUTPUT_IMAGE 0x1
|
||||
|
||||
#define CAM_JPEG_ENC_IO_IMAGES_MAX 0x2
|
||||
|
||||
/* DMA input port resource type */
|
||||
#define CAM_JPEG_DMA_INPUT_IMAGE 0x0
|
||||
|
||||
/* DMA output port resource type */
|
||||
#define CAM_JPEG_DMA_OUTPUT_IMAGE 0x1
|
||||
|
||||
#define CAM_JPEG_DMA_IO_IMAGES_MAX 0x2
|
||||
|
||||
#define CAM_JPEG_IMAGE_MAX 0x2
|
||||
/*JPEG Command Buffer Metadata types*/
|
||||
#define CAM_JPEG_ENC_PACKET_CONFIG_DATA 0x00
|
||||
#define CAM_JPEG_DMA_PACKET_PLANE0_CONFIG_DATA 0x01
|
||||
#define CAM_JPEG_DMA_PACKET_PLANE1_CONFIG_DATA 0x02
|
||||
#define CAM_JPEG_PACKET_INOUT_PARAM 0x03
|
||||
#define CAM_JPEG_PACKET_GENERIC_BLOB 0x04
|
||||
|
||||
/*JPEG Generic Blob Command buffer type*/
|
||||
#define CAM_JPEG_THUMBNAIL_SIZE_BLOB 0x01
|
||||
|
||||
/**
|
||||
* struct cam_jpeg_thumbnail_size_blob - Blob containing information about maximum size of the
|
||||
* thumbnail image
|
||||
*
|
||||
* This blob contains information about the maximum size of the encoded thumbnail image that is
|
||||
* considered valid.
|
||||
*
|
||||
* @threshold_size : Size threshold for the encoded Thumbnail image
|
||||
* @reserved : Reserved field
|
||||
*/
|
||||
struct cam_jpeg_thumbnail_size_blob {
|
||||
__u32 threshold_size;
|
||||
__u32 reserved[3];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_jpeg_dev_ver - Device information for particular hw type
|
||||
|
@@ -56,6 +56,7 @@
|
||||
#define V4L_EVENT_CAM_REQ_MGR_ERROR 1
|
||||
#define V4L_EVENT_CAM_REQ_MGR_SOF_BOOT_TS 2
|
||||
#define V4L_EVENT_CAM_REQ_MGR_CUSTOM_EVT 3
|
||||
#define V4L_EVENT_CAM_REQ_MGR_NODE_EVENT 4
|
||||
|
||||
/* SOF Event status */
|
||||
#define CAM_REQ_MGR_SOF_EVENT_SUCCESS 0
|
||||
@@ -518,11 +519,47 @@ struct cam_req_mgr_custom_msg {
|
||||
__u64 custom_data;
|
||||
};
|
||||
|
||||
/**
|
||||
* Request Manager Node Msg Event Types
|
||||
* @CAM_REQ_MGR_NO_EVENT : Event type not reported by the hardware
|
||||
* @CAM_REQ_MGR_RETRY_EVENT : Retry request reported from the hardware
|
||||
*/
|
||||
#define CAM_REQ_MGR_NO_EVENT 0
|
||||
#define CAM_REQ_MGR_RETRY_EVENT 1
|
||||
|
||||
/**
|
||||
* Request Manager Node Msg Event Cause
|
||||
* @CAM_REQ_MGR_CAUSE_UNREPORTED : Event cause not reported by the hardware
|
||||
* @CAM_REQ_MGR_JPEG_THUBNAIL_SIZE_ERROR : JPEG Thumbnail encode size exceeds the threshold size
|
||||
*/
|
||||
#define CAM_REQ_MGR_CAUSE_UNREPORTED 0
|
||||
#define CAM_REQ_MGR_JPEG_THUBNAIL_SIZE_ERROR 1
|
||||
|
||||
/**
|
||||
* struct cam_req_mgr_node_msg
|
||||
* @device_hdl : Device handle of the device reporting the error
|
||||
* @link_hdl : link hdl for real time devices
|
||||
* @event_type : Type of the event
|
||||
* @event_cause : Cause of the event
|
||||
* @request_id : Request id
|
||||
* @custom_data : custom data
|
||||
* @reserved : Reserved field
|
||||
*/
|
||||
struct cam_req_mgr_node_msg {
|
||||
__s32 device_hdl;
|
||||
__s32 link_hdl;
|
||||
__u32 event_type;
|
||||
__u32 event_cause;
|
||||
__u64 request_id;
|
||||
__u64 custom_data;
|
||||
__u32 reserved[2];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cam_req_mgr_message
|
||||
* @session_hdl: session to which the frame belongs to
|
||||
* @reserved: reserved field
|
||||
* @u: union which can either be error/frame/custom message
|
||||
* @u: union which can either be error/frame/custom/node message
|
||||
*/
|
||||
struct cam_req_mgr_message {
|
||||
__s32 session_hdl;
|
||||
@@ -531,6 +568,7 @@ struct cam_req_mgr_message {
|
||||
struct cam_req_mgr_error_msg err_msg;
|
||||
struct cam_req_mgr_frame_msg frame_msg;
|
||||
struct cam_req_mgr_custom_msg custom_msg;
|
||||
struct cam_req_mgr_node_msg node_msg;
|
||||
} u;
|
||||
};
|
||||
#endif /* __UAPI_LINUX_CAM_REQ_MGR_H */
|
||||
|
Reference in New Issue
Block a user