Lines Matching +full:can +full:- +full:primary
35 * This helper library contains various one-off functions which don't really fit
40 * drm_helper_move_panel_connectors_to_head() - move panels to the front in the
57 spin_lock_irq(&dev->mode_config.connector_list_lock); in drm_helper_move_panel_connectors_to_head()
59 &dev->mode_config.connector_list, head) { in drm_helper_move_panel_connectors_to_head()
60 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS || in drm_helper_move_panel_connectors_to_head()
61 connector->connector_type == DRM_MODE_CONNECTOR_eDP || in drm_helper_move_panel_connectors_to_head()
62 connector->connector_type == DRM_MODE_CONNECTOR_DSI) in drm_helper_move_panel_connectors_to_head()
63 list_move_tail(&connector->head, &panel_list); in drm_helper_move_panel_connectors_to_head()
66 list_splice(&panel_list, &dev->mode_config.connector_list); in drm_helper_move_panel_connectors_to_head()
67 spin_unlock_irq(&dev->mode_config.connector_list_lock); in drm_helper_move_panel_connectors_to_head()
72 * drm_helper_mode_fill_fb_struct - fill out framebuffer metadata
77 * This helper can be used in a drivers fb_create callback to pre-fill the fb's
86 fb->dev = dev; in drm_helper_mode_fill_fb_struct()
87 fb->format = drm_get_format_info(dev, mode_cmd); in drm_helper_mode_fill_fb_struct()
88 fb->width = mode_cmd->width; in drm_helper_mode_fill_fb_struct()
89 fb->height = mode_cmd->height; in drm_helper_mode_fill_fb_struct()
91 fb->pitches[i] = mode_cmd->pitches[i]; in drm_helper_mode_fill_fb_struct()
92 fb->offsets[i] = mode_cmd->offsets[i]; in drm_helper_mode_fill_fb_struct()
94 fb->modifier = mode_cmd->modifier[0]; in drm_helper_mode_fill_fb_struct()
95 fb->flags = mode_cmd->flags; in drm_helper_mode_fill_fb_struct()
101 * with all current DRM drivers. Most hardware can actually support more
103 * creating the primary plane.
115 * drm_crtc_init - Legacy CRTC initialization function
120 * Initialize a CRTC object with a default helper-provided primary plane and no
126 * 1. Primary plane cannot be repositioned.
127 * 2. Primary plane cannot be scaled.
128 * 3. Primary plane must cover the entire CRTC.
130 * 5. The primary plane must always be on if the CRTC is enabled.
133 * should instead implement their own primary plane. Atomic drivers must do so.
134 * Drivers with the above hardware restriction can look into using &struct
144 struct drm_plane *primary; in drm_crtc_init() local
148 primary = __drm_universal_plane_alloc(dev, sizeof(*primary), 0, 0, in drm_crtc_init()
153 if (IS_ERR(primary)) in drm_crtc_init()
154 return PTR_ERR(primary); in drm_crtc_init()
160 primary->format_default = true; in drm_crtc_init()
162 ret = drm_crtc_init_with_planes(dev, crtc, primary, NULL, funcs, NULL); in drm_crtc_init()
169 drm_plane_cleanup(primary); in drm_crtc_init()
170 kfree(primary); in drm_crtc_init()
176 * drm_mode_config_helper_suspend - Modeset suspend helper
182 * If suspending fails, fbdev and polling is re-enabled.
199 if (dev->mode_config.poll_enabled) in drm_mode_config_helper_suspend()
210 if (dev->mode_config.poll_enabled) in drm_mode_config_helper_suspend()
216 dev->mode_config.suspend_state = state; in drm_mode_config_helper_suspend()
223 * drm_mode_config_helper_resume - Modeset resume helper
243 if (WARN_ON(!dev->mode_config.suspend_state)) in drm_mode_config_helper_resume()
244 return -EINVAL; in drm_mode_config_helper_resume()
246 ret = drm_atomic_helper_resume(dev, dev->mode_config.suspend_state); in drm_mode_config_helper_resume()
249 dev->mode_config.suspend_state = NULL; in drm_mode_config_helper_resume()
256 if (dev->mode_config.poll_enabled) in drm_mode_config_helper_resume()