https://bugs.kde.org/show_bug.cgi?id=495167

Vlad Zahorodnii <vlad.zahorod...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Latest Commit|                            |https://invent.kde.org/plas
                   |                            |ma/kwin/-/commit/85eeafa092
                   |                            |82cd6bda8effb0523ee656cb0ea
                   |                            |b2f
         Resolution|---                         |FIXED

--- Comment #19 from Vlad Zahorodnii <vlad.zahorod...@kde.org> ---
Git commit 85eeafa09282cd6bda8effb0523ee656cb0eab2f by Vlad Zahorodnii, on
behalf of Xaver Hugl.
Committed on 08/04/2025 at 06:40.
Pushed by zamundaaa into branch 'master'.

backends/drm: dynamically adjust the safety margin based on commit time

Atomic (test) commits can take a varying amount of time, and that depends on
the content of the commits as well as CPU frequency. For example, changing
GAMMA_LUT can take a whole additional millisecond on my desktop PC, and may
take even longer on laptops in power saving mode.

To mitigate that, as well as the scheduler not necessarily waking up the commit
thread at the desired time, the added logic compares the desired vs. achieved
commit completion timestamp after every atomic commit, and adjusts the safety
margin accordingly.

As we currently don't know exactly when the atomic commit is actually applied,
and the timestamp for when the ioctl returns is just an approximation (which
fails on NVidia), this keeps the base safety margin at 1.5ms. We can reduce
that once we have some API to actually know when the commit is applied.

M  +25   -2    src/backends/drm/drm_commit_thread.cpp
M  +2    -0    src/backends/drm/drm_commit_thread.h
M  +2    -0    src/backends/drm/drm_pipeline.cpp

https://invent.kde.org/plasma/kwin/-/commit/85eeafa09282cd6bda8effb0523ee656cb0eab2f

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to