Blame view
include/display.h
2.09 KB
51f2c99e1 dm: video: Add a ... |
1 2 3 4 5 |
/* * Copyright 2014 Google Inc. * * SPDX-License-Identifier: GPL-2.0+ */ |
2dcf14339 dm: video: Repurp... |
6 7 |
#ifndef _DISPLAY_H #define _DISPLAY_H |
51f2c99e1 dm: video: Add a ... |
8 9 10 11 12 |
struct udevice; struct display_timing; /** |
2dcf14339 dm: video: Repurp... |
13 14 15 16 17 |
* 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... |
18 |
* @in_use: Display is being used |
2dcf14339 dm: video: Repurp... |
19 20 21 22 |
*/ struct display_plat { int source_id; struct udevice *src_dev; |
1b68283b6 video: Track whet... |
23 |
bool in_use; |
2dcf14339 dm: video: Repurp... |
24 25 26 |
}; /** |
eab314f59 dm: video: Add a ... |
27 |
* display_read_timing() - Read timing information |
51f2c99e1 dm: video: Add a ... |
28 29 |
* * @dev: Device to read from |
2dcf14339 dm: video: Repurp... |
30 |
* @return 0 if OK, -ve on error |
51f2c99e1 dm: video: Add a ... |
31 |
*/ |
2dcf14339 dm: video: Repurp... |
32 |
int display_read_timing(struct udevice *dev, struct display_timing *timing); |
51f2c99e1 dm: video: Add a ... |
33 34 35 36 37 38 39 40 41 |
/** * 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... |
42 43 |
int display_enable(struct udevice *dev, int panel_bpp, const struct display_timing *timing); |
51f2c99e1 dm: video: Add a ... |
44 |
|
1b68283b6 video: Track whet... |
45 46 47 48 49 50 51 |
/** * 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... |
52 |
struct dm_display_ops { |
51f2c99e1 dm: video: Add a ... |
53 |
/** |
eab314f59 dm: video: Add a ... |
54 55 56 57 58 59 60 61 62 |
* 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 ... |
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
* 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); }; |
2dcf14339 dm: video: Repurp... |
83 |
#define display_get_ops(dev) ((struct dm_display_ops *)(dev)->driver->ops) |
51f2c99e1 dm: video: Add a ... |
84 85 |
#endif |