dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: only init fbdev if we have connectors
@ 2016-01-25 23:06 Rob Clark
  2016-01-25 23:57 ` Mike Lothian
  2016-01-26  5:36 ` Alex Deucher
  0 siblings, 2 replies; 5+ messages in thread
From: Rob Clark @ 2016-01-25 23:06 UTC (permalink / raw)
  To: dri-devel

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>
---
 drivers/gpu/drm/radeon/radeon_display.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 1eca0ac..f8e776c 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1670,8 +1670,10 @@ int radeon_modeset_init(struct radeon_device *rdev)
 	/* setup afmt */
 	radeon_afmt_init(rdev);
 
-	radeon_fbdev_init(rdev);
-	drm_kms_helper_poll_init(rdev->ddev);
+	if (!list_empty(&rdev->ddev->mode_config.connector_list)) {
+		radeon_fbdev_init(rdev);
+		drm_kms_helper_poll_init(rdev->ddev);
+	}
 
 	/* do pm late init */
 	ret = radeon_pm_late_init(rdev);
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-01-26  5:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25 23:06 [PATCH] drm/radeon: only init fbdev if we have connectors Rob Clark
2016-01-25 23:57 ` Mike Lothian
2016-01-26  0:49   ` Rob Clark
2016-01-26  5:34     ` Alex Deucher
2016-01-26  5:36 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).