Skip to content

Commit 41ff0b4

Browse files
Thomas ZimmermannMaarten Lankhorst
authored andcommitted
drm/fb-helper: Remove struct drm_fb_helper.fb_probe
The callback fb_probe in struct drm_fb_helper is unused. Remove it. New drivers should set struct drm_driver.fbdev_probe instead and call drm_client_setup() to instantiate in-kernel DRM clients. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Maarten Lankhorst <[email protected]>
1 parent 69acb6b commit 41ff0b4

File tree

2 files changed

+4
-21
lines changed

2 files changed

+4
-21
lines changed

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,9 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper)
16341634
struct fb_info *info;
16351635
int ret;
16361636

1637+
if (drm_WARN_ON(dev, !dev->driver->fbdev_probe))
1638+
return -EINVAL;
1639+
16371640
ret = drm_fb_helper_find_sizes(fb_helper, &sizes);
16381641
if (ret) {
16391642
/* First time: disable all crtc's.. */
@@ -1643,10 +1646,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper)
16431646
}
16441647

16451648
/* push down into drivers */
1646-
if (dev->driver->fbdev_probe)
1647-
ret = dev->driver->fbdev_probe(fb_helper, &sizes);
1648-
else if (fb_helper->funcs)
1649-
ret = fb_helper->funcs->fb_probe(fb_helper, &sizes);
1649+
ret = dev->driver->fbdev_probe(fb_helper, &sizes);
16501650
if (ret < 0)
16511651
return ret;
16521652

include/drm/drm_fb_helper.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,6 @@ struct drm_fb_helper_surface_size {
6969
* Driver callbacks used by the fbdev emulation helper library.
7070
*/
7171
struct drm_fb_helper_funcs {
72-
/**
73-
* @fb_probe:
74-
*
75-
* Driver callback to allocate and initialize the fbdev info structure.
76-
* Furthermore it also needs to allocate the DRM framebuffer used to
77-
* back the fbdev.
78-
*
79-
* This callback is mandatory.
80-
*
81-
* RETURNS:
82-
*
83-
* The driver should return 0 on success and a negative error code on
84-
* failure.
85-
*/
86-
int (*fb_probe)(struct drm_fb_helper *helper,
87-
struct drm_fb_helper_surface_size *sizes);
88-
8972
/**
9073
* @fb_dirty:
9174
*

0 commit comments

Comments
 (0)