Skip to content

Commit 1c74ca7

Browse files
committed
drm/fb-helper: call vga_remove_vgacon automatically.
Add vga_remove_vgacon() call to drm_fb_helper_remove_conflicting_pci_framebuffers(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190301092502.30948-3-kraxel@redhat.com
1 parent c6b38fb commit 1c74ca7

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

include/drm/drm_fb_helper.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ struct drm_fb_helper;
3636
#include <drm/drm_crtc.h>
3737
#include <drm/drm_device.h>
3838
#include <linux/kgdb.h>
39+
#include <linux/vgaarb.h>
3940

4041
enum mode_set_atomic {
4142
LEAVE_ATOMIC_MODE_SET,
@@ -642,11 +643,18 @@ drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
642643
int resource_id,
643644
const char *name)
644645
{
646+
int ret = 0;
647+
648+
/*
649+
* WARNING: Apparently we must kick fbdev drivers before vgacon,
650+
* otherwise the vga fbdev driver falls over.
651+
*/
645652
#if IS_REACHABLE(CONFIG_FB)
646-
return remove_conflicting_pci_framebuffers(pdev, resource_id, name);
647-
#else
648-
return 0;
653+
ret = remove_conflicting_pci_framebuffers(pdev, resource_id, name);
649654
#endif
655+
if (ret == 0)
656+
ret = vga_remove_vgacon(pdev);
657+
return ret;
650658
}
651659

652660
#endif

0 commit comments

Comments
 (0)