aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2019-04-02 17:00:06 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-04-03 10:00:33 -0500
commitfdd1fe57c00ef96c8a8ab6e5eab03d248deecca6 (patch)
tree5b16dd5764b450a6a9198e4f76b8c699e6322c10 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentdrm/amd/display: Prevent vblank irq disable while VRR is active. (v3) (diff)
downloadlinux-dev-fdd1fe57c00ef96c8a8ab6e5eab03d248deecca6.tar.xz
linux-dev-fdd1fe57c00ef96c8a8ab6e5eab03d248deecca6.zip
drm/amd/display: Rework vrr flip throttling for late vblank irq.
For throttling to work correctly, we always need a baseline vblank count last_flip_vblank that increments at start of front-porch. This is the case for drm_crtc_vblank_count() in non-VRR mode, where the vblank irq fires at start of front-porch and triggers DRM core vblank handling, but it is no longer the case in VRR mode, where core vblank handling is done later, after end of front-porch. Therefore drm_crtc_vblank_count() is no longer useful for this. We also can't use drm_crtc_accurate_vblank_count(), as that would screw up vblank timestamps in VRR mode when called in front-porch. To solve this, use the cooked hardware vblank counter returned by amdgpu_get_vblank_counter_kms() instead, as that one is cooked to always increment at start of front-porch, independent of when vblank related irq's fire. This patch allows vblank irq handling to happen anywhere within vblank of even after it, without a negative impact on flip throttling, so followup patches can shift the vblank core handling trigger point wherever they need it. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
0 files changed, 0 insertions, 0 deletions