2 * Copyright 2014 Google Inc.
4 * SPDX-License-Identifier: GPL-2.0+
13 int display_read_edid(struct udevice *dev, u8 *buf, int buf_size)
15 struct dm_display_ops *ops = display_get_ops(dev);
17 if (!ops || !ops->read_edid)
19 return ops->read_edid(dev, buf, buf_size);
22 int display_enable(struct udevice *dev, int panel_bpp,
23 const struct display_timing *timing)
25 struct dm_display_ops *ops = display_get_ops(dev);
27 if (!ops || !ops->enable)
29 return ops->enable(dev, panel_bpp, timing);
32 int display_read_timing(struct udevice *dev, struct display_timing *timing)
34 struct dm_display_ops *ops = display_get_ops(dev);
35 int panel_bits_per_colour;
36 u8 buf[EDID_EXT_SIZE];
39 if (!ops || !ops->read_edid)
41 ret = ops->read_edid(dev, buf, sizeof(buf));
45 return edid_get_timing(buf, ret, timing, &panel_bits_per_colour);
48 UCLASS_DRIVER(display) = {
51 .per_device_platdata_auto_alloc_size = sizeof(struct display_plat),