2 * Copyright 2014 Google Inc.
4 * SPDX-License-Identifier: GPL-2.0+
11 struct display_timing;
14 * Display uclass platform data for each device
16 * @source_id: ID for the source of the display data, typically a video
18 * @src_dev: Source device providing the video
22 struct udevice *src_dev;
26 * display_read_timing() - Read timing information
28 * @dev: Device to read from
29 * @return 0 if OK, -ve on error
31 int display_read_timing(struct udevice *dev, struct display_timing *timing);
34 * display_port_enable() - Enable a display port device
36 * @dev: Device to enable
37 * @panel_bpp: Number of bits per pixel for panel
38 * @timing: Display timings
39 * @return 0 if OK, -ve on error
41 int display_enable(struct udevice *dev, int panel_bpp,
42 const struct display_timing *timing);
44 struct dm_display_ops {
46 * read_timing() - Read information directly
48 * @dev: Device to read from
49 * @timing: Display timings
50 * @return 0 if OK, -ve on error
52 int (*read_timing)(struct udevice *dev, struct display_timing *timing);
55 * read_edid() - Read information from EDID
57 * @dev: Device to read from
58 * @buf: Buffer to read into (should be EDID_SIZE bytes)
59 * @buf_size: Buffer size (should be EDID_SIZE)
60 * @return number of bytes read, <=0 for error
62 int (*read_edid)(struct udevice *dev, u8 *buf, int buf_size);
65 * enable() - Enable the display port device
67 * @dev: Device to enable
68 * @panel_bpp: Number of bits per pixel for panel
69 * @timing: Display timings
70 * @return 0 if OK, -ve on error
72 int (*enable)(struct udevice *dev, int panel_bpp,
73 const struct display_timing *timing);
76 #define display_get_ops(dev) ((struct dm_display_ops *)(dev)->driver->ops)