On Mon, Jan 25, 2016 at 7:49 PM, Rob Clark <robdclark@xxxxxxxxx> wrote: > from a quick look, I think so.. > > It was something I ran across on an older kernel which didn't have > amdgpu, but I don't see anything obvious that would cause > drm_fb_helper_init() to be skipped in amdgpu if there are no > connectors.. (but nouveau seems to check for > dev->mode_config.num_crtc, for (I assume) similar reasons) We don't enable fbdev on amdgpu if the chip in question has no display block, but we still could enable it if the chip has a display block, but no connectors. The same may be true in nouveau so the check for num_crtc may not be enough. Attached patch should rectify that. Alex > > BR, > -R > > On Mon, Jan 25, 2016 at 6:57 PM, Mike Lothian <mike@xxxxxxxxxxxxxx> wrote: >> Is something similar required for AMDGPU too? >> >> On Mon, 25 Jan 2016 at 23:06 Rob Clark <robdclark@xxxxxxxxx> wrote: >>> >>> 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@xxxxxxxxx> >>> --- >>> 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@xxxxxxxxxxxxxxxxxxxxx >>> http://lists.freedesktop.org/mailman/listinfo/dri-devel > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/dri-devel
From 55a9c63c7a20f07cb77864346ac21ea962f00068 Mon Sep 17 00:00:00 2001 From: Alex Deucher <alexander.deucher@xxxxxxx> Date: Tue, 26 Jan 2016 00:30:33 -0500 Subject: [PATCH] drm/amdgpu: don't init fbdev if we don't have any connectors Don't init fbdev if we don't have connectors. E.g., if you have a PX laptop with the displays attached to an IGP with no driver support, you may end up with a blank screen rather than falling back to vesa, etc. Based on a similar radeon patch from Rob Clark. Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c index cfb6caa..9191467 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c @@ -333,6 +333,10 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev) if (!adev->mode_info.mode_config_initialized) return 0; + /* don't init fbdev if there are no connectors */ + if (list_empty(&adev->ddev->mode_config.connector_list)) + return 0; + /* select 8 bpp console on low vram cards */ if (adev->mc.real_vram_size <= (32*1024*1024)) bpp_sel = 8; -- 2.5.0
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel