~plymouth-dev/plymouth/trunk

  • Committer: Ray Strode
  • Author(s): Hans de Goede
  • Date: 2018-07-10 19:32:04 UTC
  • Revision ID: git-v1:b527834c8821362da6d01ee15ecab589a43abfcb
drm: Remove unnecessary reset_scan_out_buffer_if_needed() call from ply_renderer_head_map()

ply_renderer_head_map() gets only called from map_to_device() which
calls activate() directly afterwards which calls
ply_renderer_head_set_scan_out_buffer(), so there is no need for the
reset_scan_out_buffer_if_needed() call.

Not only is it not needed, but it is actually harmful, there are 2 problems
woth it:

1) Normally the drm plugin gets instantiated by ply-renderer.c with
   rendered->is_active=true, backend->is_active=false. The
   rendered->is_active=true causes the first ply_renderer_activate call
   to be a no-op without calling backend->activate(). So when the first
   map_to_device() calls happen activate() has not been called yet and we've
   not yet claimed master rights, so ply_renderer_head_set_scan_out_buffer()
   calls will always fail, resulting in this in a ply-trace:

   Mapping buffer for 1920x1080 renderer head
   Redrawing 1920x1080 renderer head
   Setting scan out buffer of 1920x1080 head to our buffer
   Couldn't set scan out buffer for head with controller id 41

   This is harmless, but also shows that the reset_scan_out_buffer_if_needed()
   is really not needed.

2. If deactivate_renderer() gets called before the first show-splash then
   rendered->is_active will become false, so renderer_activate() done before
   map_to_device() will now actually call backend->activate() claiming
   drm master rights and setting backend->is_active=true.

   The map_to_device() -> ply_renderer_head_map() call done after this, calls
   ply_renderer_head_redraw() -> flush_head() which under 1. was a no-op
   as it exits directly when backend->is_active=false. But now it actually
   flushes the buffers by calling reset_scan_out_buffer_if_needed(). This
   itself is fine.

   But since reset_scan_out_buffer_if_needed() has already happened in
   ply_renderer_head_redraw() the reset_scan_out_buffer_if_needed() call this
   commit removes would always return false (no reset necessary) causing
   ply_renderer_head_map() to destroy the buffer and return an error.

   This results in the splash briefly showing, followed by the core soon after
   trying another map_to_device(), which again briefly shows the splash, etc.
   With the end result being a badly flickering display.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Filename Latest Rev Last Changed Committer Comment Size
..
docs 1122 14 years ago Ray Strode [branch-merge] Add man page This merges the "man- Diff
images 314 15 years ago Ray Strode Use "bizcom" pseudologo for installs that don't sp Diff
scripts 152 16 years ago Ray Strode add my scripts directory to git Diff
src 1 17 years ago Ray Strode initial import Diff
systemd-units 1524 11 years ago Ray Strode systemd: pull units from systemd tree Kay and Len Diff
themes 814 14 years ago Ray Strode [splash] Split splashes into plugins and themes S Diff
.gitignore 1717 9 years ago Frederic Crozat .gitignore: ignore generated manpages 456 bytes Diff Download File
acinclude.m4 977 14 years ago Ray Strode [configure] Add AS_AC_EXPAND for configured dirs 1.3 KB Diff Download File
AUTHORS 403 15 years ago Ray Strode Add Peter to AUTHORS 100 bytes Diff Download File
File autogen.sh 1653 10 years ago Ray Strode build-goo: get rid of warnings related to non-GNU 134 bytes Diff Download File
ChangeLog 240 15 years ago Ray Strode Put in ChangeLog request to not use ChangeLog 64 bytes Diff Download File
configure.ac 1845 5 years ago Ray Strode Revert "wip! plymouth: stub out drm escrow program 13 KB Diff Download File
COPYING 1 17 years ago Ray Strode initial import 17.5 KB Diff Download File
INSTALL 1822 6 years ago Ray Strode INSTALL: Fix a spelling error in the command examp 3.7 KB Diff Download File
Makefile.am 1797 7 years ago Ray Strode build-goo: don't install systemd units during dist 714 bytes Diff Download File
NEWS 1 17 years ago Ray Strode initial import 1 bytes Diff Download File
README 1472 12 years ago Ray Strode README: resync from wiki walters pointed out the 2 KB Diff Download File
TODO 506 15 years ago Ray Strode Add hack to make maintenance mode probably work wh 1.1 KB Diff Download File