Lines Matching refs:edid
463 static int adv748x_hdmi_get_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) in adv748x_hdmi_get_edid() argument
467 memset(edid->reserved, 0, sizeof(edid->reserved)); in adv748x_hdmi_get_edid()
469 if (!hdmi->edid.present) in adv748x_hdmi_get_edid()
472 if (edid->start_block == 0 && edid->blocks == 0) { in adv748x_hdmi_get_edid()
473 edid->blocks = hdmi->edid.blocks; in adv748x_hdmi_get_edid()
477 if (edid->start_block >= hdmi->edid.blocks) in adv748x_hdmi_get_edid()
480 if (edid->start_block + edid->blocks > hdmi->edid.blocks) in adv748x_hdmi_get_edid()
481 edid->blocks = hdmi->edid.blocks - edid->start_block; in adv748x_hdmi_get_edid()
483 memcpy(edid->edid, hdmi->edid.edid + edid->start_block * 128, in adv748x_hdmi_get_edid()
484 edid->blocks * 128); in adv748x_hdmi_get_edid()
513 static int adv748x_hdmi_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) in adv748x_hdmi_set_edid() argument
519 memset(edid->reserved, 0, sizeof(edid->reserved)); in adv748x_hdmi_set_edid()
521 if (edid->start_block != 0) in adv748x_hdmi_set_edid()
524 if (edid->blocks == 0) { in adv748x_hdmi_set_edid()
525 hdmi->edid.blocks = 0; in adv748x_hdmi_set_edid()
526 hdmi->edid.present = 0; in adv748x_hdmi_set_edid()
534 edid->blocks << ADV748X_REPEATER_EDID_SZ_SHIFT); in adv748x_hdmi_set_edid()
541 if (edid->blocks > 4) { in adv748x_hdmi_set_edid()
542 edid->blocks = 4; in adv748x_hdmi_set_edid()
546 memcpy(hdmi->edid.edid, edid->edid, 128 * edid->blocks); in adv748x_hdmi_set_edid()
547 hdmi->edid.blocks = edid->blocks; in adv748x_hdmi_set_edid()
548 hdmi->edid.present = true; in adv748x_hdmi_set_edid()
550 hdmi->aspect_ratio = v4l2_calc_aspect_ratio(edid->edid[0x15], in adv748x_hdmi_set_edid()
551 edid->edid[0x16]); in adv748x_hdmi_set_edid()
553 err = adv748x_hdmi_edid_write_block(hdmi, 128 * edid->blocks, in adv748x_hdmi_set_edid()
554 hdmi->edid.edid); in adv748x_hdmi_set_edid()
556 v4l2_err(sd, "error %d writing edid pad %d\n", err, edid->pad); in adv748x_hdmi_set_edid()
561 edid->blocks << ADV748X_REPEATER_EDID_SZ_SHIFT); in adv748x_hdmi_set_edid()