Lines Matching refs:stdi
1325 struct stdi_readback *stdi, in stdi2dv_timings() argument
1329 u32 hfreq = (ADV76XX_FSC * 8) / stdi->bl; in stdi2dv_timings()
1334 if (vtotal(&adv76xx_timings[i].bt) != stdi->lcf + 1) in stdi2dv_timings()
1336 if (adv76xx_timings[i].bt.vsync != stdi->lcvs) in stdi2dv_timings()
1348 if (v4l2_detect_cvt(stdi->lcf + 1, hfreq, stdi->lcvs, 0, in stdi2dv_timings()
1349 (stdi->hs_pol == '+' ? V4L2_DV_HSYNC_POS_POL : 0) | in stdi2dv_timings()
1350 (stdi->vs_pol == '+' ? V4L2_DV_VSYNC_POS_POL : 0), in stdi2dv_timings()
1353 if (v4l2_detect_gtf(stdi->lcf + 1, hfreq, stdi->lcvs, in stdi2dv_timings()
1354 (stdi->hs_pol == '+' ? V4L2_DV_HSYNC_POS_POL : 0) | in stdi2dv_timings()
1355 (stdi->vs_pol == '+' ? V4L2_DV_VSYNC_POS_POL : 0), in stdi2dv_timings()
1361 __func__, stdi->lcvs, stdi->lcf, stdi->bl, in stdi2dv_timings()
1362 stdi->hs_pol, stdi->vs_pol); in stdi2dv_timings()
1367 static int read_stdi(struct v4l2_subdev *sd, struct stdi_readback *stdi) in read_stdi() argument
1379 stdi->bl = cp_read16(sd, 0xb1, 0x3fff); in read_stdi()
1380 stdi->lcf = cp_read16(sd, info->lcf_reg, 0x7ff); in read_stdi()
1381 stdi->lcvs = cp_read(sd, 0xb3) >> 3; in read_stdi()
1382 stdi->interlaced = io_read(sd, 0x12) & 0x10; in read_stdi()
1388 stdi->hs_pol = polarity & 0x10 in read_stdi()
1390 stdi->vs_pol = polarity & 0x40 in read_stdi()
1393 stdi->hs_pol = 'x'; in read_stdi()
1394 stdi->vs_pol = 'x'; in read_stdi()
1398 stdi->hs_pol = polarity & 0x20 ? '+' : '-'; in read_stdi()
1399 stdi->vs_pol = polarity & 0x10 ? '+' : '-'; in read_stdi()
1408 if (stdi->lcf < 239 || stdi->bl < 8 || stdi->bl == 0x3fff) { in read_stdi()
1410 memset(stdi, 0, sizeof(struct stdi_readback)); in read_stdi()
1416 __func__, stdi->lcf, stdi->bl, stdi->lcvs, in read_stdi()
1417 stdi->hs_pol, stdi->vs_pol, in read_stdi()
1418 stdi->interlaced ? "interlaced" : "progressive"); in read_stdi()
1527 struct stdi_readback stdi; in adv76xx_query_dv_timings() local
1541 if (read_stdi(sd, &stdi)) { in adv76xx_query_dv_timings()
1545 bt->interlaced = stdi.interlaced ? in adv76xx_query_dv_timings()
1580 if (!stdi2dv_timings(sd, &stdi, timings)) in adv76xx_query_dv_timings()
1582 stdi.lcvs += 1; in adv76xx_query_dv_timings()
1583 v4l2_dbg(1, debug, sd, "%s: lcvs + 1 = %d\n", __func__, stdi.lcvs); in adv76xx_query_dv_timings()
1584 if (!stdi2dv_timings(sd, &stdi, timings)) in adv76xx_query_dv_timings()
1586 stdi.lcvs -= 2; in adv76xx_query_dv_timings()
1587 v4l2_dbg(1, debug, sd, "%s: lcvs - 1 = %d\n", __func__, stdi.lcvs); in adv76xx_query_dv_timings()
1588 if (stdi2dv_timings(sd, &stdi, timings)) { in adv76xx_query_dv_timings()
2221 struct stdi_readback stdi; in adv76xx_log_status() local
2292 if (read_stdi(sd, &stdi)) in adv76xx_log_status()
2296 stdi.lcf, stdi.bl, stdi.lcvs, in adv76xx_log_status()
2297 stdi.interlaced ? "interlaced" : "progressive", in adv76xx_log_status()
2298 stdi.hs_pol, stdi.vs_pol); in adv76xx_log_status()