Lines Matching refs:stdi
1281 struct stdi_readback *stdi, in stdi2dv_timings() argument
1285 u32 hfreq = (ADV76XX_FSC * 8) / stdi->bl; in stdi2dv_timings()
1290 if (vtotal(&adv76xx_timings[i].bt) != stdi->lcf + 1) in stdi2dv_timings()
1292 if (adv76xx_timings[i].bt.vsync != stdi->lcvs) in stdi2dv_timings()
1304 if (v4l2_detect_cvt(stdi->lcf + 1, hfreq, stdi->lcvs, in stdi2dv_timings()
1305 (stdi->hs_pol == '+' ? V4L2_DV_HSYNC_POS_POL : 0) | in stdi2dv_timings()
1306 (stdi->vs_pol == '+' ? V4L2_DV_VSYNC_POS_POL : 0), in stdi2dv_timings()
1309 if (v4l2_detect_gtf(stdi->lcf + 1, hfreq, stdi->lcvs, in stdi2dv_timings()
1310 (stdi->hs_pol == '+' ? V4L2_DV_HSYNC_POS_POL : 0) | in stdi2dv_timings()
1311 (stdi->vs_pol == '+' ? V4L2_DV_VSYNC_POS_POL : 0), in stdi2dv_timings()
1317 __func__, stdi->lcvs, stdi->lcf, stdi->bl, in stdi2dv_timings()
1318 stdi->hs_pol, stdi->vs_pol); in stdi2dv_timings()
1323 static int read_stdi(struct v4l2_subdev *sd, struct stdi_readback *stdi) in read_stdi() argument
1335 stdi->bl = cp_read16(sd, 0xb1, 0x3fff); in read_stdi()
1336 stdi->lcf = cp_read16(sd, info->lcf_reg, 0x7ff); in read_stdi()
1337 stdi->lcvs = cp_read(sd, 0xb3) >> 3; in read_stdi()
1338 stdi->interlaced = io_read(sd, 0x12) & 0x10; in read_stdi()
1344 stdi->hs_pol = polarity & 0x10 in read_stdi()
1346 stdi->vs_pol = polarity & 0x40 in read_stdi()
1349 stdi->hs_pol = 'x'; in read_stdi()
1350 stdi->vs_pol = 'x'; in read_stdi()
1354 stdi->hs_pol = polarity & 0x20 ? '+' : '-'; in read_stdi()
1355 stdi->vs_pol = polarity & 0x10 ? '+' : '-'; in read_stdi()
1364 if (stdi->lcf < 239 || stdi->bl < 8 || stdi->bl == 0x3fff) { in read_stdi()
1366 memset(stdi, 0, sizeof(struct stdi_readback)); in read_stdi()
1372 __func__, stdi->lcf, stdi->bl, stdi->lcvs, in read_stdi()
1373 stdi->hs_pol, stdi->vs_pol, in read_stdi()
1374 stdi->interlaced ? "interlaced" : "progressive"); in read_stdi()
1483 struct stdi_readback stdi; in adv76xx_query_dv_timings() local
1497 if (read_stdi(sd, &stdi)) { in adv76xx_query_dv_timings()
1501 bt->interlaced = stdi.interlaced ? in adv76xx_query_dv_timings()
1531 if (!stdi2dv_timings(sd, &stdi, timings)) in adv76xx_query_dv_timings()
1533 stdi.lcvs += 1; in adv76xx_query_dv_timings()
1534 v4l2_dbg(1, debug, sd, "%s: lcvs + 1 = %d\n", __func__, stdi.lcvs); in adv76xx_query_dv_timings()
1535 if (!stdi2dv_timings(sd, &stdi, timings)) in adv76xx_query_dv_timings()
1537 stdi.lcvs -= 2; in adv76xx_query_dv_timings()
1538 v4l2_dbg(1, debug, sd, "%s: lcvs - 1 = %d\n", __func__, stdi.lcvs); in adv76xx_query_dv_timings()
1539 if (stdi2dv_timings(sd, &stdi, timings)) { in adv76xx_query_dv_timings()
2151 struct stdi_readback stdi; in adv76xx_log_status() local
2214 if (read_stdi(sd, &stdi)) in adv76xx_log_status()
2218 stdi.lcf, stdi.bl, stdi.lcvs, in adv76xx_log_status()
2219 stdi.interlaced ? "interlaced" : "progressive", in adv76xx_log_status()
2220 stdi.hs_pol, stdi.vs_pol); in adv76xx_log_status()