mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
drm/i915/vrr: Split vrr-compute-config in two phases
As vrr guardband calculation is dependent on modified vblank start so better to compute late after all vblank adjustement. v1: Initial version. v2: Split in a separate patch from panel-replay workaround. [Ankit] v3: Add a function for late vrr related computation. [Ville] v4: Use flipline instead of vrr.enable and some cosmetic changes. [Ville] v5: Use intel_vrr_possible helper. Signed-off-by: Animesh Manna <animesh.manna@intel.com> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> [vsyrjala: Make adjusted_mode const] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241010040503.1795399-3-mitulkumar.ajitkumar.golani@intel.com
This commit is contained in:
parent
ffb7dedde3
commit
96abbed906
|
|
@ -5050,6 +5050,8 @@ intel_modeset_pipe_config_late(struct intel_atomic_state *state,
|
|||
struct drm_connector *connector;
|
||||
int i;
|
||||
|
||||
intel_vrr_compute_config_late(crtc_state);
|
||||
|
||||
for_each_new_connector_in_state(&state->base, connector,
|
||||
conn_state, i) {
|
||||
struct intel_encoder *encoder =
|
||||
|
|
|
|||
|
|
@ -244,11 +244,16 @@ intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
|
|||
(crtc_state->hw.adjusted_mode.crtc_vtotal -
|
||||
crtc_state->hw.adjusted_mode.vsync_end);
|
||||
}
|
||||
}
|
||||
|
||||
void intel_vrr_compute_config_late(struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
|
||||
|
||||
if (!intel_vrr_possible(crtc_state))
|
||||
return;
|
||||
|
||||
/*
|
||||
* For XE_LPD+, we use guardband and pipeline override
|
||||
* is deprecated.
|
||||
*/
|
||||
if (DISPLAY_VER(display) >= 13) {
|
||||
crtc_state->vrr.guardband =
|
||||
crtc_state->vrr.vmin + 1 - adjusted_mode->crtc_vblank_start;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ bool intel_vrr_possible(const struct intel_crtc_state *crtc_state);
|
|||
void intel_vrr_check_modeset(struct intel_atomic_state *state);
|
||||
void intel_vrr_compute_config(struct intel_crtc_state *crtc_state,
|
||||
struct drm_connector_state *conn_state);
|
||||
void intel_vrr_compute_config_late(struct intel_crtc_state *crtc_state);
|
||||
void intel_vrr_set_transcoder_timings(const struct intel_crtc_state *crtc_state);
|
||||
void intel_vrr_enable(const struct intel_crtc_state *crtc_state);
|
||||
void intel_vrr_send_push(const struct intel_crtc_state *crtc_state);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user