1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
/* SPDX-License-Identifier: MIT */
/* Copyright © 2025 Intel Corporation */
#ifndef __INTEL_PARENT_H__
#define __INTEL_PARENT_H__
#include <linux/types.h>
enum vlv_iosf_sb_unit;
struct dma_fence;
struct drm_file;
struct drm_gem_object;
struct drm_scanout_buffer;
struct i915_gtt_view;
struct i915_vma;
struct intel_display;
struct intel_dpt;
struct intel_fb_pin_params;
struct intel_frontbuffer;
struct intel_hdcp_gsc_context;
struct intel_panic;
struct intel_stolen_node;
struct iosys_map;
/* dpt */
struct intel_dpt *intel_parent_dpt_create(struct intel_display *display,
struct drm_gem_object *obj, size_t size);
void intel_parent_dpt_destroy(struct intel_display *display, struct intel_dpt *dpt);
void intel_parent_dpt_suspend(struct intel_display *display, struct intel_dpt *dpt);
void intel_parent_dpt_resume(struct intel_display *display, struct intel_dpt *dpt);
/* fb_pin */
int intel_parent_fb_pin_ggtt_pin(struct intel_display *display,
struct drm_gem_object *obj,
const struct intel_fb_pin_params *pin_params,
struct i915_vma **out_ggtt_vma,
u32 *out_offset,
int *out_fence_id);
void intel_parent_fb_pin_ggtt_unpin(struct intel_display *display,
struct i915_vma *ggtt_vma,
int fence_id);
int intel_parent_fb_pin_dpt_pin(struct intel_display *display,
struct drm_gem_object *obj,
struct intel_dpt *dpt,
const struct intel_fb_pin_params *pin_params,
struct i915_vma **out_dpt_vma,
struct i915_vma **out_ggtt_vma,
u32 *out_offset);
void intel_parent_fb_pin_dpt_unpin(struct intel_display *display,
struct intel_dpt *dpt,
struct i915_vma *dpt_vma,
struct i915_vma *ggtt_vma);
struct i915_vma *intel_parent_fb_pin_reuse_vma(struct intel_display *display,
struct i915_vma *old_ggtt_vma,
struct drm_gem_object *old_obj,
const struct i915_gtt_view *old_view,
struct drm_gem_object *new_obj,
const struct i915_gtt_view *new_view,
u32 *out_offset);
void intel_parent_fb_pin_get_map(struct intel_display *display,
struct i915_vma *vma, struct iosys_map *map);
/* frontbuffer */
struct intel_frontbuffer *intel_parent_frontbuffer_get(struct intel_display *display, struct drm_gem_object *obj);
void intel_parent_frontbuffer_ref(struct intel_display *display, struct intel_frontbuffer *front);
void intel_parent_frontbuffer_put(struct intel_display *display, struct intel_frontbuffer *front);
void intel_parent_frontbuffer_flush_for_display(struct intel_display *display, struct intel_frontbuffer *front);
/* hdcp */
ssize_t intel_parent_hdcp_gsc_msg_send(struct intel_display *display,
struct intel_hdcp_gsc_context *gsc_context,
void *msg_in, size_t msg_in_len,
void *msg_out, size_t msg_out_len);
bool intel_parent_hdcp_gsc_check_status(struct intel_display *display);
struct intel_hdcp_gsc_context *intel_parent_hdcp_gsc_context_alloc(struct intel_display *display);
void intel_parent_hdcp_gsc_context_free(struct intel_display *display,
struct intel_hdcp_gsc_context *gsc_context);
/* irq */
bool intel_parent_irq_enabled(struct intel_display *display);
void intel_parent_irq_synchronize(struct intel_display *display);
/* overlay */
bool intel_parent_overlay_is_active(struct intel_display *display);
int intel_parent_overlay_on(struct intel_display *display,
u32 frontbuffer_bits);
int intel_parent_overlay_continue(struct intel_display *display,
struct i915_vma *vma,
bool load_polyphase_filter);
int intel_parent_overlay_off(struct intel_display *display);
int intel_parent_overlay_recover_from_interrupt(struct intel_display *display);
int intel_parent_overlay_release_old_vid(struct intel_display *display);
void intel_parent_overlay_reset(struct intel_display *display);
struct i915_vma *intel_parent_overlay_pin_fb(struct intel_display *display,
struct drm_gem_object *obj,
u32 *offset);
void intel_parent_overlay_unpin_fb(struct intel_display *display,
struct i915_vma *vma);
struct drm_gem_object *intel_parent_overlay_obj_lookup(struct intel_display *display,
struct drm_file *filp,
u32 handle);
void __iomem *intel_parent_overlay_setup(struct intel_display *display,
bool needs_physical);
void intel_parent_overlay_cleanup(struct intel_display *display);
/* panic */
struct intel_panic *intel_parent_panic_alloc(struct intel_display *display);
int intel_parent_panic_setup(struct intel_display *display, struct intel_panic *panic,
struct drm_scanout_buffer *sb, struct drm_gem_object *obj,
unsigned int (*tiling)(unsigned int x, unsigned int y, unsigned int width));
void intel_parent_panic_finish(struct intel_display *display, struct intel_panic *panic);
/* pc8 */
void intel_parent_pc8_block(struct intel_display *display);
void intel_parent_pc8_unblock(struct intel_display *display);
/* pcode */
int intel_parent_pcode_read(struct intel_display *display, u32 mbox, u32 *val, u32 *val1);
int intel_parent_pcode_write_timeout(struct intel_display *display, u32 mbox, u32 val, int timeout_ms);
int intel_parent_pcode_write(struct intel_display *display, u32 mbox, u32 val);
int intel_parent_pcode_request(struct intel_display *display, u32 mbox, u32 request,
u32 reply_mask, u32 reply, int timeout_base_ms);
/* rps */
bool intel_parent_rps_available(struct intel_display *display);
void intel_parent_rps_boost_if_not_started(struct intel_display *display, struct dma_fence *fence);
void intel_parent_rps_mark_interactive(struct intel_display *display, bool interactive);
void intel_parent_rps_ilk_irq_handler(struct intel_display *display);
/* stolen */
int intel_parent_stolen_insert_node_in_range(struct intel_display *display,
struct intel_stolen_node *node, u64 size,
unsigned int align, u64 start, u64 end);
int intel_parent_stolen_insert_node(struct intel_display *display, struct intel_stolen_node *node, u64 size,
unsigned int align);
void intel_parent_stolen_remove_node(struct intel_display *display,
struct intel_stolen_node *node);
bool intel_parent_stolen_initialized(struct intel_display *display);
bool intel_parent_stolen_node_allocated(struct intel_display *display,
const struct intel_stolen_node *node);
u32 intel_parent_stolen_node_offset(struct intel_display *display, struct intel_stolen_node *node);
u64 intel_parent_stolen_area_address(struct intel_display *display);
u64 intel_parent_stolen_area_size(struct intel_display *display);
u64 intel_parent_stolen_node_address(struct intel_display *display, struct intel_stolen_node *node);
u64 intel_parent_stolen_node_size(struct intel_display *display, const struct intel_stolen_node *node);
struct intel_stolen_node *intel_parent_stolen_node_alloc(struct intel_display *display);
void intel_parent_stolen_node_free(struct intel_display *display, const struct intel_stolen_node *node);
/* vlv iosf */
void intel_parent_vlv_iosf_get(struct intel_display *display, unsigned long unit_mask);
void intel_parent_vlv_iosf_put(struct intel_display *display, unsigned long unit_mask);
u32 intel_parent_vlv_iosf_read(struct intel_display *display, enum vlv_iosf_sb_unit unit, u32 addr);
int intel_parent_vlv_iosf_write(struct intel_display *display, enum vlv_iosf_sb_unit unit, u32 addr, u32 val);
/* generic */
bool intel_parent_has_auxccs(struct intel_display *display);
bool intel_parent_has_fenced_regions(struct intel_display *display);
bool intel_parent_vgpu_active(struct intel_display *display);
void intel_parent_fence_priority_display(struct intel_display *display, struct dma_fence *fence);
#endif /* __INTEL_PARENT_H__ */
|