Lines Matching refs:edid

119 	struct adv7511_state_edid edid;
548 struct adv7511_state_edid *edid = &state->edid;
577 edid->segments ? "found" : "no",
578 edid->blocks);
618 v4l2_info(sd, "i2c edid addr: 0x%x\n", state->i2c_edid_addr);
1166 static int adv7511_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
1170 memset(edid->reserved, 0, sizeof(edid->reserved));
1172 if (edid->pad != 0)
1175 if (edid->start_block == 0 && edid->blocks == 0) {
1176 edid->blocks = state->edid.blocks;
1180 if (state->edid.blocks == 0)
1183 if (edid->start_block >= state->edid.blocks)
1186 if (edid->start_block + edid->blocks > state->edid.blocks)
1187 edid->blocks = state->edid.blocks - edid->start_block;
1189 memcpy(edid->edid, &state->edid.data[edid->start_block * 128],
1190 128 * edid->blocks);
1424 v4l2_dbg(lvl, debug, sd, "edid segment %d\n", segment);
1471 if (state->edid.read_retries) {
1472 state->edid.read_retries--;
1473 v4l2_dbg(1, debug, sd, "%s: edid read failed\n", __func__);
1484 v4l2_dbg(1, debug, sd, "%s: no edid found\n", __func__);
1555 if ((status & MASK_ADV7511_HPD_DETECT) && ((status & MASK_ADV7511_MSEN_DETECT) || state->edid.segments)) {
1556 v4l2_dbg(1, debug, sd, "%s: hotplug and (rx-sense or edid)\n", __func__);
1567 state->edid.read_retries = EDID_MAX_RETRIES;
1572 state->edid.read_retries = EDID_MAX_RETRIES;
1582 memset(&state->edid, 0, sizeof(struct adv7511_state_edid));
1600 u32 blocks = state->edid.blocks;
1601 u8 *data = state->edid.data;
1616 u8 *data = state->edid.data;
1628 v4l2_dbg(1, debug, sd, "%s: edid ready (retries: %d)\n",
1629 __func__, EDID_MAX_RETRIES - state->edid.read_retries);
1631 if (state->edid.complete)
1640 v4l2_err(sd, "edid segment number too big\n");
1644 err = adv7511_edid_rd(sd, 256, &state->edid.data[segment * 256]);
1646 adv7511_dbg_dump_edid(2, debug, sd, segment, &state->edid.data[segment * 256]);
1648 state->edid.blocks = state->edid.data[0x7e] + 1;
1650 __func__, state->edid.blocks);
1657 v4l2_err(sd, "%s: edid crc or header error\n", __func__);
1664 state->edid.segments = segment + 1;
1666 if (((state->edid.data[0x7e] >> 1) + 1) > state->edid.segments) {
1668 v4l2_dbg(1, debug, sd, "%s: request segment %d\n", __func__, state->edid.segments);
1670 adv7511_wr(sd, 0xc4, state->edid.segments);
1671 state->edid.read_retries = EDID_MAX_RETRIES;
1676 v4l2_dbg(1, debug, sd, "%s: edid complete with %d segment(s)\n", __func__, state->edid.segments);
1677 state->edid.complete = true;
1678 ed.phys_addr = cec_get_edid_phys_addr(state->edid.data,
1679 state->edid.segments * 256,
1724 struct adv7511_state_edid *edid = &state->edid;
1739 memset(edid, 0, sizeof(struct adv7511_state_edid));
1849 v4l2_err(sd, "failed to register edid i2c client\n");