• Gwan-gyeong Mun's avatar
    drm/i915/display: Support PSR Multiple Instances · b64d6c51
    Gwan-gyeong Mun authored
    It is a preliminary work for supporting multiple EDP PSR and
    DP PanelReplay. And it refactors singleton PSR to Multi Transcoder
    supportable PSR.
    And this moves and renames the i915_psr structure of drm_i915_private's to
    intel_dp's intel_psr structure.
    It also causes changes in PSR interrupt handling routine for supporting
    multiple transcoders. But it does not change the scenario and timing of
    enabling and disabling PSR. And it not support multiple pipes with
    a single transcoder PSR case yet.
    
    v2: Fix indentation and add comments
    v3: Remove Blank line
    v4: Rebased
    v5: Rebased and Addressed Anshuman's review comment.
        - Move calling of intel_psr_init() to intel_dp_init_connector()
    v6: Address Anshuman's review comments
       - Remove wrong comments and add comments for a limit of supporting of
         a single pipe PSR
    v7: Update intel_psr_compute_config() for supporting multiple transcoder
        PSR on BDW+
    v8: Address Anshuman's review comments
       - Replace DRM_DEBUG_KMS with drm_dbg_kms() / DRM_WARN with drm_warn()
    v9: Fix commit message
    v10: Rebased
    v11: Address Jose's review comment.
      - Reorder calling order of intel_psr2_program_trans_man_trk_ctl().
      - In order to reduce changes keep the old name for drm_i915_private.
      - Change restrictions of multiple instances of PSR.
    v12: Address Jose's review comment.
      - Change the calling of intel_psr2_program_trans_man_trk_ctl() into
        commit_pipe_config().
      - Change a checking order of CAN_PSR() and connector_status to original
        on i915_psr_sink_status_show().
      - Drop unneeded intel_dp_update_pipe() function.
      - In order to wait a specific encoder which belong to crtc_state on
        intel_psr_wait_for_idle(), add checking of encoder.
      - Add an whitespace to comments.
    v13: Rebased and Address Jose's review comment.
      - Add and use for_each_intel_psr_enabled_encoder() macro.
      - In order to use correct frontbuffer_bit for each pipe,
        fix intel_psr_invalidate() and intel_psr_flush().
      - Remove redundant or unneeded codes.
      - Update comments.
    v14: Address Jose's review comment
      - Add and use for_each_intel_encoder_can_psr() macro and
        for_each_intel_encoder_mask_can_psr() macro.
      - Add source_support member variable into intel_psr structure.
      - Update CAN_PSR() macro that checks source_support.
      - Move encoder's PSR availity check to psr_init() from
        psr_compute_config().
      - Remove redundant or unneeded codes.
    v15: Remove wrong mutex lock/unlock of PSR from
         intel_psr2_program_trans_man_trk_ctl()
    Signed-off-by: default avatarGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
    Cc: José Roberto de Souza <jose.souza@intel.com>
    Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
    Cc: Anshuman Gupta <anshuman.gupta@intel.com>
    Reviewed-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
    Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
    Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210204134015.419036-1-gwan-gyeong.mun@intel.com
    b64d6c51
intel_display.h 23.6 KB