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

Commit f4252e38 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: isp: Change timestamp from QTimer to nanosecond" into dev/msm-4.9-camx

parents 7fdfbed3 3ba2a4fa
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -32,6 +32,15 @@
#define CAM_IFE_CSID_TIMEOUT_SLEEP_US                  1000
#define CAM_IFE_CSID_TIMEOUT_ALL_US                    1000000

/*
 * Constant Factors needed to change QTimer ticks to nanoseconds
 * QTimer Freq = 19.2 MHz
 * Time(us) = ticks/19.2
 * Time(ns) = ticks/19.2 * 1000
 */
#define CAM_IFE_CSID_QTIMER_MUL_FACTOR                 10000
#define CAM_IFE_CSID_QTIMER_DIV_FACTOR                 192

static int cam_ife_csid_is_ipp_format_supported(
	uint32_t in_format)
{
@@ -1972,6 +1981,11 @@ static int cam_ife_csid_get_time_stamp(
		time_stamp->time_stamp_val |= time_32;
	}

	time_stamp->time_stamp_val = mul_u64_u32_div(
		time_stamp->time_stamp_val,
		CAM_IFE_CSID_QTIMER_MUL_FACTOR,
		CAM_IFE_CSID_QTIMER_DIV_FACTOR);

	return 0;
}