1df0566a6SJani Nikula /* SPDX-License-Identifier: MIT */ 2df0566a6SJani Nikula /* 3df0566a6SJani Nikula * Copyright © 2019 Intel Corporation 4df0566a6SJani Nikula */ 5df0566a6SJani Nikula 6df0566a6SJani Nikula #ifndef __INTEL_FBC_H__ 7df0566a6SJani Nikula #define __INTEL_FBC_H__ 8df0566a6SJani Nikula 9df0566a6SJani Nikula #include <linux/types.h> 10df0566a6SJani Nikula 1114567eedSJani Nikula enum fb_op_origin; 12df0566a6SJani Nikula struct drm_i915_private; 13df0566a6SJani Nikula struct intel_atomic_state; 14df0566a6SJani Nikula struct intel_crtc; 15df0566a6SJani Nikula struct intel_crtc_state; 16e49a656bSVille Syrjälä struct intel_fbc; 17825bd833SVille Syrjälä struct intel_plane; 18df0566a6SJani Nikula struct intel_plane_state; 19df0566a6SJani Nikula 20ae361eb0SVille Syrjälä enum intel_fbc_id { 21ae361eb0SVille Syrjälä INTEL_FBC_A, 22*4cf05a4dSVille Syrjälä INTEL_FBC_B, 23ae361eb0SVille Syrjälä 24ae361eb0SVille Syrjälä I915_MAX_FBCS, 25ae361eb0SVille Syrjälä }; 26ae361eb0SVille Syrjälä 272e6c99f8SVille Syrjälä int intel_fbc_atomic_check(struct intel_atomic_state *state); 289ecc6eabSVille Syrjälä bool intel_fbc_pre_update(struct intel_atomic_state *state, 299ecc6eabSVille Syrjälä struct intel_crtc *crtc); 309ecc6eabSVille Syrjälä void intel_fbc_post_update(struct intel_atomic_state *state, 319ecc6eabSVille Syrjälä struct intel_crtc *crtc); 32df0566a6SJani Nikula void intel_fbc_init(struct drm_i915_private *dev_priv); 33e49a656bSVille Syrjälä void intel_fbc_cleanup(struct drm_i915_private *dev_priv); 34b65cbb98SVille Syrjälä void intel_fbc_sanitize(struct drm_i915_private *dev_priv); 35287d00d4SVille Syrjälä void intel_fbc_update(struct intel_atomic_state *state, 369ecc6eabSVille Syrjälä struct intel_crtc *crtc); 37df0566a6SJani Nikula void intel_fbc_disable(struct intel_crtc *crtc); 38df0566a6SJani Nikula void intel_fbc_invalidate(struct drm_i915_private *dev_priv, 39df0566a6SJani Nikula unsigned int frontbuffer_bits, 40df0566a6SJani Nikula enum fb_op_origin origin); 41df0566a6SJani Nikula void intel_fbc_flush(struct drm_i915_private *dev_priv, 42df0566a6SJani Nikula unsigned int frontbuffer_bits, enum fb_op_origin origin); 43825bd833SVille Syrjälä void intel_fbc_add_plane(struct intel_fbc *fbc, struct intel_plane *plane); 4432024bb8SVille Syrjälä void intel_fbc_handle_fifo_underrun_irq(struct drm_i915_private *i915); 4532024bb8SVille Syrjälä void intel_fbc_reset_underrun(struct drm_i915_private *i915); 46e74c6aa9SVille Syrjälä void intel_fbc_crtc_debugfs_add(struct intel_crtc *crtc); 47d2de8ccfSVille Syrjälä void intel_fbc_debugfs_register(struct drm_i915_private *i915); 48df0566a6SJani Nikula 49df0566a6SJani Nikula #endif /* __INTEL_FBC_H__ */ 50