|
|
|
/* ply-device-manager.h - udev monitor
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
* 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
#ifndef PLY_DEVICE_MANAGER_H
|
|
|
|
#define PLY_DEVICE_MANAGER_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#include "ply-keyboard.h"
|
|
|
|
#include "ply-pixel-display.h"
|
|
|
|
#include "ply-renderer.h"
|
|
|
|
#include "ply-text-display.h"
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
PLY_DEVICE_MANAGER_FLAGS_NONE = 0,
|
|
|
|
PLY_DEVICE_MANAGER_FLAGS_IGNORE_SERIAL_CONSOLES = 1 << 0,
|
device-manager: skip graphical renderer setup when details forced
If neither "rhgb" nor "splash" is on the kernel cmdline, then
plymouth forces the "details" splash. This splash is merely
a passthrough plugin, where it makes boot looks like plymouth
isn't even running.
In this case, the code sets PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV.
The idea is to not bother waiting for udev events notifying
plymouth when graphics devices show up, since it doesn't need
to use the grpahics devices directly anyway.
Unfortunately, it does still erroneously try to setup graphical
renderers in this case, including the /dev/fb renderer.
Before commit e4f86e3c, these graphical renderers failed because
they were given the wrong device name, but since that fix, they're
suceeding. We definitely don't want the /dev/fb renderer to
load if we're ignoring udev on efi systems, since during very
early boot /dev/fb is backed by efifb, something we never want to
use. efifb is supposed to get replaced during the boot process
by other fb implementations like say radeondrmfb, virtiodrmfb or
bochsdrmfb, and some of those implementations can't handle the
transition if /dev/fb is open at switchover time.
This commit adds a new flag to tell the device manager to
not bother trying to setup graphical renderers when details are
forced.
http://bugzilla.redhat.com/1518464
6 years ago
|
|
|
PLY_DEVICE_MANAGER_FLAGS_IGNORE_UDEV = 1 << 1,
|
|
|
|
PLY_DEVICE_MANAGER_FLAGS_SKIP_RENDERERS = 1 << 2
|
|
|
|
} ply_device_manager_flags_t;
|
|
|
|
|
|
|
|
typedef struct _ply_device_manager ply_device_manager_t;
|
|
|
|
typedef void (* ply_keyboard_added_handler_t) (void *, ply_keyboard_t *);
|
|
|
|
typedef void (* ply_keyboard_removed_handler_t) (void *, ply_keyboard_t *);
|
|
|
|
typedef void (* ply_pixel_display_added_handler_t) (void *, ply_pixel_display_t *);
|
|
|
|
typedef void (* ply_pixel_display_removed_handler_t) (void *, ply_pixel_display_t *);
|
|
|
|
typedef void (* ply_text_display_added_handler_t) (void *, ply_text_display_t *);
|
|
|
|
typedef void (* ply_text_display_removed_handler_t) (void *, ply_text_display_t *);
|
|
|
|
|
|
|
|
#ifndef PLY_HIDE_FUNCTION_DECLARATIONS
|
|
|
|
ply_device_manager_t *ply_device_manager_new (const char *default_tty,
|
|
|
|
ply_device_manager_flags_t flags);
|
|
|
|
void ply_device_manager_watch_devices (ply_device_manager_t *manager,
|
|
|
|
double fb_device_timeout,
|
|
|
|
double device_timeout,
|
|
|
|
ply_keyboard_added_handler_t keyboard_added_handler,
|
|
|
|
ply_keyboard_removed_handler_t keyboard_removed_handler,
|
|
|
|
ply_pixel_display_added_handler_t pixel_display_added_handler,
|
|
|
|
ply_pixel_display_removed_handler_t pixel_display_removed_handler,
|
|
|
|
ply_text_display_added_handler_t text_display_added_handler,
|
|
|
|
ply_text_display_removed_handler_t text_display_removed_handler,
|
|
|
|
void *data);
|
|
|
|
void ply_device_manager_pause (ply_device_manager_t *manager);
|
|
|
|
void ply_device_manager_unpause (ply_device_manager_t *manager);
|
|
|
|
bool ply_device_manager_has_serial_consoles (ply_device_manager_t *manager);
|
|
|
|
bool ply_device_manager_has_displays (ply_device_manager_t *manager);
|
|
|
|
ply_list_t *ply_device_manager_get_keyboards (ply_device_manager_t *manager);
|
|
|
|
ply_list_t *ply_device_manager_get_pixel_displays (ply_device_manager_t *manager);
|
|
|
|
ply_list_t *ply_device_manager_get_text_displays (ply_device_manager_t *manager);
|
|
|
|
void ply_device_manager_free (ply_device_manager_t *manager);
|
|
|
|
void ply_device_manager_activate_keyboards (ply_device_manager_t *manager);
|
|
|
|
void ply_device_manager_deactivate_keyboards (ply_device_manager_t *manager);
|
|
|
|
void ply_device_manager_activate_renderers (ply_device_manager_t *manager);
|
|
|
|
void ply_device_manager_deactivate_renderers (ply_device_manager_t *manager);
|
|
|
|
ply_terminal_t *ply_device_manager_get_default_terminal (ply_device_manager_t *manager);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
/* vim: set ts=4 sw=4 expandtab autoindent cindent cino={.5s,(0: */
|