mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 11:34:58 +00:00
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: 44adece57e ("drm/fb-helper: Add a dummy remove_conflicting_framebuffers")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Tobias Jakobi <[email protected]>
Cc: Noralf Trønnes <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
committed by
Daniel Vetter
parent
d1c151dcae
commit
0a3bfe29f8
@@ -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_remove_one_connector(struct drm_fb_helper *fb_helper,
|
||||
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
|
||||
static inline int drm_fb_helper_modinit(void)
|
||||
{
|
||||
@@ -482,11 +476,17 @@ drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
drm_fb_helper_remove_conflicting_framebuffers(struct apertures_struct *a,
|
||||
const char *name, bool primary)
|
||||
{
|
||||
#if IS_ENABLED(CONFIG_FB)
|
||||
return remove_conflicting_framebuffers(a, name, primary);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user