From: Hans de Goede Date: Mon, 21 Jan 2019 14:41:37 +0000 (+0100) Subject: drm: Stop limiting preferred-mode picking to UEFI systems X-Git-Tag: 0.9.5~76^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccdb1d1fe1f99523d570b4e37cc14401c3891b9a;p=thirdparty%2Fplymouth.git drm: Stop limiting preferred-mode picking to UEFI systems When the code to pick the preferred-mode for outputs was first added, it was limited to UEFI systems, since it was necessary there. It was not enabled everywhere right away because there were some worries it might cause regressions. We've been shipping this for a while now and no regressions have been reported, moreover with the new hotplug support we really want to pick the preferred-mode rather then falling back to the first mode in the list. Therefor this commits removes the check for UEFI systems from should_use_preferred_mode(). Signed-off-by: Hans de Goede --- diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c index cb228f60..0151f473 100644 --- a/src/plugins/renderers/drm/plugin.c +++ b/src/plugins/renderers/drm/plugin.c @@ -172,19 +172,9 @@ static bool reset_scan_out_buffer_if_needed (ply_renderer_backend_t *backend, static void flush_head (ply_renderer_backend_t *backend, ply_renderer_head_t *head); -static bool efi_enabled (void) -{ - return ply_directory_exists ("/sys/firmware/efi/efivars"); -} - /* A small helper to determine if we should try to keep the current mode - * or pick the best mode ourselves, we keep the current mode if: - * 1. The user specified a specific mode using video= on the commandline - * 2. The code to pick the best mode was added because with flicker-free boot - * we can no longer rely on the kernel's fbcon code setting things up. - * We should be able to do a better job then fbcon regardless, but for - * now lets only use the new code on flicker-free systems until it is - * more mature, this means only using it on UEFI systems. + * or pick the best mode ourselves, we keep the current mode only if the + * user specified a specific mode using video= on the commandline. */ static bool should_use_preferred_mode (void) @@ -194,9 +184,6 @@ should_use_preferred_mode (void) if (ply_kernel_command_line_get_string_after_prefix ("video=")) use_preferred_mode = false; - if (!efi_enabled ()) - use_preferred_mode = false; - ply_trace ("should_use_preferred_mode: %d", use_preferred_mode); return use_preferred_mode;