aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/drm/drm_fb_helper.h
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2017-12-15 18:51:14 +0100
committerNoralf Trønnes <noralf@tronnes.org>2017-12-20 14:50:48 +0100
commit8741216396b2611142d7a890d06b7040ff585b3f (patch)
treeebb9cf8487f1c4b30dc1b65077ba2d59db12a322 /include/drm/drm_fb_helper.h
parentdrm/fb-helper: Set/clear dev->fb_helper in dummy init/fini (diff)
downloadwireguard-linux-8741216396b2611142d7a890d06b7040ff585b3f.tar.xz
wireguard-linux-8741216396b2611142d7a890d06b7040ff585b3f.zip
drm/fb-helper: Add drm_fb_helper_fbdev_setup/teardown()
Add helpers to setup and teardown 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-3-noralf@tronnes.org
Diffstat (limited to 'include/drm/drm_fb_helper.h')
-rw-r--r--include/drm/drm_fb_helper.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 1bd624579db7..aa78ac3b8ad0 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -320,6 +320,13 @@ int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_
int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
struct drm_connector *connector);
+int drm_fb_helper_fbdev_setup(struct drm_device *dev,
+ struct drm_fb_helper *fb_helper,
+ const struct drm_fb_helper_funcs *funcs,
+ unsigned int preferred_bpp,
+ unsigned int max_conn_count);
+void drm_fb_helper_fbdev_teardown(struct drm_device *dev);
+
void drm_fb_helper_lastclose(struct drm_device *dev);
void drm_fb_helper_output_poll_changed(struct drm_device *dev);
#else
@@ -525,6 +532,24 @@ drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
return 0;
}
+static inline int
+drm_fb_helper_fbdev_setup(struct drm_device *dev,
+ struct drm_fb_helper *fb_helper,
+ const struct drm_fb_helper_funcs *funcs,
+ unsigned int preferred_bpp,
+ unsigned int max_conn_count)
+{
+ /* So drivers can use it to free the struct */
+ dev->fb_helper = fb_helper;
+
+ return 0;
+}
+
+static inline void drm_fb_helper_fbdev_teardown(struct drm_device *dev)
+{
+ dev->fb_helper = NULL;
+}
+
static inline void drm_fb_helper_lastclose(struct drm_device *dev)
{
}