• Home
  • Raw
  • Download

Lines Matching full:panel

36  * DOC: drm panel
38 * The DRM panel helpers allow drivers to register panel objects with a
47 * drm_panel_init - initialize a panel
48 * @panel: DRM panel
49 * @dev: parent device of the panel
50 * @funcs: panel operations
52 * the panel interface
54 * Initialize the panel structure for subsequent registration with
57 void drm_panel_init(struct drm_panel *panel, struct device *dev, in drm_panel_init() argument
60 INIT_LIST_HEAD(&panel->list); in drm_panel_init()
61 panel->dev = dev; in drm_panel_init()
62 panel->funcs = funcs; in drm_panel_init()
63 panel->connector_type = connector_type; in drm_panel_init()
68 * drm_panel_add - add a panel to the global registry
69 * @panel: panel to add
71 * Add a panel to the global registry so that it can be looked up by display
74 void drm_panel_add(struct drm_panel *panel) in drm_panel_add() argument
77 list_add_tail(&panel->list, &panel_list); in drm_panel_add()
83 * drm_panel_remove - remove a panel from the global registry
84 * @panel: DRM panel
86 * Removes a panel from the global registry.
88 void drm_panel_remove(struct drm_panel *panel) in drm_panel_remove() argument
91 list_del_init(&panel->list); in drm_panel_remove()
97 * drm_panel_prepare - power on a panel
98 * @panel: DRM panel
101 * the panel. After this has completed it is possible to communicate with any
106 int drm_panel_prepare(struct drm_panel *panel) in drm_panel_prepare() argument
108 if (!panel) in drm_panel_prepare()
111 if (panel->funcs && panel->funcs->prepare) in drm_panel_prepare()
112 return panel->funcs->prepare(panel); in drm_panel_prepare()
119 * drm_panel_unprepare - power off a panel
120 * @panel: DRM panel
122 * Calling this function will completely power off a panel (assert the panel's
124 * is usually no longer possible to communicate with the panel until another
129 int drm_panel_unprepare(struct drm_panel *panel) in drm_panel_unprepare() argument
131 if (!panel) in drm_panel_unprepare()
134 if (panel->funcs && panel->funcs->unprepare) in drm_panel_unprepare()
135 return panel->funcs->unprepare(panel); in drm_panel_unprepare()
142 * drm_panel_enable - enable a panel
143 * @panel: DRM panel
145 * Calling this function will cause the panel display drivers to be turned on
151 int drm_panel_enable(struct drm_panel *panel) in drm_panel_enable() argument
155 if (!panel) in drm_panel_enable()
158 if (panel->funcs && panel->funcs->enable) { in drm_panel_enable()
159 ret = panel->funcs->enable(panel); in drm_panel_enable()
164 ret = backlight_enable(panel->backlight); in drm_panel_enable()
166 DRM_DEV_INFO(panel->dev, "failed to enable backlight: %d\n", in drm_panel_enable()
174 * drm_panel_disable - disable a panel
175 * @panel: DRM panel
177 * This will typically turn off the panel's backlight or disable the display
183 int drm_panel_disable(struct drm_panel *panel) in drm_panel_disable() argument
187 if (!panel) in drm_panel_disable()
190 ret = backlight_disable(panel->backlight); in drm_panel_disable()
192 DRM_DEV_INFO(panel->dev, "failed to disable backlight: %d\n", in drm_panel_disable()
195 if (panel->funcs && panel->funcs->disable) in drm_panel_disable()
196 return panel->funcs->disable(panel); in drm_panel_disable()
203 * drm_panel_get_modes - probe the available display modes of a panel
204 * @panel: DRM panel
207 * The modes probed from the panel are automatically added to the connector
208 * that the panel is attached to.
210 * Return: The number of modes available from the panel on success or a
213 int drm_panel_get_modes(struct drm_panel *panel, in drm_panel_get_modes() argument
216 if (!panel) in drm_panel_get_modes()
219 if (panel->funcs && panel->funcs->get_modes) in drm_panel_get_modes()
220 return panel->funcs->get_modes(panel, connector); in drm_panel_get_modes()
228 * of_drm_find_panel - look up a panel using a device tree node
229 * @np: device tree node of the panel
232 * tree node. If a matching panel is found, return a pointer to it.
234 * Return: A pointer to the panel registered for the specified device tree
235 * node or an ERR_PTR() if no panel matching the device tree node can be found.
239 * - EPROBE_DEFER: the panel device has not been probed yet, and the caller
245 struct drm_panel *panel; in of_drm_find_panel() local
252 list_for_each_entry(panel, &panel_list, list) { in of_drm_find_panel()
253 if (panel->dev->of_node == np) { in of_drm_find_panel()
255 return panel; in of_drm_find_panel()
265 * of_drm_get_panel_orientation - look up the orientation of the panel through
267 * @np: device tree node of the panel
270 * Looks up the rotation of a panel in the device tree. The orientation of the
271 * panel is expressed as a property name "rotation" in the device tree. The
311 * @panel: DRM panel
313 * Use this function to enable backlight handling if your panel
316 * When the panel is enabled backlight will be enabled after a
319 * When the panel is disabled backlight will be disabled before the
322 * A typical implementation for a panel driver supporting device tree
329 int drm_panel_of_backlight(struct drm_panel *panel) in drm_panel_of_backlight() argument
333 if (!panel || !panel->dev) in drm_panel_of_backlight()
336 backlight = devm_of_find_backlight(panel->dev); in drm_panel_of_backlight()
341 panel->backlight = backlight; in drm_panel_of_backlight()
348 MODULE_DESCRIPTION("DRM panel infrastructure");