diff options
author | Noralf Trønnes <noralf@tronnes.org> | 2017-12-15 12:51:16 -0500 |
---|---|---|
committer | Noralf Trønnes <noralf@tronnes.org> | 2017-12-20 08:51:31 -0500 |
commit | 95b0137f28a420ac02826e674286bc363dd7c196 (patch) | |
tree | 020b345b77539e34312b7fb30f2a115be75e9a0e | |
parent | ee05baa0bfe634f747b51c44e1f9355c5ff2e64e (diff) |
drm/fb-helper: Update DOC with new helpers
Promote new helpers for dealing with fbdev emulation.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20171215175119.36181-5-noralf@tronnes.org
-rw-r--r-- | drivers/gpu/drm/drm_fb_helper.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 823fc8f50d85..e3eb3c9a98e3 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
@@ -66,19 +66,23 @@ static DEFINE_MUTEX(kernel_fb_helper_lock); | |||
66 | * helper functions used by many drivers to implement the kernel mode setting | 66 | * helper functions used by many drivers to implement the kernel mode setting |
67 | * interfaces. | 67 | * interfaces. |
68 | * | 68 | * |
69 | * Initialization is done as a four-step process with drm_fb_helper_prepare(), | 69 | * Setup fbdev emulation by calling drm_fb_helper_fbdev_setup() and tear it |
70 | * drm_fb_helper_init(), drm_fb_helper_single_add_all_connectors() and | 70 | * down by calling drm_fb_helper_fbdev_teardown(). |
71 | * drm_fb_helper_initial_config(). Drivers with fancier requirements than the | ||
72 | * default behaviour can override the third step with their own code. | ||
73 | * Teardown is done with drm_fb_helper_fini() after the fbdev device is | ||
74 | * unregisters using drm_fb_helper_unregister_fbi(). | ||
75 | * | 71 | * |
76 | * At runtime drivers should restore the fbdev console by calling | 72 | * Drivers that need to handle connector hotplugging (e.g. dp mst) can't use |
77 | * drm_fb_helper_restore_fbdev_mode_unlocked() from their &drm_driver.lastclose | 73 | * the setup helper and will need to do the whole four-step setup process with |
78 | * callback. They should also notify the fb helper code from updates to the | 74 | * drm_fb_helper_prepare(), drm_fb_helper_init(), |
79 | * output configuration by calling drm_fb_helper_hotplug_event(). For easier | 75 | * drm_fb_helper_single_add_all_connectors(), enable hotplugging and |
80 | * integration with the output polling code in drm_crtc_helper.c the modeset | 76 | * drm_fb_helper_initial_config() to avoid a possible race window. |
81 | * code provides a &drm_mode_config_funcs.output_poll_changed callback. | 77 | * |
78 | * At runtime drivers should restore the fbdev console by using | ||
79 | * drm_fb_helper_lastclose() as their &drm_driver.lastclose callback. | ||
80 | * They should also notify the fb helper code from updates to the output | ||
81 | * configuration by using drm_fb_helper_output_poll_changed() as their | ||
82 | * &drm_mode_config_funcs.output_poll_changed callback. | ||
83 | * | ||
84 | * For suspend/resume consider using drm_mode_config_helper_suspend() and | ||
85 | * drm_mode_config_helper_resume() which takes care of fbdev as well. | ||
82 | * | 86 | * |
83 | * All other functions exported by the fb helper library can be used to | 87 | * All other functions exported by the fb helper library can be used to |
84 | * implement the fbdev driver interface by the driver. | 88 | * implement the fbdev driver interface by the driver. |