aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-05-08 20:16:50 -0400
committerDave Airlie <airlied@redhat.com>2016-05-08 20:16:50 -0400
commit2958cf0ee2232cddf06cc9efaf143a0919b266f5 (patch)
tree7526fcfc3c3b923ee646417531be13e615d74077 /include/drm
parentfd50c3a0326152d97ef02f0d55ee48d7ae66d73f (diff)
parent8863dc7f5642737e49ff681cbb842d2c614bdcf4 (diff)
Merge tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel into drm-next
Refcounting is hard, so here's a quick pull request with the one-liner to fix up i915. Otherwise just a few other small things I picked up. Plus the regression fix from Marten for rmfb behaviour that lingered around forever since no testers. Feel free to cherry-pick that over to drm-fixes, but given that there's not many who seemed to have cared, meh. * tag 'topic/drm-misc-2016-05-08' of git://anongit.freedesktop.org/drm-intel: drm/i915: Correctly refcount connectors in hw state readou drm/panel: Flesh out kerneldoc drm: Add gpu.tmpl docbook to MAINTAINERS entry drm/core: Do not preserve framebuffer on rmfb, v4. drm: Fix up markup fumble drm/fb_helper: Fix a few typos
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_modeset_helper_vtables.h2
-rw-r--r--include/drm/drm_panel.h59
2 files changed, 60 insertions, 1 deletions
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
index b61c2d45192e..d4619dc2eecb 100644
--- a/include/drm/drm_modeset_helper_vtables.h
+++ b/include/drm/drm_modeset_helper_vtables.h
@@ -672,7 +672,7 @@ struct drm_connector_helper_funcs {
672 * fixed panel can also manually add specific modes using 672 * fixed panel can also manually add specific modes using
673 * drm_mode_probed_add(). Drivers which manually add modes should also 673 * drm_mode_probed_add(). Drivers which manually add modes should also
674 * make sure that the @display_info, @width_mm and @height_mm fields of the 674 * make sure that the @display_info, @width_mm and @height_mm fields of the
675 * struct #drm_connector are filled in. 675 * struct &drm_connector are filled in.
676 * 676 *
677 * Virtual drivers that just want some standard VESA mode with a given 677 * Virtual drivers that just want some standard VESA mode with a given
678 * resolution can call drm_add_modes_noedid(), and mark the preferred 678 * resolution can call drm_add_modes_noedid(), and mark the preferred
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
index 13ff44b28893..220d1e2b3db1 100644
--- a/include/drm/drm_panel.h
+++ b/include/drm/drm_panel.h
@@ -75,6 +75,14 @@ struct drm_panel_funcs {
75 struct display_timing *timings); 75 struct display_timing *timings);
76}; 76};
77 77
78/**
79 * struct drm_panel - DRM panel object
80 * @drm: DRM device owning the panel
81 * @connector: DRM connector that the panel is attached to
82 * @dev: parent device of the panel
83 * @funcs: operations that can be performed on the panel
84 * @list: panel entry in registry
85 */
78struct drm_panel { 86struct drm_panel {
79 struct drm_device *drm; 87 struct drm_device *drm;
80 struct drm_connector *connector; 88 struct drm_connector *connector;
@@ -85,6 +93,17 @@ struct drm_panel {
85 struct list_head list; 93 struct list_head list;
86}; 94};
87 95
96/**
97 * drm_disable_unprepare - power off a panel
98 * @panel: DRM panel
99 *
100 * Calling this function will completely power off a panel (assert the panel's
101 * reset, turn off power supplies, ...). After this function has completed, it
102 * is usually no longer possible to communicate with the panel until another
103 * call to drm_panel_prepare().
104 *
105 * Return: 0 on success or a negative error code on failure.
106 */
88static inline int drm_panel_unprepare(struct drm_panel *panel) 107static inline int drm_panel_unprepare(struct drm_panel *panel)
89{ 108{
90 if (panel && panel->funcs && panel->funcs->unprepare) 109 if (panel && panel->funcs && panel->funcs->unprepare)
@@ -93,6 +112,16 @@ static inline int drm_panel_unprepare(struct drm_panel *panel)
93 return panel ? -ENOSYS : -EINVAL; 112 return panel ? -ENOSYS : -EINVAL;
94} 113}
95 114
115/**
116 * drm_panel_disable - disable a panel
117 * @panel: DRM panel
118 *
119 * This will typically turn off the panel's backlight or disable the display
120 * drivers. For smart panels it should still be possible to communicate with
121 * the integrated circuitry via any command bus after this call.
122 *
123 * Return: 0 on success or a negative error code on failure.
124 */
96static inline int drm_panel_disable(struct drm_panel *panel) 125static inline int drm_panel_disable(struct drm_panel *panel)
97{ 126{
98 if (panel && panel->funcs && panel->funcs->disable) 127 if (panel && panel->funcs && panel->funcs->disable)
@@ -101,6 +130,16 @@ static inline int drm_panel_disable(struct drm_panel *panel)
101 return panel ? -ENOSYS : -EINVAL; 130 return panel ? -ENOSYS : -EINVAL;
102} 131}
103 132
133/**
134 * drm_panel_prepare - power on a panel
135 * @panel: DRM panel
136 *
137 * Calling this function will enable power and deassert any reset signals to
138 * the panel. After this has completed it is possible to communicate with any
139 * integrated circuitry via a command bus.
140 *
141 * Return: 0 on success or a negative error code on failure.
142 */
104static inline int drm_panel_prepare(struct drm_panel *panel) 143static inline int drm_panel_prepare(struct drm_panel *panel)
105{ 144{
106 if (panel && panel->funcs && panel->funcs->prepare) 145 if (panel && panel->funcs && panel->funcs->prepare)
@@ -109,6 +148,16 @@ static inline int drm_panel_prepare(struct drm_panel *panel)
109 return panel ? -ENOSYS : -EINVAL; 148 return panel ? -ENOSYS : -EINVAL;
110} 149}
111 150
151/**
152 * drm_panel_enable - enable a panel
153 * @panel: DRM panel
154 *
155 * Calling this function will cause the panel display drivers to be turned on
156 * and the backlight to be enabled. Content will be visible on screen after
157 * this call completes.
158 *
159 * Return: 0 on success or a negative error code on failure.
160 */
112static inline int drm_panel_enable(struct drm_panel *panel) 161static inline int drm_panel_enable(struct drm_panel *panel)
113{ 162{
114 if (panel && panel->funcs && panel->funcs->enable) 163 if (panel && panel->funcs && panel->funcs->enable)
@@ -117,6 +166,16 @@ static inline int drm_panel_enable(struct drm_panel *panel)
117 return panel ? -ENOSYS : -EINVAL; 166 return panel ? -ENOSYS : -EINVAL;
118} 167}
119 168
169/**
170 * drm_panel_get_modes - probe the available display modes of a panel
171 * @panel: DRM panel
172 *
173 * The modes probed from the panel are automatically added to the connector
174 * that the panel is attached to.
175 *
176 * Return: The number of modes available from the panel on success or a
177 * negative error code on failure.
178 */
120static inline int drm_panel_get_modes(struct drm_panel *panel) 179static inline int drm_panel_get_modes(struct drm_panel *panel)
121{ 180{
122 if (panel && panel->funcs && panel->funcs->get_modes) 181 if (panel && panel->funcs && panel->funcs->get_modes)