Lines Matching full:helper

6  * DRM framebuffer helper functions
86 * The fb helper functions are useful to provide an fbdev on top of a drm kernel
88 * helper functions used by many drivers to implement the kernel mode setting
95 * All other functions exported by the fb helper library can be used to
100 * helper must be called first to initialize the minimum required to make
105 * encoders and connectors. To finish up the fbdev helper initialization, the
137 * @info: fbdev registered by the helper
141 struct drm_fb_helper *helper = info->par; in drm_fb_helper_debug_enter() local
145 list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) { in drm_fb_helper_debug_enter()
146 mutex_lock(&helper->client.modeset_mutex); in drm_fb_helper_debug_enter()
147 drm_client_for_each_modeset(mode_set, &helper->client) { in drm_fb_helper_debug_enter()
164 mutex_unlock(&helper->client.modeset_mutex); in drm_fb_helper_debug_enter()
173 * @info: fbdev registered by the helper
177 struct drm_fb_helper *helper = info->par; in drm_fb_helper_debug_leave() local
178 struct drm_client_dev *client = &helper->client; in drm_fb_helper_debug_leave()
179 struct drm_device *dev = helper->dev; in drm_fb_helper_debug_leave()
253 * @fb_helper: driver-allocated fbdev helper, can be NULL
255 * This helper should be called from fbdev emulation's &drm_client_funcs.restore
272 struct drm_fb_helper *helper; in drm_fb_helper_restore_work_fn() local
275 list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) { in drm_fb_helper_restore_work_fn()
276 struct drm_device *dev = helper->dev; in drm_fb_helper_restore_work_fn()
281 mutex_lock(&helper->lock); in drm_fb_helper_restore_work_fn()
282 drm_client_modeset_commit_locked(&helper->client); in drm_fb_helper_restore_work_fn()
283 mutex_unlock(&helper->lock); in drm_fb_helper_restore_work_fn()
316 * @info: fbdev registered by the helper
351 struct drm_fb_helper *helper = container_of(work, struct drm_fb_helper, in drm_fb_helper_resume_worker() local
355 fb_set_suspend(helper->info, 0); in drm_fb_helper_resume_worker()
359 static void drm_fb_helper_fb_dirty(struct drm_fb_helper *helper) in drm_fb_helper_fb_dirty() argument
361 struct drm_device *dev = helper->dev; in drm_fb_helper_fb_dirty()
362 struct drm_clip_rect *clip = &helper->damage_clip; in drm_fb_helper_fb_dirty()
367 if (drm_WARN_ON_ONCE(dev, !helper->funcs->fb_dirty)) in drm_fb_helper_fb_dirty()
370 spin_lock_irqsave(&helper->damage_lock, flags); in drm_fb_helper_fb_dirty()
374 spin_unlock_irqrestore(&helper->damage_lock, flags); in drm_fb_helper_fb_dirty()
376 ret = helper->funcs->fb_dirty(helper, &clip_copy); in drm_fb_helper_fb_dirty()
387 spin_lock_irqsave(&helper->damage_lock, flags); in drm_fb_helper_fb_dirty()
392 spin_unlock_irqrestore(&helper->damage_lock, flags); in drm_fb_helper_fb_dirty()
397 struct drm_fb_helper *helper = container_of(work, struct drm_fb_helper, damage_work); in drm_fb_helper_damage_work() local
399 drm_fb_helper_fb_dirty(helper); in drm_fb_helper_damage_work()
405 * @helper: driver-allocated fbdev helper structure to set up
407 * @funcs: pointer to structure of functions associate with this helper
409 * Sets up the bare minimum to make the framebuffer helper usable. This is
412 void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper, in drm_fb_helper_prepare() argument
430 INIT_LIST_HEAD(&helper->kernel_fb_list); in drm_fb_helper_prepare()
431 spin_lock_init(&helper->damage_lock); in drm_fb_helper_prepare()
432 INIT_WORK(&helper->resume_work, drm_fb_helper_resume_worker); in drm_fb_helper_prepare()
433 INIT_WORK(&helper->damage_work, drm_fb_helper_damage_work); in drm_fb_helper_prepare()
434 helper->damage_clip.x1 = helper->damage_clip.y1 = ~0; in drm_fb_helper_prepare()
435 mutex_init(&helper->lock); in drm_fb_helper_prepare()
436 helper->funcs = funcs; in drm_fb_helper_prepare()
437 helper->dev = dev; in drm_fb_helper_prepare()
438 helper->preferred_bpp = preferred_bpp; in drm_fb_helper_prepare()
444 * @fb_helper: driver-allocated fbdev helper structure to set up
446 * Cleans up the framebuffer helper. Inverse of drm_fb_helper_prepare().
457 * @fb_helper: driver-allocated fbdev helper structure to initialize
459 * This allocates the structures for the fbdev helper with the given limits.
492 * @fb_helper: driver-allocated fbdev helper
494 * A helper to alloc fb_info and the member cmap. Called by the driver
534 * @fb_helper: driver-allocated fbdev helper
536 * A helper to release fb_info and the member cmap. Drivers do not
557 * @fb_helper: driver-allocated fbdev helper, can be NULL
572 * @fb_helper: driver-allocated fbdev helper, can be NULL
604 static void drm_fb_helper_add_damage_clip(struct drm_fb_helper *helper, u32 x, u32 y, in drm_fb_helper_add_damage_clip() argument
607 struct drm_clip_rect *clip = &helper->damage_clip; in drm_fb_helper_add_damage_clip()
610 spin_lock_irqsave(&helper->damage_lock, flags); in drm_fb_helper_add_damage_clip()
615 spin_unlock_irqrestore(&helper->damage_lock, flags); in drm_fb_helper_add_damage_clip()
618 static void drm_fb_helper_damage(struct drm_fb_helper *helper, u32 x, u32 y, in drm_fb_helper_damage() argument
632 drm_fb_helper_add_damage_clip(helper, x, y, width, height); in drm_fb_helper_damage()
634 schedule_work(&helper->damage_work); in drm_fb_helper_damage()
706 struct drm_fb_helper *helper = info->par; in drm_fb_helper_deferred_io() local
733 drm_fb_helper_damage(helper, damage_area.x1, damage_area.y1, in drm_fb_helper_deferred_io()
742 * @fb_helper: driver-allocated fbdev helper, can be NULL
759 * @fb_helper: driver-allocated fbdev helper, can be NULL
1008 * @info: fbdev registered by the helper
1045 * @info: fbdev registered by the helper
1049 * A helper to implement the standard fbdev ioctl. Only
1217 * @info: fbdev registered by the helper
1312 * @info: fbdev registered by the helper
1412 * @info: fbdev registered by the helper
1734 * @fb_helper: fb helper instance to use as template
1737 * Sets up the variable and fixed fbdev metainformation from the given fb helper
1900 * as a helper to setup simple default values for the fbdev info structure.
1943 * @fb_helper: driver-allocated fbdev helper, can be NULL
1995 * drm_fb_helper_lastclose - DRM driver lastclose helper for fbdev emulation