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/cdclk: Add intel_cdclk_min_cdclk_for_prefill()

Introduce a helper to compute the min required cdclk frequency
for a given guardband size. This could be used to bump up the
cdclk in case the vblank is so small that the normally computed
minimum cdclk results in too slow a prefill.

Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251014191808.12326-5-ville.syrjala@linux.intel.com

+15
+12
drivers/gpu/drm/i915/display/intel_cdclk.c
··· 4120 4120 4121 4121 return _intel_cdclk_prefill_adj(crtc_state, clock, min_cdclk); 4122 4122 } 4123 + 4124 + int intel_cdclk_min_cdclk_for_prefill(const struct intel_crtc_state *crtc_state, 4125 + unsigned int prefill_lines_unadjusted, 4126 + unsigned int prefill_lines_available) 4127 + { 4128 + struct intel_display *display = to_intel_display(crtc_state); 4129 + const struct drm_display_mode *pipe_mode = &crtc_state->hw.pipe_mode; 4130 + int ppc = intel_cdclk_ppc(display, crtc_state->double_wide); 4131 + 4132 + return DIV_ROUND_UP_ULL(mul_u32_u32(pipe_mode->crtc_clock, prefill_lines_unadjusted), 4133 + ppc * prefill_lines_available); 4134 + }
+3
drivers/gpu/drm/i915/display/intel_cdclk.h
··· 72 72 73 73 unsigned int intel_cdclk_prefill_adjustment(const struct intel_crtc_state *crtc_state); 74 74 unsigned int intel_cdclk_prefill_adjustment_worst(const struct intel_crtc_state *crtc_state); 75 + int intel_cdclk_min_cdclk_for_prefill(const struct intel_crtc_state *crtc_state, 76 + unsigned int prefill_lines_unadjusted, 77 + unsigned int prefill_lines_available); 75 78 76 79 #endif /* __INTEL_CDCLK_H__ */