diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-01-26 08:30:33 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-01-26 08:35:56 +0300 |
commit | f49d45c973984eb805eb989b6220aa7c1ee30bc2 (patch) | |
tree | 6377a179ed298c3cc361389658bea4f5719d2364 /drivers/gpu | |
parent | f95429eccc570dc45d589c327bfcfddcdc3e8228 (diff) | |
download | linux-f49d45c973984eb805eb989b6220aa7c1ee30bc2.tar.xz |
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@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c index cfb6caad2a73..919146780a15 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; |