• Imre Deak's avatar
    drm/i915: Add support for disabling any CRTCs during HW readout/sanitization · e826839e
    Imre Deak authored
    During HW readout/sanitization CRTCs can be disabled only if they don't
    have an attached encoder (and so the encoder disable hooks don't need to
    be called). An upcoming patch will need to disable CRTCs also with an
    attached encoder, so add support for this.
    
    For bigjoiner configs the encoder disabling hooks require the slave CRTC
    states, so add these too to the atomic state. Since the connector atomic
    state is already up-to-date when the CRTC is disabled the connector
    state needs to be updated (reset) after the CRTC is disabled, make this
    so. Follow the proper order of disabling first all bigjoiner slaves,
    then any port synced CRTC slaves followed by the CRTC originally
    requested to be disabled.
    
    v2:
    - Fix calculating the bigjoiner_masters mask in a port sync config,
      (Ville)
    - Keep _noatomic suffix in intel_crtc_disable_noatomic(). (Ville)
    - Rebase on full CRTC state reset in this patchset, not requiring
      resetting the bigjoiner state separately and (instead) resetting
      the full atomic CRTC and related global state after all linked
      pipes got disabled.
    - Disable portsync slaves before a portsync master.
    - Disable a portsync master if a linked portsync slave is disabled.
    
    v3: (Ville)
    - Use s/u32/u8 for transcoder and pipe masks.
    - Use is_power_of_2() instead of hweight()==1.
    
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20230510103131.1618266-8-imre.deak@intel.com
    e826839e
intel_modeset_setup.c 26 KB