Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon: only init fbdev if we have connectors

This fixes an issue that was noticed on an optimus/prime laptop with
a kernel that was old enough to not support the integrated intel gfx
(which was driving all the outputs), but did have support for the
discrete radeon gpu. The end result was not falling back to VESA and
leaving the user with a black screen.

(Plus it is kind of silly to create an framebuffer device if there
are no outputs hooked up to the gpu.)

Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rob Clark and committed by
Alex Deucher
f95429ec 186bac81

+4 -2
+4 -2
drivers/gpu/drm/radeon/radeon_display.c
··· 1670 1670 /* setup afmt */ 1671 1671 radeon_afmt_init(rdev); 1672 1672 1673 - radeon_fbdev_init(rdev); 1674 - drm_kms_helper_poll_init(rdev->ddev); 1673 + if (!list_empty(&rdev->ddev->mode_config.connector_list)) { 1674 + radeon_fbdev_init(rdev); 1675 + drm_kms_helper_poll_init(rdev->ddev); 1676 + } 1675 1677 1676 1678 /* do pm late init */ 1677 1679 ret = radeon_pm_late_init(rdev);