Commit 8df39400 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/fbdev-helper: Update documentation on obsolete callbacks

The old callbacks lastclose and output_poll_changed are deprecated and
unused. Remove them from the documentation.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20240812083000.337744-7-tzimmermann@suse.de
parent 17674d66
...@@ -89,14 +89,6 @@ static DEFINE_MUTEX(kernel_fb_helper_lock); ...@@ -89,14 +89,6 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
* interfaces. Drivers that use one of the shared memory managers, TTM, SHMEM, * interfaces. Drivers that use one of the shared memory managers, TTM, SHMEM,
* DMA, should instead use the corresponding fbdev emulation. * DMA, should instead use the corresponding fbdev emulation.
* *
* Existing fbdev implementations should restore the fbdev console by using
* drm_fb_helper_lastclose() as their &drm_driver.lastclose callback.
* They should also notify the fb helper code from updates to the output
* configuration by using drm_fb_helper_output_poll_changed() as their
* &drm_mode_config_funcs.output_poll_changed callback. New implementations
* of fbdev should be build on top of struct &drm_client_funcs, which handles
* this automatically. Setting the old callbacks should be avoided.
*
* For suspend/resume consider using drm_mode_config_helper_suspend() and * For suspend/resume consider using drm_mode_config_helper_suspend() and
* drm_mode_config_helper_resume() which takes care of fbdev as well. * drm_mode_config_helper_resume() which takes care of fbdev as well.
* *
...@@ -260,12 +252,12 @@ __drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper, ...@@ -260,12 +252,12 @@ __drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper,
* drm_fb_helper_restore_fbdev_mode_unlocked - restore fbdev configuration * drm_fb_helper_restore_fbdev_mode_unlocked - restore fbdev configuration
* @fb_helper: driver-allocated fbdev helper, can be NULL * @fb_helper: driver-allocated fbdev helper, can be NULL
* *
* This should be called from driver's drm &drm_driver.lastclose callback * This helper should be called from fbdev emulation's &drm_client_funcs.restore
* when implementing an fbcon on top of kms using this helper. This ensures that * callback. It ensures that the user isn't greeted with a black screen when the
* the user isn't greeted with a black screen when e.g. X dies. * userspace compositor releases the display device.
* *
* RETURNS: * Returns:
* Zero if everything went ok, negative error code otherwise. * 0 on success, or a negative errno code otherwise.
*/ */
int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper) int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
{ {
...@@ -2003,8 +1995,8 @@ EXPORT_SYMBOL(drm_fb_helper_hotplug_event); ...@@ -2003,8 +1995,8 @@ EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
* drm_fb_helper_lastclose - DRM driver lastclose helper for fbdev emulation * drm_fb_helper_lastclose - DRM driver lastclose helper for fbdev emulation
* @dev: DRM device * @dev: DRM device
* *
* This function can be used as the &drm_driver->lastclose callback for drivers * This function is obsolete. Call drm_fb_helper_restore_fbdev_mode_unlocked()
* that only need to call drm_fb_helper_restore_fbdev_mode_unlocked(). * instead.
*/ */
void drm_fb_helper_lastclose(struct drm_device *dev) void drm_fb_helper_lastclose(struct drm_device *dev)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment