Skip to content
Snippets Groups Projects
Commit eab314f5 authored by Jacob Chen's avatar Jacob Chen Committed by Anatolij Gustschin
Browse files

dm: video: Add a operation to display uclass


The current display class only allow to get timing from edid.
So add a operation to get timing directly from driver.
In driver, I will use fdtdec_decode_display_timing to get timing.

Signed-off-by: default avatarJacob Chen <jacob-chen@iotwrt.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent df61a74e
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,9 @@ int display_read_timing(struct udevice *dev, struct display_timing *timing) ...@@ -36,6 +36,9 @@ int display_read_timing(struct udevice *dev, struct display_timing *timing)
u8 buf[EDID_EXT_SIZE]; u8 buf[EDID_EXT_SIZE];
int ret; int ret;
if (ops && ops->read_timing)
return ops->read_timing(dev, timing);
if (!ops || !ops->read_edid) if (!ops || !ops->read_edid)
return -ENOSYS; return -ENOSYS;
ret = ops->read_edid(dev, buf, sizeof(buf)); ret = ops->read_edid(dev, buf, sizeof(buf));
......
...@@ -23,7 +23,7 @@ struct display_plat { ...@@ -23,7 +23,7 @@ struct display_plat {
}; };
/** /**
* display_read_timing() - Read timing information from EDID * display_read_timing() - Read timing information
* *
* @dev: Device to read from * @dev: Device to read from
* @return 0 if OK, -ve on error * @return 0 if OK, -ve on error
...@@ -42,6 +42,15 @@ int display_enable(struct udevice *dev, int panel_bpp, ...@@ -42,6 +42,15 @@ int display_enable(struct udevice *dev, int panel_bpp,
const struct display_timing *timing); const struct display_timing *timing);
struct dm_display_ops { struct dm_display_ops {
/**
* read_timing() - Read information directly
*
* @dev: Device to read from
* @timing: Display timings
* @return 0 if OK, -ve on error
*/
int (*read_timing)(struct udevice *dev, struct display_timing *timing);
/** /**
* read_edid() - Read information from EDID * read_edid() - Read information from EDID
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment