|
@@ -224,12 +224,28 @@ unreference:
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef CONFIG_DRM_FBDEV_EMULATION
|
|
#ifdef CONFIG_DRM_FBDEV_EMULATION
|
|
|
|
+static int tegra_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
|
|
|
+{
|
|
|
|
+ struct drm_fb_helper *helper = info->par;
|
|
|
|
+ struct tegra_bo *bo;
|
|
|
|
+ int err;
|
|
|
|
+
|
|
|
|
+ bo = tegra_fb_get_plane(helper->fb, 0);
|
|
|
|
+
|
|
|
|
+ err = drm_gem_mmap_obj(&bo->gem, bo->gem.size, vma);
|
|
|
|
+ if (err < 0)
|
|
|
|
+ return err;
|
|
|
|
+
|
|
|
|
+ return __tegra_gem_mmap(&bo->gem, vma);
|
|
|
|
+}
|
|
|
|
+
|
|
static struct fb_ops tegra_fb_ops = {
|
|
static struct fb_ops tegra_fb_ops = {
|
|
.owner = THIS_MODULE,
|
|
.owner = THIS_MODULE,
|
|
DRM_FB_HELPER_DEFAULT_OPS,
|
|
DRM_FB_HELPER_DEFAULT_OPS,
|
|
.fb_fillrect = drm_fb_helper_sys_fillrect,
|
|
.fb_fillrect = drm_fb_helper_sys_fillrect,
|
|
.fb_copyarea = drm_fb_helper_sys_copyarea,
|
|
.fb_copyarea = drm_fb_helper_sys_copyarea,
|
|
.fb_imageblit = drm_fb_helper_sys_imageblit,
|
|
.fb_imageblit = drm_fb_helper_sys_imageblit,
|
|
|
|
+ .fb_mmap = tegra_fb_mmap,
|
|
};
|
|
};
|
|
|
|
|
|
static int tegra_fbdev_probe(struct drm_fb_helper *helper,
|
|
static int tegra_fbdev_probe(struct drm_fb_helper *helper,
|