static __init int sysfb_init(void)
{ struct screen_info *si = &screen_info; struct device *parent; unsignedint type; struct simplefb_platform_data mode; constchar *name; bool compatible; int ret = 0;
screen_info_apply_fixups();
mutex_lock(&disable_lock); if (disabled) goto unlock_mutex;
sysfb_apply_efi_quirks();
parent = sysfb_parent_dev(si); if (IS_ERR(parent)) {
ret = PTR_ERR(parent); goto unlock_mutex;
}
/* try to create a simple-framebuffer device */
compatible = sysfb_parse_mode(si, &mode); if (compatible) {
pd = sysfb_create_simplefb(si, &mode, parent); if (!IS_ERR(pd)) goto put_device;
}
type = screen_info_video_type(si);
/* if the FB is incompatible, create a legacy framebuffer device */ switch (type) { case VIDEO_TYPE_EGAC:
name = "ega-framebuffer"; break; case VIDEO_TYPE_VGAC:
name = "vga-framebuffer"; break; case VIDEO_TYPE_VLFB:
name = "vesa-framebuffer"; break; case VIDEO_TYPE_EFI:
name = "efi-framebuffer"; break; default:
name = "platform-framebuffer"; break;
}
pd = platform_device_alloc(name, 0); if (!pd) {
ret = -ENOMEM; goto put_device;
}
pd->dev.parent = parent;
sysfb_set_efifb_fwnode(pd);
ret = platform_device_add_data(pd, si, sizeof(*si)); if (ret) goto err;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.