• Imre Deak's avatar
    drm/i915/tc: Call TypeC port flush_work/cleanup without modeset locks held · b61fad5f
    Imre Deak authored
    Call the TypeC port flush_work and cleanup handlers without the modeset
    locks held. These don't require the locks, as the work takes - as it
    should be able to at any point in time - any locks it needs and by the
    time cleanup is called and after cleanup returns the encoder is not in
    use.
    
    This is required by the next patch canceling a TypeC port work
    synchronously during encoder suspend and shutdown, where the work can
    take modeset locks as well, hence the canceling must be done without
    holding the locks.
    
    I also considered moving the modeset locking down to each encoder
    suspend()/shutdown() hook instead, however locking the full modeset
    state for each encoder separately would be odd, and the bigger change -
    affecting all encoders - is beyond the scope of this patchset.
    
    v2:
    - Add a TODO: comment to remove modeset locks if no encoder depends
      on this. (Ville)
    
    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/20230512195513.2699-1-imre.deak@intel.com
    b61fad5f
intel_ddi.c 148 KB