treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / display / intel_dsb.h
blob395ef9ce558eb12774547b6964904bf7a354889b
1 /* SPDX-License-Identifier: MIT
3 * Copyright © 2019 Intel Corporation
4 */
6 #ifndef _INTEL_DSB_H
7 #define _INTEL_DSB_H
9 #include <linux/types.h>
11 #include "i915_reg.h"
13 struct intel_crtc;
14 struct i915_vma;
16 enum dsb_id {
17 INVALID_DSB = -1,
18 DSB1,
19 DSB2,
20 DSB3,
21 MAX_DSB_PER_PIPE
24 struct intel_dsb {
25 long refcount;
26 enum dsb_id id;
27 u32 *cmd_buf;
28 struct i915_vma *vma;
31 * free_pos will point the first free entry position
32 * and help in calculating tail of command buffer.
34 int free_pos;
37 * ins_start_offset will help to store start address of the dsb
38 * instuction and help in identifying the batch of auto-increment
39 * register.
41 u32 ins_start_offset;
44 struct intel_dsb *
45 intel_dsb_get(struct intel_crtc *crtc);
46 void intel_dsb_put(struct intel_dsb *dsb);
47 void intel_dsb_reg_write(struct intel_dsb *dsb, i915_reg_t reg, u32 val);
48 void intel_dsb_indexed_reg_write(struct intel_dsb *dsb, i915_reg_t reg,
49 u32 val);
50 void intel_dsb_commit(struct intel_dsb *dsb);
52 #endif