Lines Matching full:edid
77 /* Number of EDID read retries left */
120 struct adv7511_state_edid edid; member
582 struct adv7511_state_edid *edid = &state->edid; in adv7511_log_status() local
587 "reading EDID", in adv7511_log_status()
608 v4l2_info(sd, "%s hotplug, %s Rx Sense, %s EDID (%d block(s))\n", in adv7511_log_status()
611 edid->segments ? "found" : "no", in adv7511_log_status()
612 edid->blocks); in adv7511_log_status()
652 v4l2_info(sd, "i2c edid addr: 0x%x\n", state->i2c_edid_addr); in adv7511_log_status()
722 /* Set number of attempts to read the EDID */ in adv7511_s_power()
918 /* The datasheet says that the EDID ready interrupt should be in adv7511_set_isr()
1200 static int adv7511_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) in adv7511_get_edid() argument
1204 memset(edid->reserved, 0, sizeof(edid->reserved)); in adv7511_get_edid()
1206 if (edid->pad != 0) in adv7511_get_edid()
1209 if (edid->start_block == 0 && edid->blocks == 0) { in adv7511_get_edid()
1210 edid->blocks = state->edid.segments * 2; in adv7511_get_edid()
1214 if (state->edid.segments == 0) in adv7511_get_edid()
1217 if (edid->start_block >= state->edid.segments * 2) in adv7511_get_edid()
1220 if (edid->start_block + edid->blocks > state->edid.segments * 2) in adv7511_get_edid()
1221 edid->blocks = state->edid.segments * 2 - edid->start_block; in adv7511_get_edid()
1223 memcpy(edid->edid, &state->edid.data[edid->start_block * 128], in adv7511_get_edid()
1224 128 * edid->blocks); in adv7511_get_edid()
1402 * The RGB quantization range shouldn't be non-zero if the EDID doesn't in adv7511_set_fmt()
1405 * knows the EDID and can detect this. in adv7511_set_fmt()
1408 * quantization ranges should only be sent if the EDID has the YQ bit in adv7511_set_fmt()
1458 v4l2_dbg(lvl, debug, sd, "edid segment %d\n", segment); in adv7511_dbg_dump_edid()
1479 /* We failed to read the EDID, so send an event for this. */ in adv7511_notify_no_edid()
1497 /* Return if we received the EDID. */ in adv7511_edid_handler()
1502 /* We must retry reading the EDID several times, it is possible in adv7511_edid_handler()
1503 * that initially the EDID couldn't be read due to i2c errors in adv7511_edid_handler()
1505 if (state->edid.read_retries) { in adv7511_edid_handler()
1506 state->edid.read_retries--; in adv7511_edid_handler()
1507 v4l2_dbg(1, debug, sd, "%s: edid read failed\n", __func__); in adv7511_edid_handler()
1516 /* We failed to read the EDID, so send an event for this. */ in adv7511_edid_handler()
1518 v4l2_dbg(1, debug, sd, "%s: no edid found\n", __func__); in adv7511_edid_handler()
1589 …if ((status & MASK_ADV7511_HPD_DETECT) && ((status & MASK_ADV7511_MSEN_DETECT) || state->edid.segm… in adv7511_check_monitor_present_status()
1590 v4l2_dbg(1, debug, sd, "%s: hotplug and (rx-sense or edid)\n", __func__); in adv7511_check_monitor_present_status()
1601 state->edid.read_retries = EDID_MAX_RETRIES; in adv7511_check_monitor_present_status()
1606 state->edid.read_retries = EDID_MAX_RETRIES; in adv7511_check_monitor_present_status()
1616 memset(&state->edid, 0, sizeof(struct adv7511_state_edid)); in adv7511_check_monitor_present_status()
1634 u32 blocks = state->edid.blocks; in edid_verify_crc()
1635 u8 *data = state->edid.data; in edid_verify_crc()
1650 u8 *data = state->edid.data; in edid_verify_header()
1662 v4l2_dbg(1, debug, sd, "%s: edid ready (retries: %d)\n", in adv7511_check_edid_status()
1663 __func__, EDID_MAX_RETRIES - state->edid.read_retries); in adv7511_check_edid_status()
1665 if (state->edid.complete) in adv7511_check_edid_status()
1673 v4l2_err(sd, "edid segment number too big\n"); in adv7511_check_edid_status()
1677 adv7511_edid_rd(sd, 256, &state->edid.data[segment * 256]); in adv7511_check_edid_status()
1678 adv7511_dbg_dump_edid(2, debug, sd, segment, &state->edid.data[segment * 256]); in adv7511_check_edid_status()
1680 state->edid.blocks = state->edid.data[0x7e] + 1; in adv7511_check_edid_status()
1681 v4l2_dbg(1, debug, sd, "%s: %d blocks in total\n", __func__, state->edid.blocks); in adv7511_check_edid_status()
1685 /* edid crc error, force reread of edid segment */ in adv7511_check_edid_status()
1686 v4l2_err(sd, "%s: edid crc or header error\n", __func__); in adv7511_check_edid_status()
1693 state->edid.segments = segment + 1; in adv7511_check_edid_status()
1695 if (((state->edid.data[0x7e] >> 1) + 1) > state->edid.segments) { in adv7511_check_edid_status()
1696 /* Request next EDID segment */ in adv7511_check_edid_status()
1697 v4l2_dbg(1, debug, sd, "%s: request segment %d\n", __func__, state->edid.segments); in adv7511_check_edid_status()
1699 adv7511_wr(sd, 0xc4, state->edid.segments); in adv7511_check_edid_status()
1700 state->edid.read_retries = EDID_MAX_RETRIES; in adv7511_check_edid_status()
1705 v4l2_dbg(1, debug, sd, "%s: edid complete with %d segment(s)\n", __func__, state->edid.segments); in adv7511_check_edid_status()
1706 state->edid.complete = true; in adv7511_check_edid_status()
1707 ed.phys_addr = cec_get_edid_phys_addr(state->edid.data, in adv7511_check_edid_status()
1708 state->edid.segments * 256, in adv7511_check_edid_status()
1753 struct adv7511_state_edid *edid = &state->edid; in adv7511_init_setup() local
1768 memset(edid, 0, sizeof(struct adv7511_state_edid)); in adv7511_init_setup()
1860 /* EDID and CEC i2c addr */ in adv7511_probe()
1878 v4l2_err(sd, "failed to register edid i2c client\n"); in adv7511_probe()