Lines Matching refs:edid
120 struct adv7511_state_edid edid;
582 struct adv7511_state_edid *edid = &state->edid;
611 edid->segments ? "found" : "no",
612 edid->blocks);
652 v4l2_info(sd, "i2c edid addr: 0x%x\n", state->i2c_edid_addr);
1200 static int adv7511_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
1204 memset(edid->reserved, 0, sizeof(edid->reserved));
1206 if (edid->pad != 0)
1209 if (edid->start_block == 0 && edid->blocks == 0) {
1210 edid->blocks = state->edid.segments * 2;
1214 if (state->edid.segments == 0)
1217 if (edid->start_block >= state->edid.segments * 2)
1220 if (edid->start_block + edid->blocks > state->edid.segments * 2)
1221 edid->blocks = state->edid.segments * 2 - edid->start_block;
1223 memcpy(edid->edid, &state->edid.data[edid->start_block * 128],
1224 128 * edid->blocks);
1458 v4l2_dbg(lvl, debug, sd, "edid segment %d\n", segment);
1505 if (state->edid.read_retries) {
1506 state->edid.read_retries--;
1507 v4l2_dbg(1, debug, sd, "%s: edid read failed\n", __func__);
1518 v4l2_dbg(1, debug, sd, "%s: no edid found\n", __func__);
1589 if ((status & MASK_ADV7511_HPD_DETECT) && ((status & MASK_ADV7511_MSEN_DETECT) || state->edid.segments)) {
1590 v4l2_dbg(1, debug, sd, "%s: hotplug and (rx-sense or edid)\n", __func__);
1601 state->edid.read_retries = EDID_MAX_RETRIES;
1606 state->edid.read_retries = EDID_MAX_RETRIES;
1616 memset(&state->edid, 0, sizeof(struct adv7511_state_edid));
1634 u32 blocks = state->edid.blocks;
1635 u8 *data = state->edid.data;
1650 u8 *data = state->edid.data;
1662 v4l2_dbg(1, debug, sd, "%s: edid ready (retries: %d)\n",
1663 __func__, EDID_MAX_RETRIES - state->edid.read_retries);
1665 if (state->edid.complete)
1673 v4l2_err(sd, "edid segment number too big\n");
1677 adv7511_edid_rd(sd, 256, &state->edid.data[segment * 256]);
1678 adv7511_dbg_dump_edid(2, debug, sd, segment, &state->edid.data[segment * 256]);
1680 state->edid.blocks = state->edid.data[0x7e] + 1;
1681 v4l2_dbg(1, debug, sd, "%s: %d blocks in total\n", __func__, state->edid.blocks);
1685 /* edid crc error, force reread of edid segment */
1686 v4l2_err(sd, "%s: edid crc or header error\n", __func__);
1693 state->edid.segments = segment + 1;
1695 if (((state->edid.data[0x7e] >> 1) + 1) > state->edid.segments) {
1697 v4l2_dbg(1, debug, sd, "%s: request segment %d\n", __func__, state->edid.segments);
1699 adv7511_wr(sd, 0xc4, state->edid.segments);
1700 state->edid.read_retries = EDID_MAX_RETRIES;
1705 v4l2_dbg(1, debug, sd, "%s: edid complete with %d segment(s)\n", __func__, state->edid.segments);
1706 state->edid.complete = true;
1707 ed.phys_addr = cec_get_edid_phys_addr(state->edid.data,
1708 state->edid.segments * 256,
1753 struct adv7511_state_edid *edid = &state->edid;
1768 memset(edid, 0, sizeof(struct adv7511_state_edid));
1878 v4l2_err(sd, "failed to register edid i2c client\n");