• Stanislav Lisovskiy's avatar
    drm/i915: Use wm0 only during async flips for DG2 · c3639f3b
    Stanislav Lisovskiy authored
    This optimization allows to achieve higher perfomance
    during async flips.
    For the first async flip we have to still temporarily
    switch to sync flip, in order to reprogram plane
    watermarks, so this requires taking into account
    old plane state's do_async_flip flag.
    
    v2: - Removed redundant new_plane_state->do_async_flip
          check from needs_async_flip_wm_override condition
          (Ville Syrjälä)
        - Extract dg2_async_flip_optimization to separate
          function(Ville Syrjälä)
        - Check for plane->async_flip instead of plane_id
          (Ville Syrjälä)
    
    v3: - Rename "needs_async_flip_wm_override" to
          "intel_plane_do_async_flip" and move all the required
          checks there (Ville Syrjälä)
        - Rename "dg2_async_flip_optimization" to
          "use_minimal_wm0_only" (Ville Syrjälä)
    
    v4: - Swap new/old_crtc_state in intel_plane_do_async_flip
          argument list(Ville Syrjälä)
        - Use plane->base.dev to grab i915 pointer in
          intel_plane_do_async_flip(Ville Syrjälä)
        - Remove const modifier from plane parameter in
          use_minimal_wm0_only(Ville Syrjälä)
        - Swap also new/old_crtc_state at intel_plane_do_async_flip
          call site(Ville Syrjälä)
    Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20220124094929.31722-1-stanislav.lisovskiy@intel.com
    c3639f3b
intel_display.c 316 KB