Home
last modified time | relevance | path

Searched refs:link_freq (Results 1 – 25 of 68) sorted by relevance

123

/linux/drivers/media/platform/qcom/camss/
H A Dcamss-csiphy-2ph-1-0.c73 static u8 csiphy_settle_cnt_calc(s64 link_freq, u32 timer_clk_rate) in csiphy_settle_cnt_calc() argument
82 if (link_freq <= 0) in csiphy_settle_cnt_calc()
85 ui = div_u64(1000000000000LL, link_freq); in csiphy_settle_cnt_calc()
99 s64 link_freq, u8 lane_mask) in csiphy_lanes_enable() argument
106 settle_cnt = csiphy_settle_cnt_calc(link_freq, csiphy->timer_clk_rate); in csiphy_lanes_enable()
H A Dcamss-csiphy.c140 s64 link_freq; in csiphy_set_clock_rates() local
148 link_freq = camss_get_link_freq(&csiphy->subdev.entity, bpp, num_lanes); in csiphy_set_clock_rates()
149 if (link_freq < 0) in csiphy_set_clock_rates()
150 link_freq = 0; in csiphy_set_clock_rates()
156 u64 min_rate = link_freq / 4; in csiphy_set_clock_rates()
255 s64 link_freq; in csiphy_stream_on() local
262 link_freq = camss_get_link_freq(&csiphy->subdev.entity, bpp, num_lanes); in csiphy_stream_on()
264 if (link_freq < 0) { in csiphy_stream_on()
285 csiphy->res->hw_ops->lanes_enable(csiphy, cfg, link_freq, lane_mask); in csiphy_stream_on()
H A Dcamss-csiphy-3ph-1-0.c416 static u8 csiphy_settle_cnt_calc(s64 link_freq, u32 timer_clk_rate) in csiphy_settle_cnt_calc() argument
424 if (link_freq <= 0) in csiphy_settle_cnt_calc()
427 ui = div_u64(1000000000000LL, link_freq); in csiphy_settle_cnt_calc()
572 s64 link_freq, u8 lane_mask) in csiphy_lanes_enable() argument
579 settle_cnt = csiphy_settle_cnt_calc(link_freq, csiphy->timer_clk_rate); in csiphy_lanes_enable()
/linux/drivers/media/i2c/
H A Dov5645.c82 u32 link_freq; member
101 struct v4l2_ctrl *link_freq; member
508 static const s64 link_freq[] = { variable
520 .link_freq = 0 /* an index in link_freq[] */
528 .link_freq = 1 /* an index in link_freq[] */
536 .link_freq = 1 /* an index in link_freq[] */
928 ret = v4l2_ctrl_s_ctrl(ov5645->link_freq, in ov5645_set_format()
929 new_mode->link_freq); in ov5645_set_format()
1165 ARRAY_SIZE(link_freq) - 1, in ov5645_probe()
1166 0, link_freq); in ov5645_probe()
[all …]
H A Dov13858.c1036 struct v4l2_ctrl *link_freq; member
1356 s64 link_freq; in ov13858_set_pad_format() local
1374 __v4l2_ctrl_s_ctrl(ov13858->link_freq, mode->link_freq_index); in ov13858_set_pad_format()
1375 link_freq = link_freq_menu_items[mode->link_freq_index]; in ov13858_set_pad_format()
1376 pixel_rate = link_freq_to_pixel_rate(link_freq); in ov13858_set_pad_format()
1574 ov13858->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, in ov13858_init_controls()
1580 if (ov13858->link_freq) in ov13858_init_controls()
1581 ov13858->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in ov13858_init_controls()
H A Dimx214.c67 struct v4l2_ctrl *link_freq; member
725 static const s64 link_freq[] = { in imx214_ctrls_init() local
750 imx214->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, NULL, in imx214_ctrls_init()
752 ARRAY_SIZE(link_freq) - 1, in imx214_ctrls_init()
753 0, link_freq); in imx214_ctrls_init()
754 if (imx214->link_freq) in imx214_ctrls_init()
755 imx214->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in imx214_ctrls_init()
H A Dimx208.c276 struct v4l2_ctrl *link_freq; member
583 s64 link_freq; in imx208_set_pad_format() local
596 __v4l2_ctrl_s_ctrl(imx208->link_freq, mode->link_freq_index); in imx208_set_pad_format()
597 link_freq = link_freq_menu_items[mode->link_freq_index]; in imx208_set_pad_format()
598 pixel_rate = link_freq_to_pixel_rate(link_freq); in imx208_set_pad_format()
853 imx208->link_freq = in imx208_init_controls()
860 if (imx208->link_freq) in imx208_init_controls()
861 imx208->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in imx208_init_controls()
H A Dov7251.c82 u32 link_freq; member
146 struct v4l2_ctrl *link_freq; member
632 static const s64 link_freq[] = { variable
1504 for (j = 0; j < ARRAY_SIZE(link_freq); j++) in ov7251_check_hwcfg()
1505 if (bus_cfg.link_frequencies[i] == link_freq[j]) in ov7251_check_hwcfg()
1508 if (j < ARRAY_SIZE(link_freq)) in ov7251_check_hwcfg()
1587 ov7251->link_freq = v4l2_ctrl_new_int_menu(&ov7251->ctrls, in ov7251_init_ctrls()
1590 ARRAY_SIZE(link_freq) - 1, in ov7251_init_ctrls()
1592 link_freq); in ov7251_init_ctrls()
1593 if (ov7251->link_freq) in ov7251_init_ctrls()
[all …]
H A Dov08x40.c1288 struct v4l2_ctrl *link_freq; member
1730 s64 link_freq; in ov08x40_set_pad_format() local
1749 __v4l2_ctrl_s_ctrl(ov08x->link_freq, mode->link_freq_index); in ov08x40_set_pad_format()
1750 link_freq = link_freq_menu_items[mode->link_freq_index]; in ov08x40_set_pad_format()
1751 pixel_rate = link_freq_to_pixel_rate(link_freq); in ov08x40_set_pad_format()
1959 ov08x->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, in ov08x40_init_controls()
1965 if (ov08x->link_freq) in ov08x40_init_controls()
1966 ov08x->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in ov08x40_init_controls()
H A Dhi846.c1164 struct v4l2_ctrl *link_freq; member
1209 u64 link_freq = hi846_get_link_freq(hi846); in hi846_calc_pixel_rate() local
1210 u64 pixel_rate = link_freq * 2 * hi846->nr_lanes; in hi846_calc_pixel_rate()
1427 hi846->link_freq = in hi846_init_controls()
1432 if (hi846->link_freq) in hi846_init_controls()
1433 hi846->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in hi846_init_controls()
1504 u64 link_freq = hi846_get_link_freq(hi846); in hi846_set_video_mode() local
1509 do_div(link_freq, fps); in hi846_set_video_mode()
1510 frame_length = link_freq; in hi846_set_video_mode()
1750 __v4l2_ctrl_s_ctrl(hi846->link_freq, hi846_get_link_freq_index(hi846)); in hi846_set_format()
H A Dov13b10.c641 struct v4l2_ctrl *link_freq; member
1041 s64 link_freq; in ov13b10_set_pad_format() local
1059 __v4l2_ctrl_s_ctrl(ov13b->link_freq, mode->link_freq_index); in ov13b10_set_pad_format()
1060 link_freq = link_freq_menu_items[mode->link_freq_index]; in ov13b10_set_pad_format()
1061 pixel_rate = link_freq_to_pixel_rate(link_freq); in ov13b10_set_pad_format()
1305 ov13b->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, in ov13b10_init_controls()
1311 if (ov13b->link_freq) in ov13b10_init_controls()
1312 ov13b->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in ov13b10_init_controls()
H A Dov5670.c1863 struct v4l2_ctrl *link_freq; member
2119 ov5670->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, in ov5670_init_controls()
2123 if (ov5670->link_freq) in ov5670_init_controls()
2124 ov5670->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in ov5670_init_controls()
2299 s64 link_freq; in ov5670_set_pad_format() local
2315 __v4l2_ctrl_s_ctrl(ov5670->link_freq, mode->link_freq_index); in ov5670_set_pad_format()
2318 link_freq = link_freq_menu_items[mode->link_freq_index]; in ov5670_set_pad_format()
2320 mipi_pixel_rate = div_s64(link_freq * 2 * lanes_count, 10); in ov5670_set_pad_format()
H A Dov2680.c130 struct v4l2_ctrl *link_freq; member
158 s64 link_freq[1]; member
993 ctrls->link_freq = v4l2_ctrl_new_int_menu(hdl, NULL, V4L2_CID_LINK_FREQ, in ov2680_v4l2_register()
994 0, 0, sensor->link_freq); in ov2680_v4l2_register()
1021 ctrls->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in ov2680_v4l2_register()
1164 sensor->link_freq[0] = sensor->xvclk_freq / OV2680_PLL_PREDIV0 / in ov2680_parse_dt()
1168 sensor->pixel_rate = sensor->link_freq[0] * 2; in ov2680_parse_dt()
1177 if (bus_cfg.link_frequencies[i] == sensor->link_freq[0]) in ov2680_parse_dt()
1183 sensor->link_freq[0]); in ov2680_parse_dt()
H A Dthp7312.c175 u32 link_freq; member
269 s64 link_freq; member
764 thp7312->link_freq = mode->rates[0].link_freq; in thp7312_set_fmt()
794 thp7312->link_freq = rate->link_freq; in thp7312_set_frame_interval()
1228 struct v4l2_ctrl *link_freq; in thp7312_init_controls() local
1322 thp7312->link_freq = thp7312_mode_info_data[0].rates[0].link_freq; in thp7312_init_controls()
1324 link_freq = v4l2_ctrl_new_int_menu(hdl, &thp7312_ctrl_ops, in thp7312_init_controls()
1326 &thp7312->link_freq); in thp7312_init_controls()
1362 link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in thp7312_init_controls()
H A Dov01a10.c283 struct v4l2_ctrl *link_freq; member
539 ov01a10->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, in ov01a10_init_controls()
544 if (ov01a10->link_freq) in ov01a10_init_controls()
545 ov01a10->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in ov01a10_init_controls()
712 __v4l2_ctrl_s_ctrl(ov01a10->link_freq, mode->link_freq_index); in ov01a10_set_format()
H A Dov9734.c329 struct v4l2_ctrl *link_freq; member
553 ov9734->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, &ov9734_ctrl_ops, in ov9734_init_controls()
557 if (ov9734->link_freq) in ov9734_init_controls()
558 ov9734->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in ov9734_init_controls()
703 __v4l2_ctrl_s_ctrl(ov9734->link_freq, mode->link_freq_index); in ov9734_set_format()
H A Dimx258.c656 struct v4l2_ctrl *link_freq; member
914 s64 link_freq; in imx258_set_pad_format() local
929 __v4l2_ctrl_s_ctrl(imx258->link_freq, mode->link_freq_index); in imx258_set_pad_format()
931 link_freq = imx258->link_freq_menu_items[mode->link_freq_index]; in imx258_set_pad_format()
936 pixel_rate = link_freq_to_pixel_rate(link_freq, link_cfg); in imx258_set_pad_format()
1237 imx258->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, in imx258_init_controls()
1244 if (imx258->link_freq) in imx258_init_controls()
1245 imx258->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in imx258_init_controls()
H A Dov5640.c410 struct v4l2_ctrl *link_freq; member
1458 unsigned long link_freq; in ov5640_set_mipi_pclk() local
1466 link_freq = sensor->current_link_freq; in ov5640_set_mipi_pclk()
1474 if (link_freq > OV5640_LINK_RATE_MAX) in ov5640_set_mipi_pclk()
1479 sysclk = link_freq * mipi_div; in ov5640_set_mipi_pclk()
2872 s64 link_freq; in ov5640_update_pixel_rate() local
2903 } while (link_freq >= 1000000000U && in ov5640_update_pixel_rate()
2906 sensor->current_link_freq = link_freq; in ov5640_update_pixel_rate()
2916 if (link_freq > OV5640_LINK_RATE_MAX) { in ov5640_update_pixel_rate()
2918 link_freq /= 2; in ov5640_update_pixel_rate()
[all …]
H A Dst-mipid02.c319 s64 link_freq; in mipid02_configure_from_rx_speed() local
321 link_freq = v4l2_get_link_freq(subdev->ctrl_handler, bpp, in mipid02_configure_from_rx_speed()
323 if (link_freq < 0) { in mipid02_configure_from_rx_speed()
328 dev_dbg(&client->dev, "detect link_freq = %lld Hz", link_freq); in mipid02_configure_from_rx_speed()
329 ui_4 = div64_u64(ui_4, link_freq); in mipid02_configure_from_rx_speed()
/linux/drivers/media/pci/intel/ipu6/
H A Dipu6-isys-csi2.c163 static u32 calc_timing(s32 a, s32 b, s64 link_freq, s32 accinv) in calc_timing() argument
166 / (s32)(link_freq >> DIV_SHIFT)); in calc_timing()
174 s64 link_freq; in ipu6_isys_csi2_calc_timing() local
176 link_freq = ipu6_isys_csi2_get_link_freq(csi2); in ipu6_isys_csi2_calc_timing()
177 if (link_freq < 0) in ipu6_isys_csi2_calc_timing()
178 return link_freq; in ipu6_isys_csi2_calc_timing()
182 link_freq, accinv); in ipu6_isys_csi2_calc_timing()
185 link_freq, accinv); in ipu6_isys_csi2_calc_timing()
188 link_freq, accinv); in ipu6_isys_csi2_calc_timing()
191 link_freq, accinv); in ipu6_isys_csi2_calc_timing()
H A Dipu6-isys-dwc-phy.c456 s64 link_freq; in ipu6_isys_dwc_phy_set_power() local
474 link_freq = ipu6_isys_csi2_get_link_freq(&isys->csi2[port]); in ipu6_isys_dwc_phy_set_power()
475 if (link_freq < 0) { in ipu6_isys_dwc_phy_set_power()
476 dev_err(dev, "get link freq failed(%lld).\n", link_freq); in ipu6_isys_dwc_phy_set_power()
477 return link_freq; in ipu6_isys_dwc_phy_set_power()
480 mbps = div_u64(link_freq, 500000); in ipu6_isys_dwc_phy_set_power()
/linux/drivers/media/platform/ti/cal/
H A Dcal-camerarx.c133 static void cal_camerarx_config(struct cal_camerarx *phy, s64 link_freq) in cal_camerarx_config() argument
141 ths_term = div_s64(20 * link_freq, 1000 * 1000 * 1000); in cal_camerarx_config()
145 ths_settle = div_s64(105 * link_freq, 1000 * 1000 * 1000) + 4; in cal_camerarx_config()
289 s64 link_freq; in cal_camerarx_start() local
299 link_freq = cal_camerarx_get_ext_link_freq(phy); in cal_camerarx_start()
300 if (link_freq < 0) in cal_camerarx_start()
301 return link_freq; in cal_camerarx_start()
349 cal_camerarx_config(phy, link_freq); in cal_camerarx_start()
/linux/drivers/media/platform/nxp/
H A Dimx8mq-mipi-csi2.c290 s64 link_freq; in imx8mq_mipi_csi_calc_hs_settle() local
302 link_freq = v4l2_get_link_freq(state->src_sd->ctrl_handler, in imx8mq_mipi_csi_calc_hs_settle()
305 if (link_freq < 0) { in imx8mq_mipi_csi_calc_hs_settle()
307 (int)link_freq); in imx8mq_mipi_csi_calc_hs_settle()
308 return link_freq; in imx8mq_mipi_csi_calc_hs_settle()
311 lane_rate = link_freq * 2; in imx8mq_mipi_csi_calc_hs_settle()
/linux/drivers/media/pci/intel/ivsc/
H A Dmei_csi.c88 u32 link_freq; member
140 u64 link_freq; member
237 cmd.param.conf.link_freq = CSI_LINK_FREQ(csi->link_freq); in csi_set_link_cfg()
300 csi->link_freq = freq; in mei_csi_set_stream()
/linux/drivers/media/platform/cadence/
H A Dcdns-csi2rx.c174 s64 link_freq; in csi2rx_configure_ext_dphy() local
184 link_freq = v4l2_get_link_freq(csi2rx->source_subdev->ctrl_handler, in csi2rx_configure_ext_dphy()
186 if (link_freq < 0) in csi2rx_configure_ext_dphy()
187 return link_freq; in csi2rx_configure_ext_dphy()
189 ret = phy_mipi_dphy_get_default_config_for_hsclk(link_freq, in csi2rx_configure_ext_dphy()

123