Blame view
include/display.h
2.33 KB
83d290c56 SPDX: Convert all... |
1 |
/* SPDX-License-Identifier: GPL-2.0+ */ |
51f2c99e1 dm: video: Add a ... |
2 3 |
/* * Copyright 2014 Google Inc. |
51f2c99e1 dm: video: Add a ... |
4 |
*/ |
2dcf14339 dm: video: Repurp... |
5 6 |
#ifndef _DISPLAY_H #define _DISPLAY_H |
51f2c99e1 dm: video: Add a ... |
7 8 9 10 11 |
struct udevice; struct display_timing; /** |
2dcf14339 dm: video: Repurp... |
12 13 14 15 16 |
* Display uclass platform data for each device * * @source_id: ID for the source of the display data, typically a video * controller * @src_dev: Source device providing the video |
1b68283b6 video: Track whet... |
17 |
* @in_use: Display is being used |
2dcf14339 dm: video: Repurp... |
18 19 20 21 |
*/ struct display_plat { int source_id; struct udevice *src_dev; |
1b68283b6 video: Track whet... |
22 |
bool in_use; |
2dcf14339 dm: video: Repurp... |
23 24 25 |
}; /** |
eab314f59 dm: video: Add a ... |
26 |
* display_read_timing() - Read timing information |
51f2c99e1 dm: video: Add a ... |
27 28 |
* * @dev: Device to read from |
2dcf14339 dm: video: Repurp... |
29 |
* @return 0 if OK, -ve on error |
51f2c99e1 dm: video: Add a ... |
30 |
*/ |
2dcf14339 dm: video: Repurp... |
31 |
int display_read_timing(struct udevice *dev, struct display_timing *timing); |
51f2c99e1 dm: video: Add a ... |
32 33 34 35 36 37 38 39 40 |
/** * display_port_enable() - Enable a display port device * * @dev: Device to enable * @panel_bpp: Number of bits per pixel for panel * @timing: Display timings * @return 0 if OK, -ve on error */ |
2dcf14339 dm: video: Repurp... |
41 42 |
int display_enable(struct udevice *dev, int panel_bpp, const struct display_timing *timing); |
51f2c99e1 dm: video: Add a ... |
43 |
|
1b68283b6 video: Track whet... |
44 45 46 47 48 49 50 |
/** * display_in_use() - Check if a display is in use by any device * * @return true if the device is in use (display_enable() has been called * successfully), else false */ bool display_in_use(struct udevice *dev); |
2dcf14339 dm: video: Repurp... |
51 |
struct dm_display_ops { |
51f2c99e1 dm: video: Add a ... |
52 |
/** |
eab314f59 dm: video: Add a ... |
53 54 55 56 57 58 59 60 61 |
* 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); /** |
51f2c99e1 dm: video: Add a ... |
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
* read_edid() - Read information from EDID * * @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 (*read_edid)(struct udevice *dev, u8 *buf, int buf_size); /** * enable() - Enable the display port device * * @dev: Device to enable * @panel_bpp: Number of bits per pixel for panel * @timing: Display timings * @return 0 if OK, -ve on error */ int (*enable)(struct udevice *dev, int panel_bpp, const struct display_timing *timing); |
eb4ee4e43 video: display: u... |
81 82 83 84 85 86 87 88 89 90 |
/** * mode_valid() - Check if mode is supported * * @dev: Device to enable * @timing: Display timings * @return true if supported, false if not */ bool (*mode_valid)(struct udevice *dev, const struct display_timing *timing); |
51f2c99e1 dm: video: Add a ... |
91 |
}; |
2dcf14339 dm: video: Repurp... |
92 |
#define display_get_ops(dev) ((struct dm_display_ops *)(dev)->driver->ops) |
51f2c99e1 dm: video: Add a ... |
93 94 |
#endif |