drm/i915: Program DB LUT registers before vblank
authorChaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Fri, 23 May 2025 06:20:39 +0000 (11:50 +0530)
committerAnimesh Manna <animesh.manna@intel.com>
Mon, 26 May 2025 07:48:16 +0000 (13:18 +0530)
commitd94a92b7d0a4424936b6a5aa25038a769cdd4ba8
treeb1a0d53906517890249e0db2f621d4eac5cead07
parentb0e0369bca338bb6a07466838cef6c6e5a1a55b9
drm/i915: Program DB LUT registers before vblank

Double Buffered LUT registers can be programmed in the active region.
This patch implements the MMIO path for it. Program the registers after
evading vblank. The HW latches on to the registers after delayed vblank.
It takes around 1024 cdclk cycles(~one scanline) for this.

Following assumptions have been made while making this change

 - Current vblank evasion time is sufficient for programming
   the LUT registers.
 - Current guardband calculation would be sufficient for the HW
   to latch on to the new values

v2: move loading LUTs to commit_pipe_post_planes() since a vblank
    evasion failure for this is probably less drastic than
    for plane programming. (Ville)

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
Link: https://lore.kernel.org/r/20250523062041.166468-10-chaitanya.kumar.borah@intel.com
drivers/gpu/drm/i915/display/intel_display.c