Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -1947,3 +1947,23 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
return 0;
}
EXPORT_SYMBOL(drm_fb_helper_hotplug_event);

/**
* drm_fb_helper_lastclose - DRM driver lastclose helper for fbdev emulation
* @dev: DRM device
*
* This function is obsolete. Call drm_fb_helper_restore_fbdev_mode_unlocked()
* instead.
*
* Compatibility helper for out-of-tree modules. Upstream commit
* 943240d342f1 ("drm/client: Pass force parameter to client restore")
* inlined the helper into the client restore path and dropped the exported
* symbol, so modules written against the old interface fail to build with
* an implicit declaration. Restore the device's fbdev configuration as the
* original helper did.
*/
void drm_fb_helper_lastclose(struct drm_device *dev)
{
drm_fb_helper_restore_fbdev_mode_unlocked(dev->fb_helper, false);
}
EXPORT_SYMBOL(drm_fb_helper_lastclose);
7 changes: 7 additions & 0 deletions include/drm/drm_fb_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
int drm_fb_helper_initial_config(struct drm_fb_helper *fb_helper);
int drm_fb_helper_debug_enter(struct fb_info *info);
int drm_fb_helper_debug_leave(struct fb_info *info);

/* Compatibility helper for out-of-tree modules; see drm_fb_helper.c */
void drm_fb_helper_lastclose(struct drm_device *dev);
#else
static inline void drm_fb_helper_prepare(struct drm_device *dev,
struct drm_fb_helper *helper,
Expand Down Expand Up @@ -397,6 +400,10 @@ static inline int drm_fb_helper_debug_leave(struct fb_info *info)
{
return 0;
}

static inline void drm_fb_helper_lastclose(struct drm_device *dev)
{
}
#endif

/*
Expand Down
Loading