summaryrefslogtreecommitdiff
path: root/linux-core/drm_fb.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-05-17 09:00:06 -0700
committerJesse Barnes <jbarnes@hobbes.virtuousgeek.org>2007-05-17 09:00:06 -0700
commita18b4befb9b76c4b2662ff6caa0e4f0975eb8e9c (patch)
tree3f4b00c8c4f11f0c78fa64fcf617ea33dede28b6 /linux-core/drm_fb.c
parentb589b846e73bfe6235cd702bb8ae89701c85eaab (diff)
Fix FB pitch value (we had it wrong and were working around it in a few
places). Add new FB hooks to the drm driver structure and make i915 use them for an Intel specific FB driver. This will allow acceleration and better handling of the command stream.
Diffstat (limited to 'linux-core/drm_fb.c')
-rw-r--r--linux-core/drm_fb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/linux-core/drm_fb.c b/linux-core/drm_fb.c
index ef05341a..1eb31952 100644
--- a/linux-core/drm_fb.c
+++ b/linux-core/drm_fb.c
@@ -106,8 +106,6 @@ int drmfb_probe(struct drm_device *dev, struct drm_framebuffer *fb)
struct fb_info *info;
struct drmfb_par *par;
struct device *device = &dev->pdev->dev;
- struct fb_var_screeninfo *var_info;
- unsigned long base, size;
int ret;
info = framebuffer_alloc(sizeof(struct drmfb_par), device);
@@ -126,7 +124,7 @@ int drmfb_probe(struct drm_device *dev, struct drm_framebuffer *fb)
strcpy(info->fix.id, "drmfb");
info->fix.smem_start = fb->offset + dev->mode_config.fb_base;
- info->fix.smem_len = (8*1024*1024);
+ info->fix.smem_len = fb->bo->mem.size;
info->fix.type = FB_TYPE_PACKED_PIXELS;
info->fix.visual = FB_VISUAL_DIRECTCOLOR;
info->fix.accel = FB_ACCEL_NONE;
@@ -142,7 +140,7 @@ int drmfb_probe(struct drm_device *dev, struct drm_framebuffer *fb)
DRM_ERROR("error mapping fb: %d\n", ret);
info->screen_base = fb->virtual_base;
- info->screen_size = size;
+ info->screen_size = fb->bo->mem.size;
info->pseudo_palette = fb->pseudo_palette;
info->var.xres = fb->width;
info->var.xres_virtual = fb->pitch;