Lines Matching full:edid
71 /* Number of EDID read retries left */
114 struct adv7511_state_edid edid;
561 struct adv7511_state_edid *edid = &state->edid;
566 "reading EDID",
587 v4l2_info(sd, "%s hotplug, %s Rx Sense, %s EDID (%d block(s))\n",
590 edid->segments ? "found" : "no",
591 edid->blocks);
631 v4l2_info(sd, "i2c edid addr: 0x%x\n", state->i2c_edid_addr);
701 /* Set number of attempts to read the EDID */
897 /* The datasheet says that the EDID ready interrupt should be
1183 static int adv7511_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
1187 memset(edid->reserved, 0, sizeof(edid->reserved));
1189 if (edid->pad != 0)
1192 if (edid->start_block == 0 && edid->blocks == 0) {
1193 edid->blocks = state->edid.blocks;
1197 if (state->edid.blocks == 0)
1200 if (edid->start_block >= state->edid.blocks)
1203 if (edid->start_block + edid->blocks > state->edid.blocks)
1204 edid->blocks = state->edid.blocks - edid->start_block;
1206 memcpy(edid->edid, &state->edid.data[edid->start_block * 128],
1207 128 * edid->blocks);
1385 * The RGB quantization range shouldn't be non-zero if the EDID doesn't
1388 * knows the EDID and can detect this.
1391 * quantization ranges should only be sent if the EDID has the YQ bit
1443 v4l2_dbg(lvl, debug, sd, "edid segment %d\n", segment);
1464 /* We failed to read the EDID, so send an event for this. */
1482 /* Return if we received the EDID. */
1487 /* We must retry reading the EDID several times, it is possible
1488 * that initially the EDID couldn't be read due to i2c errors
1490 if (state->edid.read_retries) {
1491 state->edid.read_retries--;
1492 v4l2_dbg(1, debug, sd, "%s: edid read failed\n", __func__);
1501 /* We failed to read the EDID, so send an event for this. */
1503 v4l2_dbg(1, debug, sd, "%s: no edid found\n", __func__);
1574 if ((status & MASK_ADV7511_HPD_DETECT) && ((status & MASK_ADV7511_MSEN_DETECT) || state->edid.segments)) {
1575 v4l2_dbg(1, debug, sd, "%s: hotplug and (rx-sense or edid)\n", __func__);
1586 state->edid.read_retries = EDID_MAX_RETRIES;
1591 state->edid.read_retries = EDID_MAX_RETRIES;
1601 memset(&state->edid, 0, sizeof(struct adv7511_state_edid));
1619 u32 blocks = state->edid.blocks;
1620 u8 *data = state->edid.data;
1635 u8 *data = state->edid.data;
1647 v4l2_dbg(1, debug, sd, "%s: edid ready (retries: %d)\n",
1648 __func__, EDID_MAX_RETRIES - state->edid.read_retries);
1650 if (state->edid.complete)
1659 v4l2_err(sd, "edid segment number too big\n");
1663 err = adv7511_edid_rd(sd, 256, &state->edid.data[segment * 256]);
1665 adv7511_dbg_dump_edid(2, debug, sd, segment, &state->edid.data[segment * 256]);
1667 state->edid.blocks =
1668 v4l2_num_edid_blocks(state->edid.data,
1671 __func__, state->edid.blocks);
1676 /* Couldn't read EDID or EDID is invalid. Force retry! */
1678 v4l2_err(sd, "%s: edid crc or header error\n", __func__);
1685 state->edid.segments = segment + 1;
1687 if (state->edid.blocks > state->edid.segments * 2) {
1688 /* Request next EDID segment */
1689 v4l2_dbg(1, debug, sd, "%s: request segment %d\n", __func__, state->edid.segments);
1691 adv7511_wr(sd, 0xc4, state->edid.segments);
1692 state->edid.read_retries = EDID_MAX_RETRIES;
1697 v4l2_dbg(1, debug, sd, "%s: edid complete with %d segment(s)\n", __func__, state->edid.segments);
1698 state->edid.complete = true;
1699 ed.phys_addr = cec_get_edid_phys_addr(state->edid.data,
1700 state->edid.segments * 256,
1784 struct adv7511_state_edid *edid = &state->edid;
1799 memset(edid, 0, sizeof(struct adv7511_state_edid));
1891 /* EDID and CEC i2c addr */
1909 v4l2_err(sd, "failed to register edid i2c client\n");