1 /* SPDX-License-Identifier: MIT 2 * 3 * Copyright © 2023 Intel Corporation 4 */ 5 6 #ifndef _INTEL_DSB_BUFFER_H 7 #define _INTEL_DSB_BUFFER_H 8 9 #include <linux/types.h> 10 11 struct intel_crtc; 12 struct i915_vma; 13 14 struct intel_dsb_buffer { 15 u32 *cmd_buf; 16 struct i915_vma *vma; 17 size_t buf_size; 18 }; 19 20 u32 intel_dsb_buffer_ggtt_offset(struct intel_dsb_buffer *dsb_buf); 21 void intel_dsb_buffer_write(struct intel_dsb_buffer *dsb_buf, u32 idx, u32 val); 22 u32 intel_dsb_buffer_read(struct intel_dsb_buffer *dsb_buf, u32 idx); 23 void intel_dsb_buffer_memset(struct intel_dsb_buffer *dsb_buf, u32 idx, u32 val, size_t size); 24 bool intel_dsb_buffer_create(struct intel_crtc *crtc, struct intel_dsb_buffer *dsb_buf, 25 size_t size); 26 void intel_dsb_buffer_cleanup(struct intel_dsb_buffer *dsb_buf); 27 void intel_dsb_buffer_flush_map(struct intel_dsb_buffer *dsb_buf); 28 29 #endif 30