// SPDX-License-Identifier: GPL-2.0 /* * Based on the fbdev code in drivers/video/fbdev/core/fb_cmdline: * * Copyright (C) 2014 Intel Corp * Copyright (C) 1994 Martin Schaller * * 2001 - Documented with DocBook * - Brad Douglas <brad@neruo.com> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. * * Authors: * Daniel Vetter <daniel.vetter@ffwll.ch>
*/
#include <linux/fb.h> /* for FB_MAX */ #include <linux/init.h>
#include <video/cmdline.h>
/* * FB_MAX is the maximum number of framebuffer devices and also * the maximum number of video= parameters. Although not directly * related to each other, it makes sense to keep it that way.
*/ staticconstchar *video_options[FB_MAX] __read_mostly; staticconstchar *video_option __read_mostly; staticint video_of_only __read_mostly;
for (i = 0; i < ARRAY_SIZE(video_options); ++i) { if (!video_options[i]) continue; if (video_options[i][0] == '\0') continue;
opt = video_options[i]; if (!strncmp(opt, name, name_len) && opt[name_len] == ':')
options = opt + name_len + 1;
}
}
/* No match, return global options */ if (!options)
options = video_option;
return options;
}
/** * video_get_options - get kernel boot parameters * @name: name of the output as it would appear in the boot parameter * line (video=<name>:<options>) * * Looks up the video= options for the given name. Names are connector * names with DRM, or driver names with fbdev. If no video option for * the name has been specified, the function returns the global video= * setting. A @name of NULL always returns the global video setting. * * Returns: * The string of video options for the given name, or NULL if no video * option has been specified.
*/ constchar *video_get_options(constchar *name)
{ return __video_get_option_string(name);
}
EXPORT_SYMBOL(video_get_options);
/* * Process command line options for video adapters. This function is * a __setup and __init function. It only stores the options. Drivers * have to call video_get_options() as necessary.
*/ staticint __init video_setup(char *options)
{ if (!options || !*options) goto out;
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.