aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
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/i915
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/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index b04e0a86bf9a..7f1eabbaa2bb 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -128,11 +128,16 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
128 info->fbops = &intelfb_ops; 128 info->fbops = &intelfb_ops;
129 129
130 /* setup aperture base/size for vesafb takeover */ 130 /* setup aperture base/size for vesafb takeover */
131 info->aperture_base = dev->mode_config.fb_base; 131 info->apertures = alloc_apertures(1);
132 if (!info->apertures) {
133 ret = -ENOMEM;
134 goto out_unpin;
135 }
136 info->apertures->ranges[0].base = dev->mode_config.fb_base;
132 if (IS_I9XX(dev)) 137 if (IS_I9XX(dev))
133 info->aperture_size = pci_resource_len(dev->pdev, 2); 138 info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 2);
134 else 139 else
135 info->aperture_size = pci_resource_len(dev->pdev, 0); 140 info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0);
136 141
137 info->fix.smem_start = dev->mode_config.fb_base + obj_priv->gtt_offset; 142 info->fix.smem_start = dev->mode_config.fb_base + obj_priv->gtt_offset;
138 info->fix.smem_len = size; 143 info->fix.smem_len = size;