aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_fb.c
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2010-12-20 14:10:39 -0500
committerDave Airlie <airlied@redhat.com>2010-12-20 21:49:44 -0500
commit57084d05379fe5c081d024006129b0565a11855f (patch)
treeff13b1d40642d7ff8d1b3215bad93554a5a42af5 /drivers/gpu/drm/i915/intel_fb.c
parentb08ebe7e776e5be0271ed1e1bbb384e1f29dd117 (diff)
drm/fb: Don't expose mmio for fbdev emulation layer
For the fbdev api if the struct fb_var_screeninfo accel_flags field is set to FB_ACCELF_TEXT then userland applications can not mmap the mmio region. Since it is a bad idea for DRM drivers to expose the mmio region via the fbdev layer we always set the accel_flags to prevent this. Please apply. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fb.c')
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index af2a1dddc28e..ced3eef8da07 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -68,7 +68,7 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
68 struct drm_gem_object *fbo = NULL; 68 struct drm_gem_object *fbo = NULL;
69 struct drm_i915_gem_object *obj_priv; 69 struct drm_i915_gem_object *obj_priv;
70 struct device *device = &dev->pdev->dev; 70 struct device *device = &dev->pdev->dev;
71 int size, ret, mmio_bar = IS_GEN2(dev) ? 1 : 0; 71 int size, ret;
72 72
73 /* we don't do packed 24bpp */ 73 /* we don't do packed 24bpp */
74 if (sizes->surface_bpp == 24) 74 if (sizes->surface_bpp == 24)
@@ -156,10 +156,6 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
156 drm_fb_helper_fill_fix(info, fb->pitch, fb->depth); 156 drm_fb_helper_fill_fix(info, fb->pitch, fb->depth);
157 drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height); 157 drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height);
158 158
159 /* FIXME: we really shouldn't expose mmio space at all */
160 info->fix.mmio_start = pci_resource_start(dev->pdev, mmio_bar);
161 info->fix.mmio_len = pci_resource_len(dev->pdev, mmio_bar);
162
163 info->pixmap.size = 64*1024; 159 info->pixmap.size = 64*1024;
164 info->pixmap.buf_align = 8; 160 info->pixmap.buf_align = 8;
165 info->pixmap.access_align = 32; 161 info->pixmap.access_align = 32;