Commit 0a3bfe29 authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/fb-helper: Fix the dummy remove_conflicting_framebuffers

We always need to remove conflicting framebuffers if any other fb driver
is enabled, and not just if we are setting up an fbdev ourselves.

Unfortunately remove_conflicting_framebuffers() was incorrectly stubbed
out if !fbdev rather than !fb leading to major memory corruption (and
corrupt filesystems) upon boot.

Fixes: 44adece5 ("drm/fb-helper: Add a dummy remove_conflicting_framebuffers")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: tomi.valkeinen@ti.com
Cc: dh.herrmann@gmail.com
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160822204452.2509-1-chris@chris-wilson.co.uk
parent d1c151dc
...@@ -282,12 +282,6 @@ drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn, ...@@ -282,12 +282,6 @@ drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn,
int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector); int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector);
int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper, int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
struct drm_connector *connector); struct drm_connector *connector);
static inline int
drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
const char *name, bool primary)
{
return remove_conflicting_framebuffers(a, name, primary);
}
#else #else
static inline int drm_fb_helper_modinit(void) static inline int drm_fb_helper_modinit(void)
{ {
...@@ -482,11 +476,17 @@ drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper, ...@@ -482,11 +476,17 @@ drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
return 0; return 0;
} }
#endif
static inline int static inline int
drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a, drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
const char *name, bool primary) const char *name, bool primary)
{ {
#if IS_ENABLED(CONFIG_FB)
return remove_conflicting_framebuffers(a, name, primary);
#else
return 0; return 0;
}
#endif #endif
}
#endif #endif
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