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

Commit 5a51238c authored by Venkat Chinta's avatar Venkat Chinta
Browse files

msm: camera: uapi: Adds UBWC blob payload structure



This change adds UBWC blob payload structure to enable userspace
control over UWBC configuration. This will allow userspace payload
and corresponding API to configure UBWC to remain consistent across
different UBWC versions.

Change-Id: I6f31d7ff9186666703277eb82aefaa8fb48f80e8
Signed-off-by: default avatarVenkat Chinta <vchinta@codeaurora.org>
parent cbb29e12
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@
	(CAM_ISP_PACKET_META_GENERIC_BLOB_COMMON + 1)

#define CAM_ISP_GENERIC_BLOB_TYPE_MAX               \
	(CAM_ISP_GENERIC_BLOB_TYPE_BW_CONFIG + 1)
	(CAM_ISP_GENERIC_BLOB_TYPE_UBWC_CONFIG + 1)

static uint32_t blob_type_hw_cmd_map[CAM_ISP_GENERIC_BLOB_TYPE_MAX] = {
	CAM_ISP_HW_CMD_GET_HFR_UPDATE,
+49 −0
Original line number Diff line number Diff line
@@ -43,6 +43,9 @@
#define CAM_CMD_BUF_GENERIC                 0x9
#define CAM_CMD_BUF_LEGACY                  0xA

/* UBWC API Version */
#define CAM_UBWC_CFG_VERSION_1              1

/**
 * enum flush_type_t - Identifies the various flush types
 *
@@ -235,6 +238,34 @@ struct cam_plane_cfg {
	uint32_t                v_init;
};

/**
 * struct cam_ubwc_plane_cfg_v1 - UBWC Plane configuration info
 *
 * @port_type:                  Port Type
 * @meta_stride:                UBWC metadata stride
 * @meta_size:                  UBWC metadata plane size
 * @meta_offset:                UBWC metadata offset
 * @packer_config:              UBWC packer config
 * @mode_config_0:              UBWC mode config 0
 * @mode_config_1:              UBWC 3 mode config 1
 * @tile_config:                UBWC tile config
 * @h_init:                     UBWC horizontal initial coordinate in pixels
 * @v_init:                     UBWC vertical initial coordinate in lines
 *
 */
struct cam_ubwc_plane_cfg_v1 {
	uint32_t                port_type;
	uint32_t                meta_stride;
	uint32_t                meta_size;
	uint32_t                meta_offset;
	uint32_t                packer_config;
	uint32_t                mode_config_0;
	uint32_t                mode_config_1;
	uint32_t                tile_config;
	uint32_t                h_init;
	uint32_t                v_init;
};

/**
 * struct cam_cmd_buf_desc - Command buffer descriptor
 *
@@ -474,4 +505,22 @@ struct cam_flush_dev_cmd {
	int64_t        req_id;
};

/**
 * struct cam_ubwc_config - UBWC Configuration Payload
 *
 * @api_version:         UBWC config api version
 * @num_ports:           Number of ports to be configured
 * @ubwc_plane_config:   Array of UBWC configurations per port
 *                       Size [CAM_PACKET_MAX_PLANES - 1] per port
 *                       as UBWC is supported on Y & C planes
 *                       and therefore a max size of 2 planes
 *
 */
struct cam_ubwc_config {
	uint32_t   api_version;
	uint32_t   num_ports;
	struct cam_ubwc_plane_cfg_v1
		   ubwc_plane_cfg[1][CAM_PACKET_MAX_PLANES - 1];
};

#endif /* __UAPI_CAM_DEFS_H__ */
+4 −3
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@
#define CAM_ISP_GENERIC_BLOB_TYPE_HFR_CONFIG         0
#define CAM_ISP_GENERIC_BLOB_TYPE_CLOCK_CONFIG       1
#define CAM_ISP_GENERIC_BLOB_TYPE_BW_CONFIG          2
#define CAM_ISP_GENERIC_BLOB_TYPE_UBWC_CONFIG        3

/* Query devices */
/**