2019-04-05 11:00:08 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
|
|
|
/*
|
|
|
|
* Copyright © 2019 Intel Corporation
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __INTEL_FBC_H__
|
|
|
|
#define __INTEL_FBC_H__
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
2021-12-10 13:16:58 +00:00
|
|
|
enum fb_op_origin;
|
2019-04-05 11:00:08 +00:00
|
|
|
struct drm_i915_private;
|
|
|
|
struct intel_atomic_state;
|
|
|
|
struct intel_crtc;
|
|
|
|
struct intel_crtc_state;
|
2021-11-04 14:45:19 +00:00
|
|
|
struct intel_fbc;
|
2021-11-24 11:36:44 +00:00
|
|
|
struct intel_plane;
|
2019-04-05 11:00:08 +00:00
|
|
|
struct intel_plane_state;
|
|
|
|
|
2021-12-14 18:46:16 +00:00
|
|
|
enum intel_fbc_id {
|
|
|
|
INTEL_FBC_A,
|
2022-08-17 12:26:24 +00:00
|
|
|
INTEL_FBC_B,
|
2021-12-14 18:46:16 +00:00
|
|
|
|
|
|
|
I915_MAX_FBCS,
|
|
|
|
};
|
|
|
|
|
2021-11-24 11:36:35 +00:00
|
|
|
int intel_fbc_atomic_check(struct intel_atomic_state *state);
|
2019-12-13 13:34:50 +00:00
|
|
|
bool intel_fbc_pre_update(struct intel_atomic_state *state,
|
|
|
|
struct intel_crtc *crtc);
|
|
|
|
void intel_fbc_post_update(struct intel_atomic_state *state,
|
|
|
|
struct intel_crtc *crtc);
|
2019-04-05 11:00:08 +00:00
|
|
|
void intel_fbc_init(struct drm_i915_private *dev_priv);
|
2021-11-04 14:45:19 +00:00
|
|
|
void intel_fbc_cleanup(struct drm_i915_private *dev_priv);
|
2022-03-15 14:00:00 +00:00
|
|
|
void intel_fbc_sanitize(struct drm_i915_private *dev_priv);
|
2021-07-02 20:45:57 +00:00
|
|
|
void intel_fbc_update(struct intel_atomic_state *state,
|
2019-12-13 13:34:50 +00:00
|
|
|
struct intel_crtc *crtc);
|
2019-04-05 11:00:08 +00:00
|
|
|
void intel_fbc_disable(struct intel_crtc *crtc);
|
|
|
|
void intel_fbc_invalidate(struct drm_i915_private *dev_priv,
|
|
|
|
unsigned int frontbuffer_bits,
|
|
|
|
enum fb_op_origin origin);
|
|
|
|
void intel_fbc_flush(struct drm_i915_private *dev_priv,
|
|
|
|
unsigned int frontbuffer_bits, enum fb_op_origin origin);
|
2021-11-24 11:36:44 +00:00
|
|
|
void intel_fbc_add_plane(struct intel_fbc *fbc, struct intel_plane *plane);
|
2021-11-24 11:36:42 +00:00
|
|
|
void intel_fbc_handle_fifo_underrun_irq(struct drm_i915_private *i915);
|
|
|
|
void intel_fbc_reset_underrun(struct drm_i915_private *i915);
|
2021-12-13 15:14:35 +00:00
|
|
|
void intel_fbc_crtc_debugfs_add(struct intel_crtc *crtc);
|
2021-11-24 11:36:43 +00:00
|
|
|
void intel_fbc_debugfs_register(struct drm_i915_private *i915);
|
2019-04-05 11:00:08 +00:00
|
|
|
|
|
|
|
#endif /* __INTEL_FBC_H__ */
|