@@ -250,6 +250,7 @@ void mgag200_modeset_fini(struct mga_device *mdev);
/* mgag200_fb.c */
int mgag200_fbdev_init(struct mga_device *mdev);
void mgag200_fbdev_fini(struct mga_device *mdev);
+void mgag200_fbdev_set_base(struct mga_device *mdev, unsigned long gpu_addr);
/* mgag200_main.c */
int mgag200_framebuffer_init(struct drm_device *dev,
@@ -315,3 +315,10 @@ void mgag200_fbdev_fini(struct mga_device *mdev)
mga_fbdev_destroy(mdev->dev, mdev->mfbdev);
}
+
+void mgag200_fbdev_set_base(struct mga_device *mdev, unsigned long gpu_addr)
+{
+ mdev->mfbdev->helper.fbdev->fix.smem_start =
+ mdev->mfbdev->helper.fbdev->apertures->ranges[0].base + gpu_addr;
+ mdev->mfbdev->helper.fbdev->fix.smem_len = mdev->mc.vram_size - gpu_addr;
+}
@@ -895,7 +895,8 @@ static int mga_crtc_do_set_base(struct drm_crtc *crtc,
ret = ttm_bo_kmap(&bo->bo, 0, bo->bo.num_pages, &bo->kmap);
if (ret)
DRM_ERROR("failed to kmap fbcon\n");
-
+ else
+ mgag200_fbdev_set_base(mdev, gpu_addr);
}
mgag200_bo_unreserve(bo);