• L
    drm/amd/display: Implement MPO PSR SU · 7cc191ee
    Leo Li 提交于
    [WHY]
    
    For additional power savings, PSR SU (also referred to as PSR2) can be
    enabled on eDP panels with PSR SU support.
    
    PSR2 saves more power compared to PSR1 by allowing more opportunities
    for the display hardware to be shut down. In comparison to PSR1, Shut
    down can now occur in-between frames, as well as in display regions
    where there is no visible update. In otherwords, it allows for some
    display hw components to be enabled only for a **selectively updated**
    region of the visible display. Hence PSR SU.
    
    [HOW]
    
    To define the SU region, support from the OS is required. OS needs to
    inform driver of damaged regions that need to be flushed to the eDP
    panel. Today, such support is lacking in most compositors.
    
    Therefore, an in-between solution is to implement PSR SU for MPO and
    cursor scenarios. The plane bounds can be used to define the damaged
    region to be flushed to panel. This is achieved by:
    
    * Leveraging dm_crtc_state->mpo_requested flag to identify when MPO is
      enabled.
    * If MPO is enabled, only add updated plane bounds to dirty region.
      Determine plane update by either:
        * Existence of drm damaged clips attached to the plane (added by a
          damage-aware compositor)
        * Change in fb id (flip)
        * Change in plane bounds (position and dimensions)
    * If cursor is enabled, the old_pos and new_pos of cursor plus cursor
      size is used as damaged regions(*).
    
    (*) Cursor updates follow a different code path through DC. PSR SU for
    cursor is already implemented in DC, and the only thing required to
    enable is to set DC_PSR_VERSION_SU_1 on the eDP link. See
    dcn10_dmub_update_cursor_data().
    Signed-off-by: NLeo Li <sunpeng.li@amd.com>
    Acked-by: NLeo Li <sunpeng.li@amd.com>
    Reviewed-by: NHarry Wentland <harry.wentland@amd.com>
    Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
    7cc191ee
amdgpu_dm.c 347.4 KB