Lines Matching refs:ctrls
57 struct isc_ctrls *ctrls = &isc->ctrls; in isc_update_v4l2_ctrls() local
60 v4l2_ctrl_s_ctrl(isc->r_gain_ctrl, ctrls->gain[ISC_HIS_CFG_MODE_R]); in isc_update_v4l2_ctrls()
61 v4l2_ctrl_s_ctrl(isc->b_gain_ctrl, ctrls->gain[ISC_HIS_CFG_MODE_B]); in isc_update_v4l2_ctrls()
62 v4l2_ctrl_s_ctrl(isc->gr_gain_ctrl, ctrls->gain[ISC_HIS_CFG_MODE_GR]); in isc_update_v4l2_ctrls()
63 v4l2_ctrl_s_ctrl(isc->gb_gain_ctrl, ctrls->gain[ISC_HIS_CFG_MODE_GB]); in isc_update_v4l2_ctrls()
65 v4l2_ctrl_s_ctrl(isc->r_off_ctrl, ctrls->offset[ISC_HIS_CFG_MODE_R]); in isc_update_v4l2_ctrls()
66 v4l2_ctrl_s_ctrl(isc->b_off_ctrl, ctrls->offset[ISC_HIS_CFG_MODE_B]); in isc_update_v4l2_ctrls()
67 v4l2_ctrl_s_ctrl(isc->gr_off_ctrl, ctrls->offset[ISC_HIS_CFG_MODE_GR]); in isc_update_v4l2_ctrls()
68 v4l2_ctrl_s_ctrl(isc->gb_off_ctrl, ctrls->offset[ISC_HIS_CFG_MODE_GB]); in isc_update_v4l2_ctrls()
73 struct isc_ctrls *ctrls = &isc->ctrls; in isc_update_awb_ctrls() local
78 ((ctrls->offset[ISC_HIS_CFG_MODE_R])) | in isc_update_awb_ctrls()
79 ((ctrls->offset[ISC_HIS_CFG_MODE_GR]) << 16)); in isc_update_awb_ctrls()
81 ((ctrls->offset[ISC_HIS_CFG_MODE_B])) | in isc_update_awb_ctrls()
82 ((ctrls->offset[ISC_HIS_CFG_MODE_GB]) << 16)); in isc_update_awb_ctrls()
84 ctrls->gain[ISC_HIS_CFG_MODE_R] | in isc_update_awb_ctrls()
85 (ctrls->gain[ISC_HIS_CFG_MODE_GR] << 16)); in isc_update_awb_ctrls()
87 ctrls->gain[ISC_HIS_CFG_MODE_B] | in isc_update_awb_ctrls()
88 (ctrls->gain[ISC_HIS_CFG_MODE_GB] << 16)); in isc_update_awb_ctrls()
97 isc->ctrls.gain[c] = 1 << 9; in isc_reset_awb_ctrls()
99 isc->ctrls.offset[c] = 0; in isc_reset_awb_ctrls()
503 struct isc_ctrls *ctrls = &isc->ctrls; in isc_set_pipeline() local
525 gamma = &isc->gamma_table[ctrls->gamma_index][0]; in isc_set_pipeline()
562 struct isc_ctrls *ctrls = &isc->ctrls; in isc_set_histogram() local
573 ctrls->hist_id = ISC_HIS_CFG_MODE_GR; in isc_set_histogram()
577 ctrls->hist_stat = HIST_ENABLED; in isc_set_histogram()
583 ctrls->hist_stat = HIST_DISABLED; in isc_set_histogram()
617 if (isc->ctrls.awb && in isc_configure()
1295 isc->ctrls.hist_stat = HIST_INIT; in isc_set_fmt()
1585 struct isc_ctrls *ctrls = &isc->ctrls; in isc_hist_count() local
1586 u32 *hist_count = &ctrls->hist_count[ctrls->hist_id]; in isc_hist_count()
1587 u32 *hist_entry = &ctrls->hist_entry[0]; in isc_hist_count()
1613 static void isc_wb_update(struct isc_ctrls *ctrls) in isc_wb_update() argument
1615 u32 *hist_count = &ctrls->hist_count[0]; in isc_wb_update()
1641 offset[c] = ctrls->hist_minmax[c][HIST_MIN_INDEX]; in isc_wb_update()
1651 ctrls->offset[c] = (offset[c] - 1) << 3; in isc_wb_update()
1658 ctrls->offset[c] = -ctrls->offset[c]; in isc_wb_update()
1669 (ctrls->hist_minmax[c][HIST_MAX_INDEX] - in isc_wb_update()
1670 ctrls->hist_minmax[c][HIST_MIN_INDEX] + 1); in isc_wb_update()
1684 ctrls->gain[c] = s_gain[c] * gw_gain[c]; in isc_wb_update()
1685 ctrls->gain[c] >>= 9; in isc_wb_update()
1694 struct isc_ctrls *ctrls = &isc->ctrls; in isc_awb_work() local
1695 u32 hist_id = ctrls->hist_id; in isc_awb_work()
1705 if (ctrls->hist_stat != HIST_ENABLED) in isc_awb_work()
1709 ctrls->hist_minmax[hist_id][HIST_MIN_INDEX] = min; in isc_awb_work()
1710 ctrls->hist_minmax[hist_id][HIST_MAX_INDEX] = max; in isc_awb_work()
1715 isc_wb_update(ctrls); in isc_awb_work()
1719 ctrls->hist_id = hist_id; in isc_awb_work()
1730 if (hist_id == ISC_HIS_CFG_MODE_GR || ctrls->awb == ISC_WB_NONE) { in isc_awb_work()
1745 if (ctrls->awb == ISC_WB_ONETIME) { in isc_awb_work()
1750 ctrls->awb = ISC_WB_NONE; in isc_awb_work()
1757 if (ctrls->awb) in isc_awb_work()
1766 struct isc_device, ctrls.handler); in isc_s_ctrl()
1767 struct isc_ctrls *ctrls = &isc->ctrls; in isc_s_ctrl() local
1774 ctrls->brightness = ctrl->val & ISC_CBC_BRIGHT_MASK; in isc_s_ctrl()
1777 ctrls->contrast = ctrl->val & ISC_CBC_CONTRAST_MASK; in isc_s_ctrl()
1780 ctrls->gamma_index = ctrl->val; in isc_s_ctrl()
1796 struct isc_device, ctrls.handler); in isc_s_awb_ctrl()
1797 struct isc_ctrls *ctrls = &isc->ctrls; in isc_s_awb_ctrl() local
1805 ctrls->awb = ISC_WB_AUTO; in isc_s_awb_ctrl()
1807 ctrls->awb = ISC_WB_NONE; in isc_s_awb_ctrl()
1815 ctrls->gain[ISC_HIS_CFG_MODE_R] = isc->r_gain_ctrl->val; in isc_s_awb_ctrl()
1817 ctrls->gain[ISC_HIS_CFG_MODE_B] = isc->b_gain_ctrl->val; in isc_s_awb_ctrl()
1819 ctrls->gain[ISC_HIS_CFG_MODE_GR] = isc->gr_gain_ctrl->val; in isc_s_awb_ctrl()
1821 ctrls->gain[ISC_HIS_CFG_MODE_GB] = isc->gb_gain_ctrl->val; in isc_s_awb_ctrl()
1824 ctrls->offset[ISC_HIS_CFG_MODE_R] = isc->r_off_ctrl->val; in isc_s_awb_ctrl()
1826 ctrls->offset[ISC_HIS_CFG_MODE_B] = isc->b_off_ctrl->val; in isc_s_awb_ctrl()
1828 ctrls->offset[ISC_HIS_CFG_MODE_GR] = isc->gr_off_ctrl->val; in isc_s_awb_ctrl()
1830 ctrls->offset[ISC_HIS_CFG_MODE_GB] = isc->gb_off_ctrl->val; in isc_s_awb_ctrl()
1850 if (ctrls->awb == ISC_WB_AUTO && in isc_s_awb_ctrl()
1859 if (ctrls->awb == ISC_WB_NONE && in isc_s_awb_ctrl()
1863 ctrls->awb = ISC_WB_ONETIME; in isc_s_awb_ctrl()
1876 struct isc_device, ctrls.handler); in isc_g_volatile_awb_ctrl()
1877 struct isc_ctrls *ctrls = &isc->ctrls; in isc_g_volatile_awb_ctrl() local
1883 ctrls->gain[ISC_HIS_CFG_MODE_R]; in isc_g_volatile_awb_ctrl()
1885 ctrls->gain[ISC_HIS_CFG_MODE_B]; in isc_g_volatile_awb_ctrl()
1887 ctrls->gain[ISC_HIS_CFG_MODE_GR]; in isc_g_volatile_awb_ctrl()
1889 ctrls->gain[ISC_HIS_CFG_MODE_GB]; in isc_g_volatile_awb_ctrl()
1892 ctrls->offset[ISC_HIS_CFG_MODE_R]; in isc_g_volatile_awb_ctrl()
1894 ctrls->offset[ISC_HIS_CFG_MODE_B]; in isc_g_volatile_awb_ctrl()
1896 ctrls->offset[ISC_HIS_CFG_MODE_GR]; in isc_g_volatile_awb_ctrl()
1898 ctrls->offset[ISC_HIS_CFG_MODE_GB]; in isc_g_volatile_awb_ctrl()
1948 struct isc_ctrls *ctrls = &isc->ctrls; in isc_ctrl_init() local
1949 struct v4l2_ctrl_handler *hdl = &ctrls->handler; in isc_ctrl_init()
1952 ctrls->hist_stat = HIST_INIT; in isc_ctrl_init()
1962 ctrls->brightness = 0; in isc_ctrl_init()
2031 v4l2_ctrl_handler_free(&isc->ctrls.handler); in isc_async_unbind()
2192 vdev->ctrl_handler = &isc->ctrls.handler; in isc_async_complete()