diff options
| author | Philipp Zabel <p.zabel@pengutronix.de> | 2014-12-11 12:32:44 -0500 |
|---|---|---|
| committer | Thierry Reding <treding@nvidia.com> | 2015-04-02 13:04:12 -0400 |
| commit | 2938931f3732a4ec70c299e221ec8dea01dfd796 (patch) | |
| tree | 4f08dd05bd203e91000989c1dea8804a35c735df | |
| parent | 725c9d40f3fe61256903adfab868f302e249fa2a (diff) | |
drm/panel: Add display timing support
Many panel data sheets, additionally to typical values, list allowed
ranges for timings such as hsync/vsync lengths, porches, and the pixel
clock rate. These can be stored in a struct display_timing, to be used
by an encoder mode_fixup callback to clamp user provided timing values
or to validate workarounds for clock source limitations.
This patch adds a new drm_panel_funcs callback that returns the panel's
available display_timing entries.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
| -rw-r--r-- | include/drm/drm_panel.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 1fbcc96063a7..13ff44b28893 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | struct drm_connector; | 29 | struct drm_connector; |
| 30 | struct drm_device; | 30 | struct drm_device; |
| 31 | struct drm_panel; | 31 | struct drm_panel; |
| 32 | struct display_timing; | ||
| 32 | 33 | ||
| 33 | /** | 34 | /** |
| 34 | * struct drm_panel_funcs - perform operations on a given panel | 35 | * struct drm_panel_funcs - perform operations on a given panel |
| @@ -38,6 +39,8 @@ struct drm_panel; | |||
| 38 | * @enable: enable panel (turn on back light, etc.) | 39 | * @enable: enable panel (turn on back light, etc.) |
| 39 | * @get_modes: add modes to the connector that the panel is attached to and | 40 | * @get_modes: add modes to the connector that the panel is attached to and |
| 40 | * return the number of modes added | 41 | * return the number of modes added |
| 42 | * @get_timings: copy display timings into the provided array and return | ||
| 43 | * the number of display timings available | ||
| 41 | * | 44 | * |
| 42 | * The .prepare() function is typically called before the display controller | 45 | * The .prepare() function is typically called before the display controller |
| 43 | * starts to transmit video data. Panel drivers can use this to turn the panel | 46 | * starts to transmit video data. Panel drivers can use this to turn the panel |
| @@ -68,6 +71,8 @@ struct drm_panel_funcs { | |||
| 68 | int (*prepare)(struct drm_panel *panel); | 71 | int (*prepare)(struct drm_panel *panel); |
| 69 | int (*enable)(struct drm_panel *panel); | 72 | int (*enable)(struct drm_panel *panel); |
| 70 | int (*get_modes)(struct drm_panel *panel); | 73 | int (*get_modes)(struct drm_panel *panel); |
| 74 | int (*get_timings)(struct drm_panel *panel, unsigned int num_timings, | ||
| 75 | struct display_timing *timings); | ||
| 71 | }; | 76 | }; |
| 72 | 77 | ||
| 73 | struct drm_panel { | 78 | struct drm_panel { |
