1 comment:
File src/drivers/intel/gma/edid.c:
edid[4 * i] = reg32 & 0xff;
edid[4 * i + 1] = (reg32 >> 8) & 0xff;
edid[4 * i + 2] = (reg32 >> 16) & 0xff;
edid[4 * i + 3] = (reg32 >> 24) & 0xff;
This looks like little-endian encoding, and we are in drivers/intel/. I don't
think there is anything to swap. It's also hard to argue about endianness
here, as this is just copying data from hardware to a stream (just leaving
the bytes in the order they were found should work).
I think the best way to express this would be to use a host-specific read
and write:
((uint32_t *)edid)[i] = read32(GMBUS3_ADDR);
or
write32(edid + 4 * i, read32(GMBUS3_ADDR));
The former doesn't look too nice, the latter would (unnecessarily) treat the
RAM where `edid` resides like MMIO...
Or maybe just use memcpy()? ;)
To view, visit change 38647. To unsubscribe, or for help writing mail filters, visit settings.