Skip to content

Commit

Permalink
fbdev: simplefb: mark as fw and allocate apertures
Browse files Browse the repository at this point in the history
fbdev-core uses FBINFO_MISC_FIRMWARE to mark drivers that use firmware
framebuffers. Furthermore, we now allocate apertures for the fbinfo
device.
Both information is used by remove_conflicting_framebuffers() to remove a
fbdev device whenever a real driver is loaded. This is used heavily on x86
for VGA/vesa/EFI framebuffers, but is also of great use for all other
systems.

Especially with x86 support for simplefb, this information is needed to
unload simplefb before a real hw-driver (like i915, radeon, nouveau) is
loaded.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Link: http://lkml.kernel.org/r/1375445127-15480-3-git-send-email-dh.herrmann@gmail.com
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
  • Loading branch information
David Herrmann authored and H. Peter Anvin committed Aug 2, 2013
1 parent 5ef76da commit df0960a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/video/simplefb.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,16 @@ static int simplefb_probe(struct platform_device *pdev)
info->var.blue = params.format->blue;
info->var.transp = params.format->transp;

info->apertures = alloc_apertures(1);
if (!info->apertures) {
framebuffer_release(info);
return -ENOMEM;
}
info->apertures->ranges[0].base = info->fix.smem_start;
info->apertures->ranges[0].size = info->fix.smem_len;

info->fbops = &simplefb_ops;
info->flags = FBINFO_DEFAULT;
info->flags = FBINFO_DEFAULT | FBINFO_MISC_FIRMWARE;
info->screen_base = devm_ioremap(&pdev->dev, info->fix.smem_start,
info->fix.smem_len);
if (!info->screen_base) {
Expand Down

0 comments on commit df0960a

Please sign in to comment.