aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_fbcon.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2010-05-16 11:29:56 -0400
committerDave Airlie <airlied@redhat.com>2010-05-18 02:19:28 -0400
commit06415c564fb98562a4d6b6215615deb2d1cc0dae (patch)
tree93982221251bc68eb292a07da72220a0c90d94f0 /drivers/gpu/drm/nouveau/nouveau_fbcon.c
parent1471ca9aa71cd37b6a7476bb6f06a3a8622ea1bd (diff)
fbmem, drm/nouveau: kick firmware framebuffers as soon as possible
Currently vesafb/efifb/... is kicked when hardware driver is registering framebuffer. To do it hardware must be fully functional, so there's a short window between start of initialisation and framebuffer registration when two drivers touch the hardware. Unfortunately sometimes it breaks nouveau initialisation. Fix it by kicking firmware driver(s) before we start touching the hardware. Reported-by: Didier Spaier <didier.spaier@epsm.fr> Tested-by: Didier Spaier <didier.spaier@epsm.fr> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Peter Jones <pjones@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_fbcon.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fbcon.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 292c7ff9510..2c2199329cc 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -183,7 +183,6 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
183 struct drm_mode_fb_cmd mode_cmd; 183 struct drm_mode_fb_cmd mode_cmd;
184 struct pci_dev *pdev = dev->pdev; 184 struct pci_dev *pdev = dev->pdev;
185 struct device *device = &pdev->dev; 185 struct device *device = &pdev->dev;
186 struct apertures_struct *aper;
187 int size, ret; 186 int size, ret;
188 187
189 mode_cmd.width = sizes->surface_width; 188 mode_cmd.width = sizes->surface_width;
@@ -267,28 +266,12 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
267 info->fix.mmio_len = pci_resource_len(pdev, 1); 266 info->fix.mmio_len = pci_resource_len(pdev, 1);
268 267
269 /* Set aperture base/size for vesafb takeover */ 268 /* Set aperture base/size for vesafb takeover */
270 aper = info->apertures = alloc_apertures(3); 269 info->apertures = dev_priv->apertures;
271 if (!info->apertures) { 270 if (!info->apertures) {
272 ret = -ENOMEM; 271 ret = -ENOMEM;
273 goto out_unref; 272 goto out_unref;
274 } 273 }
275 274
276 aper->ranges[0].base = pci_resource_start(pdev, 1);
277 aper->ranges[0].size = pci_resource_len(pdev, 1);
278 aper->count = 1;
279
280 if (pci_resource_len(pdev, 2)) {
281 aper->ranges[aper->count].base = pci_resource_start(pdev, 2);
282 aper->ranges[aper->count].size = pci_resource_len(pdev, 2);
283 aper->count++;
284 }
285
286 if (pci_resource_len(pdev, 3)) {
287 aper->ranges[aper->count].base = pci_resource_start(pdev, 3);
288 aper->ranges[aper->count].size = pci_resource_len(pdev, 3);
289 aper->count++;
290 }
291
292 info->pixmap.size = 64*1024; 275 info->pixmap.size = 64*1024;
293 info->pixmap.buf_align = 8; 276 info->pixmap.buf_align = 8;
294 info->pixmap.access_align = 32; 277 info->pixmap.access_align = 32;