Lines Matching refs:stdi
1362 struct stdi_readback *stdi, in stdi2dv_timings() argument
1366 u32 hfreq = (ADV76XX_FSC * 8) / stdi->bl; in stdi2dv_timings()
1377 if (vtotal(bt) != stdi->lcf + 1) in stdi2dv_timings()
1379 if (bt->vsync != stdi->lcvs) in stdi2dv_timings()
1391 if (v4l2_detect_cvt(stdi->lcf + 1, hfreq, stdi->lcvs, 0, in stdi2dv_timings()
1392 (stdi->hs_pol == '+' ? V4L2_DV_HSYNC_POS_POL : 0) | in stdi2dv_timings()
1393 (stdi->vs_pol == '+' ? V4L2_DV_VSYNC_POS_POL : 0), in stdi2dv_timings()
1396 if (v4l2_detect_gtf(stdi->lcf + 1, hfreq, stdi->lcvs, in stdi2dv_timings()
1397 (stdi->hs_pol == '+' ? V4L2_DV_HSYNC_POS_POL : 0) | in stdi2dv_timings()
1398 (stdi->vs_pol == '+' ? V4L2_DV_VSYNC_POS_POL : 0), in stdi2dv_timings()
1404 __func__, stdi->lcvs, stdi->lcf, stdi->bl, in stdi2dv_timings()
1405 stdi->hs_pol, stdi->vs_pol); in stdi2dv_timings()
1410 static int read_stdi(struct v4l2_subdev *sd, struct stdi_readback *stdi) in read_stdi() argument
1422 stdi->bl = cp_read16(sd, 0xb1, 0x3fff); in read_stdi()
1423 stdi->lcf = cp_read16(sd, info->lcf_reg, 0x7ff); in read_stdi()
1424 stdi->lcvs = cp_read(sd, 0xb3) >> 3; in read_stdi()
1425 stdi->interlaced = io_read(sd, 0x12) & 0x10; in read_stdi()
1431 stdi->hs_pol = polarity & 0x10 in read_stdi()
1433 stdi->vs_pol = polarity & 0x40 in read_stdi()
1436 stdi->hs_pol = 'x'; in read_stdi()
1437 stdi->vs_pol = 'x'; in read_stdi()
1441 stdi->hs_pol = polarity & 0x20 ? '+' : '-'; in read_stdi()
1442 stdi->vs_pol = polarity & 0x10 ? '+' : '-'; in read_stdi()
1451 if (stdi->lcf < 239 || stdi->bl < 8 || stdi->bl == 0x3fff) { in read_stdi()
1453 memset(stdi, 0, sizeof(struct stdi_readback)); in read_stdi()
1459 __func__, stdi->lcf, stdi->bl, stdi->lcvs, in read_stdi()
1460 stdi->hs_pol, stdi->vs_pol, in read_stdi()
1461 stdi->interlaced ? "interlaced" : "progressive"); in read_stdi()
1552 struct stdi_readback stdi; in adv76xx_query_dv_timings() local
1566 if (read_stdi(sd, &stdi)) { in adv76xx_query_dv_timings()
1570 bt->interlaced = stdi.interlaced ? in adv76xx_query_dv_timings()
1619 if (!stdi2dv_timings(sd, &stdi, timings)) in adv76xx_query_dv_timings()
1621 stdi.lcvs += 1; in adv76xx_query_dv_timings()
1622 v4l2_dbg(1, debug, sd, "%s: lcvs + 1 = %d\n", __func__, stdi.lcvs); in adv76xx_query_dv_timings()
1623 if (!stdi2dv_timings(sd, &stdi, timings)) in adv76xx_query_dv_timings()
1625 stdi.lcvs -= 2; in adv76xx_query_dv_timings()
1626 v4l2_dbg(1, debug, sd, "%s: lcvs - 1 = %d\n", __func__, stdi.lcvs); in adv76xx_query_dv_timings()
1627 if (stdi2dv_timings(sd, &stdi, timings)) { in adv76xx_query_dv_timings()
2489 struct stdi_readback stdi; in adv76xx_log_status() local
2571 if (read_stdi(sd, &stdi)) in adv76xx_log_status()
2575 stdi.lcf, stdi.bl, stdi.lcvs, in adv76xx_log_status()
2576 stdi.interlaced ? "interlaced" : "progressive", in adv76xx_log_status()
2577 stdi.hs_pol, stdi.vs_pol); in adv76xx_log_status()