Commit graph

2370 commits

Author SHA1 Message Date
Ray Strode
8c42f8e1ff Merge branch 'fix-99' into 'master'
two-step: Center message text within labels if labels are centered

Closes #99

See merge request plymouth/plymouth!103
2020-04-06 18:23:46 +00:00
Daniel van Vugt
7a63f395d3 two-step: Center message text within labels if labels are centered
This makes a difference when you start rendering multiple lines in
a single label. For a single line label you won't see any difference.

Closes: https://gitlab.freedesktop.org/plymouth/plymouth/-/issues/99
2020-04-06 18:23:40 +00:00
Ray Strode
451aad42ea Merge branch 'master' into 'master'
Added Indonesian translation

See merge request plymouth/plymouth!107
2020-04-06 18:20:51 +00:00
Andika Triwidada
1d6c2feec4 po: add Indonesian translation 2020-04-06 18:20:51 +00:00
Hans de Goede
e31c81f984 Merge branch 'drm-probe-speedups' into 'master'
drm/kms probe speedups

See merge request plymouth/plymouth!101
2020-03-25 19:27:11 +00:00
Hans de Goede
3aa76fcd87 drm: Do not unnecessarily get output info twice
When a kernel-mode-setting driver loads it will trigger an add udev event
for /dev/dri/card0, followed by one udev change event per connector on the
card. This means that after our initial probe of the card,
create_heads_for_active_connectors is called a number of times for all the
udev change events.

After the initial enum our outputs array will contain active entries for
all connected displays. Meaning that the first loop in
create_heads_for_active_connectors would call get_output_info for
these outputs. Under the hood this does a number of ioctls and especially
the drmModeGetConnector call can be quite expensive.

Then in the second loop create_heads_for_active_connectors would call
get_output_info for all connectors, including for the once which were
checked in the first loop.

There is no reason why we cannot check if active connectors in the
old outputs array have changed when we are calling get_output_info for
all connectors to build the new array. This avoids unnecessarily making
the expensive get_output_info call twice for active connectors in the
old outputs array.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-25 18:14:54 +01:00
Hans de Goede
b127363982 ply-device-manager: Only consume one udev event at a time
Commit f9e376797a ("ply-device-manager: Consume all events in one go")
changed ply-device-manager to consume all pending udev events in one go
instead of consuming only 1 and then returning back to the mainloop.

The idea here was to avoid the overhead of returning back to the mainloop,
doing the poll again, seeing more events were pending and then re-enter
ply-device-manager.

In retrospect this is not a good idea. Systemd waits for oneshot units
like plymouth-switch-root.service to finish and this can block the boot.
Specifically plymouth-switch-root.service must complete before systemd in
the initrd will exec the systemd from the real rootfs. This means that
systemd inside the initrd waits for the:

ExecStart=-/usr/bin/plymouth update-root-fs --new-root-dir=/sysroot

Command to complete, if this command runs while we are consuming udev
events from the graphics card (which sends a change event per probed
connector during the initial probe), then plymouth will not send the ack
to the plymouth boot-client (completing the ExecStart) until all udev
events are consumed.

On my main workstation with i915 graphics and 2 HDMI connected FHD monitors,
this delays the actual switching of the root by 1.9 - 2.1 seconds,
because the re-enumaration of the connectors in the drm plugin takes
about 0.4 seconds per run.

Other upcoming changes will greatly reduce that 0.4 seconds, but still
returning to the main-loop after a single udev event so that we can
answer any waiting boot-clients ASAP is a good idea.

This reverts commit f9e376797a.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-25 00:00:06 +01:00
Hans de Goede
f7358f1535 Merge branch 'two-step-end-animation-fix' into 'master'
two-step: Do not jump to end-animation on halt/reboot if it is disabled

See merge request plymouth/plymouth!100
2020-03-24 18:29:37 +00:00
Hans de Goede
69ddb497e2 two-step: Do not jump to end-animation on halt/reboot if it is disabled
If the end-animation is disabled then directly becoming idle on halt /
reboot leads to no animation at all being shown.

Fix this by not jumping to the end-animation on halt/reboot if the
end-animation is disabled.

Fixes: 50c619ed41 ("two-step: Add UseEndAnimation setting")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-23 19:16:05 +00:00
Hans de Goede
e0a90f8ad5 Merge branch 'systemd-RemainAfterExit' into 'master'
Add RemainAfterExit=yes to plymouth's systemd service files

See merge request plymouth/plymouth!99
2020-03-23 19:15:41 +00:00
Hans de Goede
75fc290c24 Add RemainAfterExit=yes to plymouth's systemd service files
All plymouth's systemd unit files are meant to only run once, either during
boot or during shutdown/restart.

Certain events cause systemd to recheck the dependency try between systemd
units. Systemd had a bug before the 245 release which caused this check to
sometimes not restart exited services for which the dependencies are met.

Systemd 245 fixes this, this is causing problems with plymouth.
When the conditions are met for systemd to recheck the dependencies;
and the plymouthd started by plymouth-start.service has exited;
then systemd will restart the plymouth-start unit, causing plymouthd to
take over tty1 after boot. This is causing various problems, also see:

https://bugzilla.redhat.com/show_bug.cgi?id=1803293

Since all plymouth's systemd units are intended to run only once, they
all should be marked as remaining after exit by adding:
"RemainAfterExit=yes" to them. This causes systemd to still consider them
running after e.g. plymouthd has exited, as long as they have started
successfully. This fixes systemd restarting plymouth's units when it
should not do so.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1803293
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1807771
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-23 17:22:46 +01:00
Hans de Goede
ba8483fc2c Merge branch 'twostep-end-animation' into 'master'
two-step: Add UseEndAnimation setting

See merge request plymouth/plymouth!94
2020-03-11 19:23:44 +00:00
Hans de Goede
50c619ed41 two-step: Add UseEndAnimation setting
We try to start the end animation early based on our progress accounting
but this is highly unreliable because e.g.:
-It counts time to enter the diskcrypt passwd as normal boot time, while
 this varies wildly from boot to boot
-Boot times for laptops can differ significantly between docked / undocked
 state

Between gdm calling /bin/plymouth deactivate and the drm plugin's deactivate
method getting called there can be e.g. 2.1 seconds (from a random boot),
with a theoretical maximum of 3 seconds (2 seconds to finish the throbber +
1 second for the end animation).

On a modern system userland boot should be able to finish in say 5 seconds,
making gdm wait an additional 1 - 3 seconds for deactivation is a huge amount
of extra wait time!

This commit adds a new "UseEndAnimation" option to the two-step plugin,
which defaults to true. Setting this to false makes deactivation immediate.

This works nicely with the spinner (and bgrt) themes since we do not really
do anything special in the end animation there anyways and since we fade-over
into gdm things will still look ok, while shaving a signifcant chunk of our
boot time.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-11 19:22:31 +00:00
Ray Strode
16997ce639 Merge branch 'script-image-crop' into 'master'
script: add Image.Crop(x, y, width, height)

See merge request plymouth/plymouth!98
2020-03-11 13:44:35 +00:00
J-P Nurmi
f4cf64abfd script: add Image.Crop(x, y, width, height)
The script plugin currently allows pixel buffers to be resized and
scaled, but provides no mechanism for script theme authors to just crop
the buffer, which is necessary for images that cannot be stretched,
such as progress bars with gradients.

This commit adds that feature as a new Crop method.
2020-03-11 13:44:05 +00:00
Ray Strode
ae2fedb1eb Merge branch 'drm-hotplug-fixes' into 'master'
Drm hotplug fixes

See merge request plymouth/plymouth!92
2020-03-10 23:51:41 +00:00
Hans de Goede
1535655ee4 ply-throbber: Do not redraw when we need to stop throbbing on free
One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.

Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.

ply-throbber is the only (older) widget which does a redraw on free,
this likely was not noticed until now because typically the throbber
will already have been stopped on free.

This commit adds a redraw parameter to ply_throbber_stop_now and sets
this to false when calling ply_throbber_stop_now from ply_throbber_free.
This fixes plymouth sometimes crashing when monitors are hot(un)plugged
while plymouth is running.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-10 23:51:38 +00:00
Hans de Goede
3fad53add0 ply-keymap-icon: Do not draw on free
One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.

Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.

ply-keymap-icon is a recently added widget, none of the other
(older) widgets redraw themselves as hidden on free because there is
no reason to do this.

This commit removes the troublesome hide call (which involves redrawing).
This fixes plymouth sometimes crashing when monitors are hot(un)plugged
while plymouth is running.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-10 23:51:38 +00:00
Hans de Goede
9fa4a5270c ply-capslock-icon: Do not draw on free
One case where the various widgets are being freed is the pixel-display-s
being removed because of a monitor being hot(un)plugged. When the monitor
configuration changes ply-device-manager removes all old pixel-displays
and then adds the pixel-displays from the new config.

Calling ply_pixel_display_draw_area on a pixel-display which is about to be
freed is a bad idea, if the monitor was actually unplugged this leads to
various sort of errors, including crashes in some cases.

ply-capslock-icon is a recently added widget, none of the other
(older) widgets redraw themselves as hidden on free because there is
no reason to do this.

This commit adds a new stop_polling helper and replaces the troublesome
hide call (which involves redrawing) with this. This fixes plymouth
sometimes crashing when monitors are hot(un)plugged while plymouth is
running.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-10 23:51:38 +00:00
Ray Strode
e0dff47998 Merge branch 'script-unref' into 'master'
script: add missing unref() for system update func

See merge request plymouth/plymouth!97
2020-03-10 17:25:04 +00:00
J-P Nurmi
6102ba156d script: add missing unref() for system update func
As pointed out by @mmstick in #79
2020-03-10 16:24:20 +01:00
Ray Strode
073af3089b Merge branch 'themes-fix-UseFirmwareBackground-usage' into 'master'
themes: Drop UseFirmwareBackground=true from spinner/bgrt firmware-upgrade settings

See merge request plymouth/plymouth!95
2020-03-10 14:22:22 +00:00
Hans de Goede
5598196945 themes: Drop UseFirmwareBackground=true from spinner/bgrt firmware-upgrade settings
The spinner theme should never have UseFirmwareBackground=true and in the
bgrt case we should not use it for modes which set a Title as the Title
location will conflict with the firmware background vendor logo.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-10 14:21:36 +00:00
Ray Strode
0c8b2f0dda Merge branch 'system-update' into 'master'
Fix SetSystemUpdateFunction

Closes #79

See merge request plymouth/plymouth!96
2020-03-10 14:09:55 +00:00
J-P Nurmi
04388af285 Fix SetSystemUpdateFunction
script_lib_plymouth_on_system_update() was never called, because
the plugin interface mapping was missing.

Fixes: #79
Signed-off-by: J-P Nurmi <jpnurmi@gmail.com>
2020-03-10 14:08:56 +00:00
Ray Strode
6c7d6c22ee Merge branch 'event-loop-log-less' into 'master'
Event loop log less

See merge request plymouth/plymouth!93
2020-03-10 12:32:26 +00:00
Hans de Goede
7634c54175 event-loop: Remove ply_trace calls around the disconnect handler
Doing a ply_trace both before and after the disconnect handler, which
gets called every time a boot client asks something of us through by
calling /sbin/plymouth leads to a lot of not really informative messages
in the debug-log.

This removes the 2 ply_trace calls around the disconnect handlers to make
the logs easier to read.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-09 08:47:34 +01:00
Hans de Goede
cf7658b4cd event-loop: Fix debug-log "failed to delete fd # from epoll watch list" spam
The boot server uses a disconnect handler which closes the fd, this
causes deleting the fd from the epoll watch list to fail with an EBADF
error. Since the fd was closed it was already removed from the epoll
watch list, so the failure is harmless, silence these errors getting logged
to the debug logs.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2020-03-09 08:47:34 +01:00
Ray Strode
58a728982c Merge branch 'avoid_shutdown_failure' into 'master'
ply-terminal-session: Not use grantpt when the system shut down. to avoid sytem hung up.

See merge request plymouth/plymouth!52
2020-03-06 18:02:31 +00:00
Zhao Qiang
a7987d1927 terminal-session: Drop unnecessary grantpt() call.
plymouth calls `grantpt()` when setting up the pseudoterminal it uses
for boot logging and console broadcasting. `grantpt()` traditionally
sets up the access permissions and file mode of the created slave
pseudoterminal device node.

That call is unnecessary for two reasons:
1. The kernel automatically sets up the correct permissions at open
   time on modern Linux.
2. plymouthd runs as root anyway

Furthermore, it seems like, for some unknown reason, the call may be
interfering with the shutdown process.

This commit drops the call, since it's unnecessary, and potentially
even problematic.
2020-03-07 01:49:17 +08:00
Ray Strode
774c4cc374 Merge branch 'clean_codes_gdm_transition' into 'master'
Misc: Code cleanups, gdm-transition is obsolete, so I removed the related code and scripts.

See merge request plymouth/plymouth!86
2020-03-06 16:50:34 +00:00
Zhao Qiang
6844c84704 build-goo: Remove vestigial remnants of old GDM integration code.
commit 04102125 removed a feature, only several versions of
GDM relied on for doing the splash to login screen transition.
but it missed a few spots in the build goo and documentation. So
this commit does another pass to fully clean up any lingering
references to obsolete GDM transition code.
2020-03-07 00:36:54 +08:00
Ray Strode
baca661bca Merge branch 'fix-bad-assertion' into 'master'
main: Add state variable splash_is_becoming_idle

See merge request plymouth/plymouth!90
2020-03-02 15:59:31 +00:00
Gaël PORTAY
f816b01a8a main: Add state variable splash_is_becoming_idle
Both handlers on_deactivate() and on_quit() sets the handler
on_boot_splash_idle() using the helper ply_boot_splash_become_idle().

That helper creates a new trigger and it stores it alongside the handler
in its context. The helper asserts if the trigger is set (i.e. a handler
is pending already).

None of the handlers on_deactivate() and on_quit() check if the handler
on_boot_splash_idle() is set already.

There is a race condition that leads to the situation in which the
assertion is false and causes plymouthd to signal itself with SIGABRT
and die.

First, a client sends the request deactivate to the daemon that creates
a trigger for the idle handler. Then, the trigger is still pending while
another client sends the request quit to the daemon that tries to create
a second trigger and die because of the assertion.

This commit adds the new state variable splash_is_becoming_idle that is
checked before calling the helper ply_boot_splash_become_idle() to avoid
to call it twice. The state variable is set by the caller after it calls
the helper ply_boot_splash_become_idle(). It is cleared by the handler
on_boot_splash_idle() after the splash becomes idle.

Fixes:

	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-server.c:350:print_connection_process_identity       : connection is from pid 683 (/usr/bin/plymouth deactivate) with parent pid 1 (/usr/lib/systemd/systemd --switched-root --system --deserialize 27)
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-server.c:459:ply_boot_connection_on_request          : got deactivate request
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 main.c:1275:on_deactivate                                     : deactivating
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:967:ply_event_loop_stop_watching_for_timeout : no matching timeout found for removal
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-device-manager.c:1112:ply_device_manager_pause            : ply_device_manager_pause() called, stopping watching for udev events
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:761:ply_event_loop_stop_watching_fd          : stopping watching fd 8
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:777:ply_event_loop_stop_watching_fd          : removing destination for fd 8
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:786:ply_event_loop_stop_watching_fd          : no more destinations remaing for fd 8, removing source
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-device-manager.c:1092:ply_device_manager_deactivate_keyboa: deactivating keyboards
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:761:ply_event_loop_stop_watching_fd          : stopping watching fd 10
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-event-loop.c:777:ply_event_loop_stop_watching_fd          : removing destination for fd 10
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ply-boot-splash.c:687:ply_boot_splash_become_idle             : telling splash to become idle
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ./plugin.c:1801:become_idle                                   : deactivation requested
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.186 ./plugin.c:1819:become_idle                                   : already waiting for plugin to stop
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-boot-server.c:350:print_connection_process_identity       : connection is from pid 685 (/usr/bin/plymouth quit --retain-splash) with parent pid 1 (/usr/lib/systemd/systemd --switched-root --system --deserialize 27)
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-boot-server.c:486:ply_boot_connection_on_request          : got quit --retain-splash request
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:1326:on_quit                                           : quitting (retain splash: true)
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:1338:on_quit                                           : system initialized so saving boot-duration file
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-utils.c:596:ply_create_directory                          : directory '/var/lib/plymouth/' already exists
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 main.c:686:get_cache_file_for_mode                            : returning cache file '/var/lib/plymouth//boot-duration'
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.191 ply-progress.c:214:ply_progress_save_cache                    : saving progress cache to /var/lib/plymouth//boot-duration
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1634:tell_systemd_to_stop_printing_details             : telling systemd to stop printing details
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1352:on_quit                                           : closing log
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 ply-device-manager.c:1092:ply_device_manager_deactivate_keyboa: deactivating keyboards
	Feb 25 22:04:35 steamos plymouthd[312]: 00:00:04.192 main.c:1358:on_quit                                           : unloading splash
	Feb 25 22:04:35 steamos plymouthd[312]: plymouthd: ply-boot-splash.c:677: ply_boot_splash_become_idle: Assertion `splash->idle_trigger == NULL' failed.
	Feb 25 22:05:06 steamos systemd[1]: plymouth-start.service: Main process exited, code=dumped, status=6/ABRT
	Feb 25 22:05:06 steamos systemd[1]: plymouth-start.service: Failed with result 'core-dump'.

Signed-off-by: Gaël PORTAY <gael.portay@collabora.com>
2020-03-01 22:38:44 +00:00
Ray Strode
d7c737d05a Merge branch 'fix-bug-report-URL' into 'master'
configure: Update bug report URL.

See merge request plymouth/plymouth!87
2019-12-24 16:29:10 +00:00
ZhaoQiang
87dcbab4b0 configure: Update bug report URL. 2019-12-24 16:29:10 +00:00
Hans de Goede
d18086efcc Merge branch 'cleanups' into 'master'
Misc. code cleanups

See merge request plymouth/plymouth!82
2019-11-01 12:42:52 +00:00
Hans de Goede
dd4a324121 drm: Remove reset_scan_out_buffer_if_needed() prototype declaration
Remove the unnecessary forward reset_scan_out_buffer_if_needed() declaration.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-11-01 13:36:42 +01:00
Hans de Goede
df8eef2e84 drm: Remove unnecessary next_node helper variable
When walking a list, we only need to store the next_node before doing
operations on the current node, if the operation modifies the list,
which is only the case in free_heads() in all other cases we can remove
the unnecessary next_node helper variable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-11-01 13:36:42 +01:00
Hans de Goede
c925706421 two-step: Remove unnecessary next_node helper variable
When walking a list, we only need to store the next_node before doing
operations on the current node, if the operation modifies the list,
which is only the case in free_views() and remove_pixel_display () in all
other cases we can remove the unnecessary next_node helper variable.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-11-01 13:36:42 +01:00
Hans de Goede
5d1805f832 Merge branch 'allow-separate-rootfs' into 'master'
Allow running plymouth-populate-initrd in a cross-compiler environment

See merge request plymouth/plymouth!72
2019-11-01 12:34:37 +00:00
Böszörményi Zoltán
19f3885d3e Allow running plymouth-populate-initrd in a cross-compiler environment
Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
2019-10-30 19:36:52 +00:00
Hans de Goede
b78d921ce5 Merge branch 'throbgress-removal' into 'master'
throbgress: Remove the throbgress plugin

See merge request plymouth/plymouth!69
2019-10-29 15:29:45 +00:00
Hans de Goede
a76638856d throbgress: Remove the throbgress plugin
Now that the spinfinity theme has been modified to use the two-step
splash plugin instead, there are no more users of the throbgress plugin,
so lets remove it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-29 15:28:40 +00:00
Hans de Goede
32c097cbca Merge branch 'drm-first-draw-fixes2' into 'master'
Drm first draw fixes part 2

See merge request plymouth/plymouth!81
2019-10-21 17:35:58 +00:00
Hans de Goede
b293882d7c drm: Remove explicit set_scan_out_buffer() from activate()
flush_head() already sets the scan-out buffer if necessary and if it is not
necessary then we do not want to do this. Specifically second and later heads
do not yet have their buffer drawn to when activate gets called from the
map_to_device call for the first head and then we do not want to start
scanning out the uninitialized buffer.

Removing the explicit ply_renderer_head_set_scan_out_buffer() call also
allows removing the if (head->scan_out_buffer_id != 0) check,
flush_head() already checks this itself.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-21 16:49:44 +02:00
Hans de Goede
e0928370b6 drm: Mark buffer as clean in ply_renderer_head_new()
We do not want to set our buffer as scanout source before it has been
drawn to by the splash, to avoid a flicker caused by us installing a
black buffer for scanout.

To avoid this, flush_head() only calls reset_scan_out_buffer() if the buffer
for the head has updated_areas, iow if it already has been drawn to.

Our ply_pixel_buffer_fill_with_color() call in ply_renderer_head_new()
causes updated_areas to be non-empty, triggering a reset_scan_out_buffer()
call before the buffer has been drawn at least once.

This commit fixes this by clearing the updated_areas after the
ply_pixel_buffer_fill_with_color() call.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-21 16:49:44 +02:00
Hans de Goede
b3d42bd5e2 Merge branch 'twostep-bgrt-position-fix' into 'master'
two-step: Fix wrong horizontal position of bgrt logo on left-side-up LCD panels

See merge request plymouth/plymouth!80
2019-10-21 09:39:21 +00:00
Hans de Goede
1ac882f041 two-step: Fix wrong horizontal position of bgrt logo on left-side-up LCD panels
On devices which have their LCD panel mounted 90° rotated with the left-side
of the physical LCD-panel up (at the top), we were using the wrong offset
for placing the bgrt graphics. We were directly using y_offset from the bgrt
as x_offset, but y_offset is from the top of the physical LCD which in this
case is the right side of the panel as seen by the user. Where as our x_offset
is defined to have 0 at the left side.

This commit fixes this issue by flipping the y_offset value on these panels
before using it as our x_offset.

This fixes the logo jumping 6 pixels to the left on an Asus T100HA, which
has such a panel and uses a bgrt y_offset of 512, which results in a flipped
y_offset of 518 (for some reason the log is not entirely centered triggering
this problem).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2019-10-21 10:39:52 +02:00
Hans de Goede
fa467eabbf Merge branch 'kbd-indicator-tweaks' into 'master'
keyboard indicator theming improvements

See merge request plymouth/plymouth!79
2019-10-20 12:40:41 +00:00