Lines Matching full:panel
34 * DOC: drm panel
36 * The DRM panel helpers allow drivers to register panel objects with a
45 * drm_panel_init - initialize a panel
46 * @panel: DRM panel
48 * Sets up internal fields of the panel so that it can subsequently be added
51 void drm_panel_init(struct drm_panel *panel) in drm_panel_init() argument
53 INIT_LIST_HEAD(&panel->list); in drm_panel_init()
58 * drm_panel_add - add a panel to the global registry
59 * @panel: panel to add
61 * Add a panel to the global registry so that it can be looked up by display
66 int drm_panel_add(struct drm_panel *panel) in drm_panel_add() argument
69 list_add_tail(&panel->list, &panel_list); in drm_panel_add()
77 * drm_panel_remove - remove a panel from the global registry
78 * @panel: DRM panel
80 * Removes a panel from the global registry.
82 void drm_panel_remove(struct drm_panel *panel) in drm_panel_remove() argument
85 list_del_init(&panel->list); in drm_panel_remove()
91 * drm_panel_attach - attach a panel to a connector
92 * @panel: DRM panel
95 * After obtaining a pointer to a DRM panel a display driver calls this
96 * function to attach a panel to a connector.
98 * An error is returned if the panel is already attached to another connector.
100 * When unloading, the driver should detach from the panel by calling
105 int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector) in drm_panel_attach() argument
107 if (panel->connector) in drm_panel_attach()
110 panel->connector = connector; in drm_panel_attach()
111 panel->drm = connector->dev; in drm_panel_attach()
118 * drm_panel_detach - detach a panel from a connector
119 * @panel: DRM panel
121 * Detaches a panel from the connector it is attached to. If a panel is not
124 * This function should not be called by the panel device itself. It
127 void drm_panel_detach(struct drm_panel *panel) in drm_panel_detach() argument
129 panel->connector = NULL; in drm_panel_detach()
130 panel->drm = NULL; in drm_panel_detach()
135 * drm_panel_prepare - power on a panel
136 * @panel: DRM panel
139 * the panel. After this has completed it is possible to communicate with any
144 int drm_panel_prepare(struct drm_panel *panel) in drm_panel_prepare() argument
146 if (panel && panel->funcs && panel->funcs->prepare) in drm_panel_prepare()
147 return panel->funcs->prepare(panel); in drm_panel_prepare()
149 return panel ? -ENOSYS : -EINVAL; in drm_panel_prepare()
154 * drm_panel_unprepare - power off a panel
155 * @panel: DRM panel
157 * Calling this function will completely power off a panel (assert the panel's
159 * is usually no longer possible to communicate with the panel until another
164 int drm_panel_unprepare(struct drm_panel *panel) in drm_panel_unprepare() argument
166 if (panel && panel->funcs && panel->funcs->unprepare) in drm_panel_unprepare()
167 return panel->funcs->unprepare(panel); in drm_panel_unprepare()
169 return panel ? -ENOSYS : -EINVAL; in drm_panel_unprepare()
174 * drm_panel_enable - enable a panel
175 * @panel: DRM panel
177 * Calling this function will cause the panel display drivers to be turned on
183 int drm_panel_enable(struct drm_panel *panel) in drm_panel_enable() argument
185 if (panel && panel->funcs && panel->funcs->enable) in drm_panel_enable()
186 return panel->funcs->enable(panel); in drm_panel_enable()
188 return panel ? -ENOSYS : -EINVAL; in drm_panel_enable()
193 * drm_panel_disable - disable a panel
194 * @panel: DRM panel
196 * This will typically turn off the panel's backlight or disable the display
202 int drm_panel_disable(struct drm_panel *panel) in drm_panel_disable() argument
204 if (panel && panel->funcs && panel->funcs->disable) in drm_panel_disable()
205 return panel->funcs->disable(panel); in drm_panel_disable()
207 return panel ? -ENOSYS : -EINVAL; in drm_panel_disable()
212 * drm_panel_get_modes - probe the available display modes of a panel
213 * @panel: DRM panel
215 * The modes probed from the panel are automatically added to the connector
216 * that the panel is attached to.
218 * Return: The number of modes available from the panel on success or a
221 int drm_panel_get_modes(struct drm_panel *panel) in drm_panel_get_modes() argument
223 if (panel && panel->funcs && panel->funcs->get_modes) in drm_panel_get_modes()
224 return panel->funcs->get_modes(panel); in drm_panel_get_modes()
226 return panel ? -ENOSYS : -EINVAL; in drm_panel_get_modes()
232 * of_drm_find_panel - look up a panel using a device tree node
233 * @np: device tree node of the panel
236 * tree node. If a matching panel is found, return a pointer to it.
238 * Return: A pointer to the panel registered for the specified device tree
239 * node or an ERR_PTR() if no panel matching the device tree node can be found.
243 * - EPROBE_DEFER: the panel device has not been probed yet, and the caller
249 struct drm_panel *panel; in of_drm_find_panel() local
256 list_for_each_entry(panel, &panel_list, list) { in of_drm_find_panel()
257 if (panel->dev->of_node == np) { in of_drm_find_panel()
259 return panel; in of_drm_find_panel()
270 MODULE_DESCRIPTION("DRM panel infrastructure");