cmd: add new command to read edid

Add a new command to read EDID info from connected display.

When applicable EDID can also be retrieved by commands such as:

  i2c dev x
  i2c edid 0x50

but the new read_edid function relies on the implementation of the
read_edid callback from DISPLAY driver.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
This commit is contained in:
Julien Stephan
2025-06-30 12:08:16 +02:00
committed by Tom Rini
parent 5b2ee2c4a2
commit 5e9b0b56ad
5 changed files with 56 additions and 1 deletions

View File

@@ -25,6 +25,16 @@ struct display_plat {
bool in_use;
};
/**
* display_read_edid() - Read edid from display
*
* @dev: Device to read from
* @buf: Buffer to read into (should be EDID_SIZE bytes)
* @buf_size: Buffer size (should be EDID_SIZE)
* Return number of bytes read, <= 0 for error
*/
int display_read_edid(struct udevice *dev, u8 *buf, int buf_size);
/**
* display_read_timing() - Read timing information
*