From: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ville.syrjala@linux.intel.com, uma.shankar@intel.com,
chaitanya.kumar.borah@intel.com, animesh.manna@intel.com
Subject: [PATCH v2 09/11] drm/i915: Program DB LUT registers before vblank
Date: Tue, 8 Apr 2025 16:30:20 +0530 [thread overview]
Message-ID: <20250408110022.1907802-10-chaitanya.kumar.borah@intel.com> (raw)
In-Reply-To: <20250408110022.1907802-1-chaitanya.kumar.borah@intel.com>
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>
---
drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 58a84829fe58..398606f328e9 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -6634,6 +6634,7 @@ static void commit_pipe_post_planes(struct intel_atomic_state *state,
struct intel_display *display = to_intel_display(state);
const struct intel_crtc_state *new_crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
+ bool modeset = intel_crtc_needs_modeset(new_crtc_state);
drm_WARN_ON(display->drm, new_crtc_state->use_dsb);
@@ -6642,10 +6643,15 @@ static void commit_pipe_post_planes(struct intel_atomic_state *state,
* get a catastrophic underrun even if the two operations
* end up happening in two different frames.
*/
- if (DISPLAY_VER(display) >= 9 &&
- !intel_crtc_needs_modeset(new_crtc_state))
+ if (DISPLAY_VER(display) >= 9 && !modeset)
skl_detach_scalers(NULL, new_crtc_state);
+ if (!modeset &&
+ intel_crtc_needs_color_update(new_crtc_state) &&
+ !intel_color_uses_dsb(new_crtc_state) &&
+ HAS_DOUBLE_BUFFERED_LUT(display))
+ intel_color_load_luts(new_crtc_state);
+
if (intel_crtc_vrr_enabling(state, crtc))
intel_vrr_enable(new_crtc_state);
}
--
2.25.1
next prev parent reply other threads:[~2025-04-08 11:15 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 11:00 [PATCH 00/11] drm/xe/display: Program double buffered LUT registers Chaitanya Kumar Borah
2025-04-08 11:00 ` [PATCH 01/11] drm/i915/dsb: Extract intel_dsb_ins_align() Chaitanya Kumar Borah
2025-04-21 12:40 ` Manna, Animesh
2025-04-08 11:00 ` [PATCH 02/11] drm/i915/dsb: Extract assert_dsb_tail_is_aligned() Chaitanya Kumar Borah
2025-04-21 12:43 ` Manna, Animesh
2025-04-08 11:00 ` [PATCH 03/11] drm/i915/dsb: Extract intel_dsb_{head,tail}() Chaitanya Kumar Borah
2025-04-21 12:44 ` Manna, Animesh
2025-04-08 11:00 ` [PATCH 04/11] drm/i915/dsb: Implement intel_dsb_gosub() Chaitanya Kumar Borah
2025-04-16 7:28 ` Manna, Animesh
2025-04-08 11:00 ` [PATCH v2 05/11] drm/i915/dsb: add intel_dsb_gosub_finish() Chaitanya Kumar Borah
2025-05-14 9:19 ` Shankar, Uma
2025-04-08 11:00 ` [PATCH v2 06/11] drm/i915/dsb: Add support for GOSUB interrupt Chaitanya Kumar Borah
2025-05-14 9:46 ` Shankar, Uma
2025-04-08 11:00 ` [PATCH 07/11] drm/i915: s/dsb_color_vblank/dsb_color Chaitanya Kumar Borah
2025-04-08 11:00 ` [PATCH v2 08/11] drm/i915: use GOSUB to program doubled buffered LUT registers Chaitanya Kumar Borah
2025-05-14 11:40 ` Shankar, Uma
2025-04-08 11:00 ` Chaitanya Kumar Borah [this message]
2025-05-14 11:44 ` [PATCH v2 09/11] drm/i915: Program DB LUT registers before vblank Shankar, Uma
2025-04-08 11:00 ` [PATCH 10/11] drm/i915/color: Do not pre-load LUTs with DB registers Chaitanya Kumar Borah
2025-05-14 11:46 ` Shankar, Uma
2025-04-08 11:00 ` [PATCH 11/11] drm/i915: Disable updating of LUT values during vblank Chaitanya Kumar Borah
2025-05-14 11:50 ` Shankar, Uma
2025-04-08 11:21 ` ✓ CI.Patch_applied: success for drm/xe/display: Program double buffered LUT registers (rev6) Patchwork
2025-04-08 11:21 ` ✓ CI.checkpatch: " Patchwork
2025-04-08 11:22 ` ✓ CI.KUnit: " Patchwork
2025-04-08 11:26 ` ✗ CI.Build: failure " Patchwork
2025-04-08 21:37 ` ✓ CI.Patch_applied: success for drm/xe/display: Program double buffered LUT registers (rev7) Patchwork
2025-04-08 21:37 ` ✓ CI.checkpatch: " Patchwork
2025-04-08 21:38 ` ✓ CI.KUnit: " Patchwork
2025-04-08 22:05 ` ✓ CI.Build: " Patchwork
2025-04-08 22:08 ` ✓ CI.Hooks: " Patchwork
2025-04-08 22:10 ` ✗ CI.checksparse: warning " Patchwork
2025-04-08 22:55 ` ✓ Xe.CI.BAT: success " Patchwork
2025-04-08 23:58 ` ✗ Xe.CI.Full: failure " Patchwork
2025-04-09 6:27 ` Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250408110022.1907802-10-chaitanya.kumar.borah@intel.com \
--to=chaitanya.kumar.borah@intel.com \
--cc=animesh.manna@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=uma.shankar@intel.com \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox