You don't need qcom proprietary mm-camera source code if you just want to read this, but if you actually want to patch something - you 100% need it.
mm-camera sets max exposure time via a loop that interates over all available resolutions. The loops looks like this (pseudocode): (file -> sensor.c)
uint64_t max;
for (i = 0; i < res_table.size; i++) {
uint64_t current_max = (uint64_t)(((float)res_table[i].line_length_pclk *
NANO_SEC_PER_SEC) / (float)(res_table[i].line_length_pclk * res_table[i].frame_length_lines * res_table[i].max_fps));
max = MIN(current_max, max);