return false;
}
+/* FIXME: remove this and just flush the cleanup wq where appropriate */
+void intel_display_flush_cleanup_work(struct intel_display *display)
+{
+ struct intel_crtc *crtc;
+
+ for_each_intel_crtc(display->drm, crtc) {
+ struct drm_crtc_commit *commit;
+
+ spin_lock(&crtc->base.commit_lock);
+ commit = list_first_entry_or_null(&crtc->base.commit_list,
+ struct drm_crtc_commit, commit_entry);
+ if (commit)
+ drm_crtc_commit_get(commit);
+ spin_unlock(&crtc->base.commit_lock);
+
+ if (commit) {
+ wait_for_completion(&commit->cleanup_done);
+ drm_crtc_commit_put(commit);
+ }
+ }
+}
+
/*
* Finds the encoder associated with the given CRTC. This can only be
* used when we know that the CRTC isn't feeding multiple encoders!
void i830_enable_pipe(struct intel_display *display, enum pipe pipe);
void i830_disable_pipe(struct intel_display *display, enum pipe pipe);
bool intel_has_pending_fb_unpin(struct intel_display *display);
+void intel_display_flush_cleanup_work(struct intel_display *display);
void intel_encoder_destroy(struct drm_encoder *encoder);
struct drm_display_mode *
intel_encoder_current_mode(struct intel_encoder *encoder);
return false;
}
-static void xe_display_flush_cleanup_work(struct xe_device *xe)
-{
- struct intel_crtc *crtc;
-
- for_each_intel_crtc(&xe->drm, crtc) {
- struct drm_crtc_commit *commit;
-
- spin_lock(&crtc->base.commit_lock);
- commit = list_first_entry_or_null(&crtc->base.commit_list,
- struct drm_crtc_commit, commit_entry);
- if (commit)
- drm_crtc_commit_get(commit);
- spin_unlock(&crtc->base.commit_lock);
-
- if (commit) {
- wait_for_completion(&commit->cleanup_done);
- drm_crtc_commit_put(commit);
- }
- }
-}
-
static void xe_display_enable_d3cold(struct xe_device *xe)
{
struct intel_display *display = xe->display;
*/
intel_power_domains_disable(display);
- xe_display_flush_cleanup_work(xe);
+ intel_display_flush_cleanup_work(display);
intel_opregion_suspend(display, PCI_D3cold);
intel_display_driver_suspend(display);
}
- xe_display_flush_cleanup_work(xe);
+ intel_display_flush_cleanup_work(display);
intel_encoder_block_all_hpds(display);
intel_display_driver_suspend(display);
}
- xe_display_flush_cleanup_work(xe);
+ intel_display_flush_cleanup_work(display);
intel_dp_mst_suspend(display);
intel_encoder_block_all_hpds(display);
intel_hpd_cancel_work(display);