Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/vrr: Add function to reset DC balance accumulated params

Add function which resets all accumulated DC Balance parameters
whenever adaptive mode of VRR goes off. This helps to give a
fresh start when VRR is re-enabled.

--v2:
- Typo, change crtc_state to old_crtc_state. (Ankit)

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patch.msgid.link/20251223104542.2688548-10-mitulkumar.ajitkumar.golani@intel.com

authored by

Mitul Golani and committed by
Ankit Nautiyal
80d14983 7bf11bc2

+17
+1
drivers/gpu/drm/i915/display/intel_display.c
··· 1158 1158 1159 1159 if (intel_crtc_vrr_disabling(state, crtc)) { 1160 1160 intel_vrr_disable(old_crtc_state); 1161 + intel_vrr_dcb_reset(old_crtc_state, crtc); 1161 1162 intel_crtc_update_active_timings(old_crtc_state, false); 1162 1163 } 1163 1164
+13
drivers/gpu/drm/i915/display/intel_vrr.c
··· 646 646 EMP_AS_SDP_DB_TL(crtc_state->vrr.vsync_start)); 647 647 } 648 648 649 + void 650 + intel_vrr_dcb_reset(const struct intel_crtc_state *old_crtc_state, 651 + struct intel_crtc *crtc) 652 + { 653 + struct intel_display *display = to_intel_display(old_crtc_state); 654 + enum pipe pipe = crtc->pipe; 655 + 656 + if (!old_crtc_state->vrr.dc_balance.enable) 657 + return; 658 + 659 + intel_de_write(display, PIPEDMC_DCB_BALANCE_RESET(pipe), 0); 660 + } 661 + 649 662 void intel_vrr_send_push(struct intel_dsb *dsb, 650 663 const struct intel_crtc_state *crtc_state) 651 664 {
+3
drivers/gpu/drm/i915/display/intel_vrr.h
··· 11 11 struct drm_connector_state; 12 12 struct intel_atomic_state; 13 13 struct intel_connector; 14 + struct intel_crtc; 14 15 struct intel_crtc_state; 15 16 struct intel_dsb; 16 17 struct intel_display; ··· 40 39 void intel_vrr_transcoder_enable(const struct intel_crtc_state *crtc_state); 41 40 void intel_vrr_transcoder_disable(const struct intel_crtc_state *crtc_state); 42 41 void intel_vrr_set_fixed_rr_timings(const struct intel_crtc_state *crtc_state); 42 + void intel_vrr_dcb_reset(const struct intel_crtc_state *old_crtc_state, 43 + struct intel_crtc *crtc); 43 44 bool intel_vrr_always_use_vrr_tg(struct intel_display *display); 44 45 int intel_vrr_safe_window_start(const struct intel_crtc_state *crtc_state); 45 46 int intel_vrr_vmin_safe_window_end(const struct intel_crtc_state *crtc_state);