aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bios.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-06-27 03:35:53 -0400
committerBen Skeggs <bskeggs@redhat.com>2013-06-30 23:50:50 -0400
commit791dc143ed2c441f5202d8721609d94dce9fcf88 (patch)
tree216e356ae9c18704f345ec7b464af3c0050c21f8 /drivers/gpu/drm/nouveau/nouveau_bios.c
parente99716f13d3a499f95a17e5442ef39270e4fc38b (diff)
drm/nvd0-/disp: handle case where display engine is missing/disabled
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bios.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bios.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index e09817df7934..3e7287675ecf 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -2051,19 +2051,14 @@ nouveau_bios_posted(struct drm_device *dev)
2051 struct nouveau_drm *drm = nouveau_drm(dev); 2051 struct nouveau_drm *drm = nouveau_drm(dev);
2052 unsigned htotal; 2052 unsigned htotal;
2053 2053
2054 if (nv_device(drm->device)->card_type >= NV_50) { 2054 if (nv_device(drm->device)->card_type >= NV_50)
2055 if (NVReadVgaCrtc(dev, 0, 0x00) == 0 &&
2056 NVReadVgaCrtc(dev, 0, 0x1a) == 0)
2057 return false;
2058 return true; 2055 return true;
2059 }
2060 2056
2061 htotal = NVReadVgaCrtc(dev, 0, 0x06); 2057 htotal = NVReadVgaCrtc(dev, 0, 0x06);
2062 htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x01) << 8; 2058 htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x01) << 8;
2063 htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x20) << 4; 2059 htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x20) << 4;
2064 htotal |= (NVReadVgaCrtc(dev, 0, 0x25) & 0x01) << 10; 2060 htotal |= (NVReadVgaCrtc(dev, 0, 0x25) & 0x01) << 10;
2065 htotal |= (NVReadVgaCrtc(dev, 0, 0x41) & 0x01) << 11; 2061 htotal |= (NVReadVgaCrtc(dev, 0, 0x41) & 0x01) << 11;
2066
2067 return (htotal != 0); 2062 return (htotal != 0);
2068} 2063}
2069 2064