aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
diff options
context:
space:
mode:
authorMarcin Slusarz <marcin.slusarz@gmail.com>2010-05-16 11:27:03 -0400
committerDave Airlie <airlied@redhat.com>2010-05-18 02:19:27 -0400
commit1471ca9aa71cd37b6a7476bb6f06a3a8622ea1bd (patch)
tree3bf5ef9fea79b0b92220cfcc3842db7afb5cd63d /drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
parent3da1f33e79a5922c1a31077e7b33aba1cec19b94 (diff)
fbdev: allow passing more than one aperture for handoff
It removes a hack from nouveau code which had to detect which region to pass to kick vesafb/efifb. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Dave Airlie <airlied@redhat.com> Cc: Peter Jones <pjones@redhat.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_fb.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_fb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
index 80125ffc4e28..7421aaad8d09 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
@@ -559,8 +559,13 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
559 info->pixmap.scan_align = 1; 559 info->pixmap.scan_align = 1;
560#endif 560#endif
561 561
562 info->aperture_base = vmw_priv->vram_start; 562 info->apertures = alloc_apertures(1);
563 info->aperture_size = vmw_priv->vram_size; 563 if (!info->apertures) {
564 ret = -ENOMEM;
565 goto err_aper;
566 }
567 info->apertures->ranges[0].base = vmw_priv->vram_start;
568 info->apertures->ranges[0].size = vmw_priv->vram_size;
564 569
565 /* 570 /*
566 * Dirty & Deferred IO 571 * Dirty & Deferred IO
@@ -580,6 +585,7 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
580 585
581err_defio: 586err_defio:
582 fb_deferred_io_cleanup(info); 587 fb_deferred_io_cleanup(info);
588err_aper:
583 ttm_bo_kunmap(&par->map); 589 ttm_bo_kunmap(&par->map);
584err_unref: 590err_unref:
585 ttm_bo_unref((struct ttm_buffer_object **)&par->vmw_bo); 591 ttm_bo_unref((struct ttm_buffer_object **)&par->vmw_bo);