1 /* SPDX-License-Identifier: MIT 2 * 3 * Copyright © 2019 Intel Corporation 4 */ 5 6 #ifndef _INTEL_DSB_H 7 #define _INTEL_DSB_H 8 9 #include <linux/types.h> 10 11 #include "i915_reg_defs.h" 12 13 struct intel_atomic_state; 14 struct intel_crtc; 15 struct intel_crtc_state; 16 struct intel_dsb; 17 18 enum intel_dsb_id { 19 INTEL_DSB_0, 20 INTEL_DSB_1, 21 INTEL_DSB_2, 22 23 I915_MAX_DSBS, 24 }; 25 26 struct intel_dsb *intel_dsb_prepare(struct intel_atomic_state *state, 27 struct intel_crtc *crtc, 28 enum intel_dsb_id dsb_id, 29 unsigned int max_cmds); 30 void intel_dsb_finish(struct intel_dsb *dsb); 31 void intel_dsb_cleanup(struct intel_dsb *dsb); 32 void intel_dsb_reg_write(struct intel_dsb *dsb, 33 i915_reg_t reg, u32 val); 34 void intel_dsb_reg_write_masked(struct intel_dsb *dsb, 35 i915_reg_t reg, u32 mask, u32 val); 36 void intel_dsb_noop(struct intel_dsb *dsb, int count); 37 void intel_dsb_nonpost_start(struct intel_dsb *dsb); 38 void intel_dsb_nonpost_end(struct intel_dsb *dsb); 39 40 void intel_dsb_commit(struct intel_dsb *dsb, 41 bool wait_for_vblank); 42 void intel_dsb_wait(struct intel_dsb *dsb); 43 44 #endif 45