// SPDX-License-Identifier: GPL-2.0-only /* * framebuffer-coreboot.c * * Memory based framebuffer accessed through coreboot table. * * Copyright 2012-2013 David Herrmann <dh.herrmann@gmail.com> * Copyright 2017 Google Inc. * Copyright 2017 Samuel Holland <samuel@sholland.org>
*/
/* * On coreboot systems, the advertised LB_TAG_FRAMEBUFFER entry * in the coreboot table should only be used if the payload did * not pass a framebuffer information to the Linux kernel. * * If the global screen_info data has been filled, the Generic * System Framebuffers (sysfb) will already register a platform * device and pass that screen_info as platform_data to a driver * that can scan-out using the system provided framebuffer.
*/ if (sysfb_handles_screen_info()) return -ENODEV;
if (!fb->physical_address) return -ENODEV;
for (i = 0; i < ARRAY_SIZE(formats); ++i) { if (fb->bits_per_pixel == formats[i].bits_per_pixel &&
fb->red_mask_pos == formats[i].red.offset &&
fb->red_mask_size == formats[i].red.length &&
fb->green_mask_pos == formats[i].green.offset &&
fb->green_mask_size == formats[i].green.length &&
fb->blue_mask_pos == formats[i].blue.offset &&
fb->blue_mask_size == formats[i].blue.length)
pdata.format = formats[i].name;
} if (!pdata.format) return -ENODEV;
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.