]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/vblank: add dynamic per-crtc vblank configuration support
authorHamza Mahfooz <hamza.mahfooz@amd.com>
Thu, 25 Jul 2024 20:51:08 +0000 (16:51 -0400)
committerHamza Mahfooz <hamza.mahfooz@amd.com>
Fri, 26 Jul 2024 21:40:10 +0000 (17:40 -0400)
commit0d5040e406d2c4404d26b841c4aa34cec0bf1088
tree6f2c6039064d89f5f44ca8a2e7513e1fc24c057e
parent9d8e91439fc3890de55eef2bcfde97470b7dc04d
drm/vblank: add dynamic per-crtc vblank configuration support

We would like to be able to enable vblank_disable_immediate
unconditionally, however there are a handful of cases where a small off
delay is necessary (e.g. with PSR enabled). So, we would like to be able
to adjust the vblank off delay and disable imminent values dynamically
for a given CRTC. Since, it will allow drivers to apply static screen
optimizations more quickly and consequently allow users to benefit more
so from the power savings afforded by the aforementioned optimizations,
while avoiding issues in cases where an off delay is still warranted.
In particular, the PSR case requires a small off delay of 2 frames,
otherwise display firmware isn't able to keep up with all of the
requests made to amdgpu. So, introduce drm_crtc_vblank_on_config() which
is like drm_crtc_vblank_on(), but it allows drivers to specify the
vblank CRTC configuration before enabling vblanking support for a given
CRTC.

Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20240725205109.209743-1-hamza.mahfooz@amd.com
drivers/gpu/drm/drm_vblank.c
include/drm/drm_device.h
include/drm/drm_vblank.h