]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/atomic: Filter out redundant DPMS calls
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 19 Feb 2025 16:02:39 +0000 (18:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2025 19:54:23 +0000 (12:54 -0700)
commit962912aaf8d12997532e5d2e14914059e2afec26
tree43e908b3216ec49a1d84d8726a94000ed779d0ad
parente487d35964fbe08ce2ac7c2891d6bc4874640af7
drm/atomic: Filter out redundant DPMS calls

commit de93ddf88088f7624b589d0ff3af9effb87e8f3b upstream.

Video players (eg. mpv) do periodic XResetScreenSaver() calls to
keep the screen on while the video playing. The modesetting ddx
plumbs these straight through into the kernel as DPMS setproperty
ioctls, without any filtering whatsoever. When implemented via
atomic these end up as empty commits on the crtc (which will
nonetheless take one full frame), which leads to a dropped
frame every time XResetScreenSaver() is called.

Let's just filter out redundant DPMS property changes in the
kernel to avoid this issue.

v2: Explain the resulting commits a bit better (Sima)
    Document the behaviour in uapi docs (Sima)

Cc: stable@vger.kernel.org
Testcase: igt/kms_flip/flip-vs-dpms-on-nop
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250219160239.17502-1-ville.syrjala@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_atomic_uapi.c
drivers/gpu/drm/drm_connector.c