MCPcopy Create free account
hub / github.com/F-Stack/f-stack / a10hdmi_ddc_read

Function a10hdmi_ddc_read

freebsd/arm/allwinner/a10_hdmi.c:392–416  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392static int
393a10hdmi_ddc_read(struct a10hdmi_softc *sc, int block, uint8_t *edid)
394{
395 int resid, off, len, error;
396 uint8_t *pbuf;
397
398 pbuf = edid;
399 resid = EDID_LENGTH;
400 off = (block & 1) ? EDID_LENGTH : 0;
401
402 while (resid > 0) {
403 len = min(resid, DDC_BLKLEN);
404 error = a10hdmi_ddc_xfer(sc, DDC_ADDR, block >> 1, off, len);
405 if (error != 0)
406 return (error);
407
408 bus_read_multi_1(sc->res, DDC_FIFO, pbuf, len);
409
410 pbuf += len;
411 off += len;
412 resid -= len;
413 }
414
415 return (0);
416}
417
418static int
419a10hdmi_detect_hdmi_vsdb(uint8_t *edid)

Callers 2

a10hdmi_detect_hdmiFunction · 0.85
a10hdmi_get_edidFunction · 0.85

Calls 2

minFunction · 0.85
a10hdmi_ddc_xferFunction · 0.85

Tested by

no test coverage detected