linux/drivers/gpu/drm/amd/display
Nicholas Kazlauskas 8fe684e97c drm/amd/display: Allow for vblank enabled with no active planes
[Why]
CRC capture doesn't work when the active plane count is 0 since we
currently tie both vblank and pageflip interrupts to active_plane_count
greater than 0.

[How]
The frontend is what generates the vblank interrupts while the backend
is what generates pageflip interrupts. Both have a requirement for
the CRTC to be active, so control the overall interrupt state based
on that instead.

Pageflip interrupts need to be enabled based on active plane count, but
we actually rely on power gating to take care of disabling the interrupt
for us on pipes that can be power gated.

For pipes that can't be power gated it's still fine to leave it enabled
since the interrupt only triggers after the address has been written
to that particular pipe - which we won't be doing without an active
plane.

The issue we had before with this setup was that we couldn't force
the state back on. We were essentially manipulating the refcount
to enable or disable as needed in a two pass approach.

However, there is a function that solves this problem more elegantly:
amdgpu_irq_update() will unconditionally call the set based on what it
thinks the current enablement state is.

This leaves two future TODO items for our IRQ handling:
- Disabling IRQs in commit tail instead of atomic commit
- Mapping the pageflip interrupt to VUPDATE or something that's tied to
  the frontend instead of the backend since the mapping to CRTC is not
  correct

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-07-14 14:38:26 -04:00
..
amdgpu_dm drm/amd/display: Allow for vblank enabled with no active planes 2020-07-14 14:38:26 -04:00
dc drm/amd/display: Add missing DCN30 registers and fields for OTG_CRC_CNTL2 2020-07-14 14:38:17 -04:00
dmub drm/amd/display: [FW Promotion] Release 0.0.24 2020-07-14 14:37:33 -04:00
include drm/amd/display: Add logger for SMU msg 2020-07-08 09:02:31 -04:00
modules drm/amd/display: Send VSIF on unsupported modes on DAL 2020-07-08 09:01:45 -04:00
Kconfig drm/amd/display: Add DCN3 to Kconfig 2020-07-01 01:59:15 -04:00
Makefile drm/amd/display: Drop CONFIG_DRM_AMD_DC_DMUB guards 2019-11-13 15:29:42 -05:00
TODO