Lines Matching +full:primary +full:- +full:device
37 * This helper library contains various one-off functions which don't really fit
42 * drm_helper_move_panel_connectors_to_head() - move panels to the front in the
44 * @dev: drm device to operate on
59 spin_lock_irq(&dev->mode_config.connector_list_lock); in drm_helper_move_panel_connectors_to_head()
61 &dev->mode_config.connector_list, head) { in drm_helper_move_panel_connectors_to_head()
62 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS || in drm_helper_move_panel_connectors_to_head()
63 connector->connector_type == DRM_MODE_CONNECTOR_eDP || in drm_helper_move_panel_connectors_to_head()
64 connector->connector_type == DRM_MODE_CONNECTOR_DSI) in drm_helper_move_panel_connectors_to_head()
65 list_move_tail(&connector->head, &panel_list); in drm_helper_move_panel_connectors_to_head()
68 list_splice(&panel_list, &dev->mode_config.connector_list); in drm_helper_move_panel_connectors_to_head()
69 spin_unlock_irq(&dev->mode_config.connector_list_lock); in drm_helper_move_panel_connectors_to_head()
74 * drm_helper_mode_fill_fb_struct - fill out framebuffer metadata
75 * @dev: DRM device
80 * This helper can be used in a drivers fb_create callback to pre-fill the fb's
90 fb->dev = dev; in drm_helper_mode_fill_fb_struct()
91 fb->format = info; in drm_helper_mode_fill_fb_struct()
92 fb->width = mode_cmd->width; in drm_helper_mode_fill_fb_struct()
93 fb->height = mode_cmd->height; in drm_helper_mode_fill_fb_struct()
95 fb->pitches[i] = mode_cmd->pitches[i]; in drm_helper_mode_fill_fb_struct()
96 fb->offsets[i] = mode_cmd->offsets[i]; in drm_helper_mode_fill_fb_struct()
98 fb->modifier = mode_cmd->modifier[0]; in drm_helper_mode_fill_fb_struct()
99 fb->flags = mode_cmd->flags; in drm_helper_mode_fill_fb_struct()
107 * creating the primary plane.
119 * drm_crtc_init - Legacy CRTC initialization function
120 * @dev: DRM device
124 * Initialize a CRTC object with a default helper-provided primary plane and no
130 * 1. Primary plane cannot be repositioned.
131 * 2. Primary plane cannot be scaled.
132 * 3. Primary plane must cover the entire CRTC.
134 * 5. The primary plane must always be on if the CRTC is enabled.
137 * should instead implement their own primary plane. Atomic drivers must do so.
148 struct drm_plane *primary; in drm_crtc_init() local
152 primary = __drm_universal_plane_alloc(dev, sizeof(*primary), 0, 0, in drm_crtc_init()
157 if (IS_ERR(primary)) in drm_crtc_init()
158 return PTR_ERR(primary); in drm_crtc_init()
164 primary->format_default = true; in drm_crtc_init()
166 ret = drm_crtc_init_with_planes(dev, crtc, primary, NULL, funcs, NULL); in drm_crtc_init()
173 drm_plane_cleanup(primary); in drm_crtc_init()
174 kfree(primary); in drm_crtc_init()
180 * drm_mode_config_helper_suspend - Modeset suspend helper
181 * @dev: DRM device
186 * If suspending fails, fbdev and polling is re-enabled.
203 if (dev->mode_config.poll_enabled) in drm_mode_config_helper_suspend()
214 if (dev->mode_config.poll_enabled) in drm_mode_config_helper_suspend()
220 dev->mode_config.suspend_state = state; in drm_mode_config_helper_suspend()
227 * drm_mode_config_helper_resume - Modeset resume helper
228 * @dev: DRM device
247 if (WARN_ON(!dev->mode_config.suspend_state)) in drm_mode_config_helper_resume()
248 return -EINVAL; in drm_mode_config_helper_resume()
250 ret = drm_atomic_helper_resume(dev, dev->mode_config.suspend_state); in drm_mode_config_helper_resume()
253 dev->mode_config.suspend_state = NULL; in drm_mode_config_helper_resume()
260 if (dev->mode_config.poll_enabled) in drm_mode_config_helper_resume()