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

Commit 7aaa9af3 authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: cpas: Add cpas support for camera v680 platform" into camera-kernel.lnx.4.0

parents 4e9f4848 71d305df
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@
#include "cpastop_v520_100.h"
#include "cpastop_v545_100.h"
#include "cpastop_v570_200.h"
#include "cpastop_v680_100.h"

struct cam_camnoc_info *camnoc_info;

@@ -175,6 +176,10 @@ static int cam_cpas_translate_camera_cpas_version_id(
		*cam_version_id = CAM_CPAS_CAMERA_VERSION_ID_570;
		break;

	case CAM_CPAS_CAMERA_VERSION_680:
		*cam_version_id = CAM_CPAS_CAMERA_VERSION_ID_680;
		break;

	default:
		CAM_ERR(CAM_CPAS, "Invalid cam version %u",
			cam_version);
@@ -810,6 +815,9 @@ static int cam_cpastop_init_hw_version(struct cam_hw_info *cpas_hw,
	case CAM_CPAS_TITAN_570_V200:
		camnoc_info = &cam570_cpas200_camnoc_info;
		break;
	case CAM_CPAS_TITAN_680_V100:
		camnoc_info = &cam680_cpas100_camnoc_info;
		break;
	default:
		CAM_ERR(CAM_CPAS, "Camera Version not supported %d.%d.%d",
			hw_caps->camera_version.major,
@@ -853,6 +861,15 @@ static int cam_cpastop_setup_qos_settings(struct cam_hw_info *cpas_hw,
				"Invalid selection mask 0x%x for hw 0x%x",
				selection_mask, soc_info->hw_version);
		break;
	case CAM_CPAS_TITAN_680_V100:
		if ((selection_mask & CAM_CPAS_QOS_CUSTOM_SETTINGS_MASK) ||
			(selection_mask & CAM_CPAS_QOS_DEFAULT_SETTINGS_MASK))
			camnoc_info = &cam680_cpas100_camnoc_info;
		else
			CAM_ERR(CAM_CPAS,
				"Invalid selection mask 0x%x for hw 0x%x",
				selection_mask, soc_info->hw_version);
		break;
	default:
		CAM_WARN(CAM_CPAS, "QoS selection not supported for 0x%x",
			soc_info->hw_version);
+82 −38
Original line number Diff line number Diff line
@@ -12,11 +12,16 @@
/**
 * enum cam_camnoc_hw_irq_type - Enum for camnoc error types
 *
 * @CAM_CAMNOC_HW_IRQ_SLAVE_ERROR: Each slave port in CAMNOC (3 QSB ports and
 *                                 1 QHB port) has an error logger. The error
 *                                 observed at any slave port is logged into
 *                                 the error logger register and an IRQ is
 *                                 triggered
 * @CAM_CAMNOC_HW_IRQ_SLAVE_ERROR                  : Each slave port in CAMNOC
 *                                                  (3 QSB ports and 1 QHB port)
 *                                                   has an error logger. The
 *                                                   error observed at any slave
 *                                                   port is logged into the
 *                                                   error logger register and
 *                                                   an IRQ is triggered
 * @CAM_CAMNOC_HW_IRQ_IFE_UBWC_ENCODE_ERROR        : Triggered if any error
 *                                                   detected in the IFE UBWC
 *                                                   encoder instance
 * @CAM_CAMNOC_HW_IRQ_IFE_UBWC_STATS_ENCODE_ERROR  : Triggered if any error
 *                                                   detected in the IFE UBWC-
 *                                                   Stats encoder instance
@@ -27,27 +32,36 @@
 *                                                   detected in the IFE0 UBWC
 *                                                   encoder instance
 * @CAM_CAMNOC_HW_IRQ_IFE13_UBWC_ENCODE_ERROR      : Triggered if any error
 *                                               detected in the IFE1 or IFE3
 *                                                   detected in the IFE1 or
 *                                                   IFE3 UBWC encoder instance
 * @CAM_CAMNOC_HW_IRQ_IFE0_UBWC_ENCODE_ERROR       : Triggered if any UBWC error
 *                                                   is detected in IFE0 write
 *                                                   path
 * @CAM_CAMNOC_HW_IRQ_IFE1_WRITE_UBWC_ENCODE_ERROR : Triggered if any UBWC error
 *                                                   is detected in IFE1 write
 *                                                   path slave  times out after
 *                                                   4000 AHB cycles
 * @CAM_CAMNOC_HW_IRQ_IPE_UBWC_ENCODE_ERROR        : Triggered if any error
 *                                                   detected in the IPE
 *                                                   UBWC encoder instance
 * @CAM_CAMNOC_HW_IRQ_BPS_UBWC_ENCODE_ERROR        : Triggered if any error
 *                                                   detected in the BPS
 *                                                   UBWC encoder instance
 * @CAM_CAMNOC_HW_IRQ_IPE1_BPS_UBWC_DECODE_ERROR   : Triggered if any error
 *                                                detected in the IPE1/BPS read
 *                                                   detected in the IPE1/BPS
 *                                                   read path decoder instance
 * @CAM_CAMNOC_HW_IRQ_IPE0_UBWC_DECODE_ERROR       : Triggered if any error
 *                                                   detected in the IPE0 read
 *                                                   path decoder instance
 * @CAM_CAMNOC_HW_IRQ_IPE1_UBWC_DECODE_ERROR       : Triggered if any error
 *                                                   detected in the IPE1 read
 *                                                   path decoder instance
 * @CAM_CAMNOC_HW_IRQ_IPE0_UBWC_DECODE_ERROR   : Triggered if any error detected
 *                                               in the IPE0 read path decoder
 *                                               instance
 * @CAM_CAMNOC_HW_IRQ_IPE_BPS_UBWC_DECODE_ERROR    : Triggered if any error
 *                                                   detected in the IPE/BPS
 *                                                   UBWC decoder instance
 * @CAM_CAMNOC_HW_IRQ_IPE_BPS_UBWC_ENCODE_ERROR    : Triggered if any error
 *                                               detected in the IPE/BPS UBWC
 *                                               encoder instance
 * @CAM_CAMNOC_HW_IRQ_IFE0_UBWC_ENCODE_ERROR:    Triggered if any UBWC error
 *                                               is detected in IFE0 write path
 * @CAM_CAMNOC_HW_IRQ_IFE1_WRITE_UBWC_ENCODE_ERROR:  Triggered if any UBWC error
 *                                               is detected in IFE1 write path
 * @CAM_CAMNOC_HW_IRQ_AHB_TIMEOUT              : Triggered when the QHS_ICP
 *                                               slave  times out after 4000
 *                                               AHB cycles
 *                                                   detected in the IPE/BPS
 *                                                   UBWC encoder instance
 * @CAM_CAMNOC_HW_IRQ_RESERVED1                    : Reserved
 * @CAM_CAMNOC_HW_IRQ_RESERVED2                    : Reserved
 * @CAM_CAMNOC_HW_IRQ_CAMNOC_TEST                  : To test the IRQ logic
@@ -55,6 +69,8 @@
enum cam_camnoc_hw_irq_type {
	CAM_CAMNOC_HW_IRQ_SLAVE_ERROR =
		CAM_CAMNOC_IRQ_SLAVE_ERROR,
	CAM_CAMNOC_HW_IRQ_IFE_UBWC_ENCODE_ERROR =
		CAM_CAMNOC_IRQ_IFE_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IFE_UBWC_STATS_ENCODE_ERROR =
		CAM_CAMNOC_IRQ_IFE_UBWC_STATS_ENCODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IFE_UBWC_STATS_1_ENCODE_ERROR =
@@ -67,10 +83,16 @@ enum cam_camnoc_hw_irq_type {
		CAM_CAMNOC_IRQ_IFE0_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IFE1_WRITE_UBWC_ENCODE_ERROR =
		CAM_CAMNOC_IRQ_IFE1_WRITE_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IPE_UBWC_ENCODE_ERROR =
		CAM_CAMNOC_IRQ_IPE_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_HW_IRQ_BPS_UBWC_ENCODE_ERROR =
		CAM_CAMNOC_IRQ_BPS_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IPE1_BPS_UBWC_DECODE_ERROR =
		CAM_CAMNOC_IRQ_IPE1_BPS_UBWC_DECODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IPE0_UBWC_DECODE_ERROR =
		CAM_CAMNOC_IRQ_IPE0_UBWC_DECODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IPE1_UBWC_DECODE_ERROR =
		CAM_CAMNOC_IRQ_IPE1_UBWC_DECODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IPE_BPS_UBWC_DECODE_ERROR =
		CAM_CAMNOC_IRQ_IPE_BPS_UBWC_DECODE_ERROR,
	CAM_CAMNOC_HW_IRQ_IPE_BPS_UBWC_ENCODE_ERROR =
@@ -88,9 +110,17 @@ enum cam_camnoc_hw_irq_type {
 *         each of these ports.
 *
 * @CAM_CAMNOC_CDM: Indicates CDM HW connection to camnoc
 * @CAM_CAMNOC_SFE_RD: Indicates read data from all SFEs to cammnoc
 * @CAM_CAMNOC_IFE02: Indicates IFE0, IFE2 HW connection to camnoc
 * @CAM_CAMNOC_IFE13: Indicates IFE1, IFE3 HW connection to camnoc
 * @CAM_CAMNOC_IFE_LITE: Indicates all IFE lites connection to camnoc
 * @CAM_CAMNOC_IFE_LINEAR: Indicates linear data from all IFEs to cammnoc
 * @CAM_CAMNOC_IFE_LINEAR_STATS: Indicates linear and stats data from certan
 *         IFEs to cammnoc
 * @CAM_CAMNOC_IFE_LINEAR_STATS_1: Indicates linear and stats data from certan
 *         IFEs to cammnoc
 * @CAM_CAMNOC_IFE_PDAF: Indicates pdaf data from all IFEs to cammnoc
 * @CAM_CAMNOC_IFE_UBWC: Indicates ubwc from all IFEs to cammnoc
 * @CAM_CAMNOC_IFE_UBWC_STATS: Indicates ubwc+stats from certain IFEs to cammnoc
 * @CAM_CAMNOC_IFE_UBWC_STATS_1: Indicates ubwc+stats from certain
 *         IFEs to cammnoc
@@ -108,10 +138,14 @@ enum cam_camnoc_hw_irq_type {
 *         connection to camnoc
 * @CAM_CAMNOC_IPE_VID_DISP_WRITE: Indicates IPE's VID/DISP Wrire HW
 *         connection to camnoc
 * @CAM_CAMNOC_IPE_WR: Indicates IPE HW's write connection to camnoc
 * @CAM_CAMNOC_IPE0_RD: Indicates IPE's Read0 HW connection to camnoc
 * @CAM_CAMNOC_IPE1_RD: Indicates IPE's Read1 HW connection to camnoc
 * @CAM_CAMNOC_IPE1_BPS_RD: Indicates IPE's Read1 + BPS Read HW connection
 *         to camnoc
 * @CAM_CAMNOC_IPE_BPS_WR: Indicates IPE+BPS Write HW connection to camnoc
 * @CAM_CAMNOC_BPS_WR: Indicates BPS HW's write connection to camnoc
 * @CAM_CAMNOC_BPS_RD: Indicates BPS HW's read connection to camnoc
 * @CAM_CAMNOC_JPEG: Indicates JPEG HW connection to camnoc
 * @CAM_CAMNOC_FD: Indicates FD HW connection to camnoc
 * @CAM_CAMNOC_ICP: Indicates ICP HW connection to camnoc
@@ -122,9 +156,15 @@ enum cam_camnoc_hw_irq_type {
 */
enum cam_camnoc_port_type {
	CAM_CAMNOC_CDM,
	CAM_CAMNOC_SFE_RD,
	CAM_CAMNOC_IFE02,
	CAM_CAMNOC_IFE13,
	CAM_CAMNOC_IFE_LITE,
	CAM_CAMNOC_IFE_LINEAR,
	CAM_CAMNOC_IFE_LINEAR_STATS,
	CAM_CAMNOC_IFE_LINEAR_STATS_1,
	CAM_CAMNOC_IFE_PDAF,
	CAM_CAMNOC_IFE_UBWC,
	CAM_CAMNOC_IFE_UBWC_STATS,
	CAM_CAMNOC_IFE_UBWC_STATS_1,
	CAM_CAMNOC_IFE_RDI_WR,
@@ -137,9 +177,13 @@ enum cam_camnoc_port_type {
	CAM_CAMNOC_IPE_BPS_LRME_READ,
	CAM_CAMNOC_IPE_BPS_LRME_WRITE,
	CAM_CAMNOC_IPE_VID_DISP_WRITE,
	CAM_CAMNOC_IPE_WR,
	CAM_CAMNOC_IPE0_RD,
	CAM_CAMNOC_IPE1_RD,
	CAM_CAMNOC_IPE1_BPS_RD,
	CAM_CAMNOC_IPE_BPS_WR,
	CAM_CAMNOC_BPS_WR,
	CAM_CAMNOC_BPS_RD,
	CAM_CAMNOC_JPEG,
	CAM_CAMNOC_FD,
	CAM_CAMNOC_ICP,
+1213 −0

File added.

Preview size limit exceeded, changes collapsed.

+18 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ enum cam_cpas_camera_version {
	CAM_CPAS_CAMERA_VERSION_580  = 0x00050800,
	CAM_CPAS_CAMERA_VERSION_545  = 0x00050405,
	CAM_CPAS_CAMERA_VERSION_570  = 0x00050700,
	CAM_CPAS_CAMERA_VERSION_680  = 0x00060800,
	CAM_CPAS_CAMERA_VERSION_MAX
};

@@ -98,6 +99,7 @@ enum cam_cpas_camera_version_map_id {
	CAM_CPAS_CAMERA_VERSION_ID_540  = 0x6,
	CAM_CPAS_CAMERA_VERSION_ID_545  = 0x7,
	CAM_CPAS_CAMERA_VERSION_ID_570  = 0x8,
	CAM_CPAS_CAMERA_VERSION_ID_680  = 0x9,
	CAM_CPAS_CAMERA_VERSION_ID_MAX
};

@@ -135,6 +137,7 @@ enum cam_cpas_hw_version {
	CAM_CPAS_TITAN_520_V100 = 0x520100,
	CAM_CPAS_TITAN_545_V100 = 0x545100,
	CAM_CPAS_TITAN_570_V200 = 0x570200,
	CAM_CPAS_TITAN_680_V100 = 0x680100,
	CAM_CPAS_TITAN_MAX
};

@@ -146,6 +149,8 @@ enum cam_cpas_hw_version {
 *                              observed at any slave port is logged into
 *                              the error logger register and an IRQ is
 *                              triggered
 * @CAM_CAMNOC_IRQ_IFE_UBWC_ENCODE_ERROR      : Triggered if any error detected
 *                                              in the IFE UBWC encoder instance
 * @CAM_CAMNOC_IRQ_IFE_UBWC_STATS_ENCODE_ERROR: Triggered if any error detected
 *                                              in the IFE UBWC-Stats encoder
 *                                              instance
@@ -159,12 +164,21 @@ enum cam_cpas_hw_version {
 * @CAM_CAMNOC_IRQ_IFE1_WR_UBWC_ENCODE_ERROR  : Triggered if any error detected
 *                                            in the IFE1 UBWC encoder
 *                                            instance
 * @CAM_CAMNOC_IRQ_IPE_UBWC_ENCODE_ERROR    : Triggered if any error detected
 *                                            in the IPE write path encoder
 *                                            instance
 * @CAM_CAMNOC_IRQ_BPS_UBWC_ENCODE_ERROR    : Triggered if any error detected
 *                                            in the BPS write path encoder
 *                                            instance
 * @CAM_CAMNOC_IRQ_IPE1_BPS_UBWC_DECODE_ERROR: Triggered if any error detected
 *                                             in the IPE1/BPS read path decoder
 *                                             instance
 * @CAM_CAMNOC_IRQ_IPE0_UBWC_DECODE_ERROR    : Triggered if any error detected
 *                                             in the IPE0 read path decoder
 *                                             instance
 * @CAM_CAMNOC_IRQ_IPE1_UBWC_DECODE_ERROR    : Triggered if any error detected
 *                                             in the IPE1 read path decoder
 *                                             instance
 * @CAM_CAMNOC_IRQ_IPE_BPS_UBWC_DECODE_ERROR: Triggered if any error detected
 *                                            in the IPE/BPS UBWC decoder
 *                                            instance
@@ -176,14 +190,18 @@ enum cam_cpas_hw_version {
 */
enum cam_camnoc_irq_type {
	CAM_CAMNOC_IRQ_SLAVE_ERROR,
	CAM_CAMNOC_IRQ_IFE_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_IFE_UBWC_STATS_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_IFE_UBWC_STATS_1_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_IFE02_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_IFE13_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_IFE0_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_IFE1_WRITE_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_IPE_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_BPS_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_IPE1_BPS_UBWC_DECODE_ERROR,
	CAM_CAMNOC_IRQ_IPE0_UBWC_DECODE_ERROR,
	CAM_CAMNOC_IRQ_IPE1_UBWC_DECODE_ERROR,
	CAM_CAMNOC_IRQ_IPE_BPS_UBWC_DECODE_ERROR,
	CAM_CAMNOC_IRQ_IPE_BPS_UBWC_ENCODE_ERROR,
	CAM_CAMNOC_IRQ_AHB_TIMEOUT,