From: Ville Syrjälä <[email protected]> We can't currently do full modesets, fastsets, nor async flips via either DSB nor flip qeueu. Let's checks for those up front to reduce the clutter in the if statements.
And while at it, throw in some TODO comments to remind us that we may want to implement these via DSB/flip queue eventually. Signed-off-by: Ville Syrjälä <[email protected]> --- drivers/gpu/drm/i915/display/intel_display.c | 22 +++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index f09a0b3860d7..395942342fb8 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7279,21 +7279,27 @@ intel_atomic_commit_type(struct intel_atomic_state *state, if (state->base.legacy_cursor_update) return INTEL_COMMIT_MMIO; - /* FIXME deal with everything */ + /* TODO maybe enable/disable planes via DSB/flip queue during modeset? */ + if (intel_crtc_needs_modeset(new_crtc_state)) + return INTEL_COMMIT_MMIO; + + /* TODO implement fastsets via DSB/flip queue */ + if (intel_crtc_needs_fastset(new_crtc_state)) + return INTEL_COMMIT_MMIO; + + /* TODO implement async flips via DSB/flip queue */ + if (new_crtc_state->do_async_flip) + return INTEL_COMMIT_MMIO; + + /* TODO handle VRR with flip queue */ if (intel_flipq_supported(display) && - !new_crtc_state->do_async_flip && !new_crtc_state->vrr.enable && !new_crtc_state->has_psr && - !intel_crtc_needs_modeset(new_crtc_state) && - !intel_crtc_needs_fastset(new_crtc_state) && !intel_crtc_needs_color_update(new_crtc_state)) return INTEL_COMMIT_FLIPQ; if (intel_dsb_supported(display) && - !new_crtc_state->do_async_flip && - (DISPLAY_VER(display) >= 20 || !new_crtc_state->has_psr) && - !intel_crtc_needs_modeset(new_crtc_state) && - !intel_crtc_needs_fastset(new_crtc_state)) + (DISPLAY_VER(display) >= 20 || !new_crtc_state->has_psr)) return INTEL_COMMIT_DSB; return INTEL_COMMIT_MMIO; -- 2.51.2
