diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index ef61fe9507e2..9ffa31e13eb3 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -110,6 +110,32 @@ struct intel_output { | |||
110 | int clone_mask; | 110 | int clone_mask; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | struct intel_crtc; | ||
114 | struct intel_overlay { | ||
115 | struct drm_device *dev; | ||
116 | struct intel_crtc *crtc; | ||
117 | struct drm_i915_gem_object *vid_bo; | ||
118 | struct drm_i915_gem_object *old_vid_bo; | ||
119 | int active; | ||
120 | int pfit_active; | ||
121 | u32 pfit_vscale_ratio; /* shifted-point number, (1<<12) == 1.0 */ | ||
122 | u32 color_key; | ||
123 | u32 brightness, contrast, saturation; | ||
124 | u32 old_xscale, old_yscale; | ||
125 | /* register access */ | ||
126 | u32 flip_addr; | ||
127 | struct drm_i915_gem_object *reg_bo; | ||
128 | void *virt_addr; | ||
129 | /* flip handling */ | ||
130 | uint32_t last_flip_req; | ||
131 | int hw_wedged; | ||
132 | #define HW_WEDGED 1 | ||
133 | #define NEEDS_WAIT_FOR_FLIP 2 | ||
134 | #define RELEASE_OLD_VID 3 | ||
135 | #define SWITCH_OFF_STAGE_1 4 | ||
136 | #define SWITCH_OFF_STAGE_2 5 | ||
137 | }; | ||
138 | |||
113 | struct intel_crtc { | 139 | struct intel_crtc { |
114 | struct drm_crtc base; | 140 | struct drm_crtc base; |
115 | enum pipe pipe; | 141 | enum pipe pipe; |
@@ -121,6 +147,8 @@ struct intel_crtc { | |||
121 | bool busy; /* is scanout buffer being updated frequently? */ | 147 | bool busy; /* is scanout buffer being updated frequently? */ |
122 | struct timer_list idle_timer; | 148 | struct timer_list idle_timer; |
123 | bool lowfreq_avail; | 149 | bool lowfreq_avail; |
150 | struct intel_overlay *overlay; | ||
151 | struct intel_unpin_work *unpin_work; | ||
124 | }; | 152 | }; |
125 | 153 | ||
126 | #define to_intel_crtc(x) container_of(x, struct intel_crtc, base) | 154 | #define to_intel_crtc(x) container_of(x, struct intel_crtc, base) |
@@ -134,6 +162,8 @@ void intel_i2c_destroy(struct i2c_adapter *adapter); | |||
134 | int intel_ddc_get_modes(struct intel_output *intel_output); | 162 | int intel_ddc_get_modes(struct intel_output *intel_output); |
135 | extern bool intel_ddc_probe(struct intel_output *intel_output); | 163 | extern bool intel_ddc_probe(struct intel_output *intel_output); |
136 | void intel_i2c_quirk_set(struct drm_device *dev, bool enable); | 164 | void intel_i2c_quirk_set(struct drm_device *dev, bool enable); |
165 | void intel_i2c_reset_gmbus(struct drm_device *dev); | ||
166 | |||
137 | extern void intel_crt_init(struct drm_device *dev); | 167 | extern void intel_crt_init(struct drm_device *dev); |
138 | extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg); | 168 | extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg); |
139 | extern bool intel_sdvo_init(struct drm_device *dev, int output_device); | 169 | extern bool intel_sdvo_init(struct drm_device *dev, int output_device); |
@@ -148,6 +178,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode, | |||
148 | extern void intel_edp_link_config (struct intel_output *, int *, int *); | 178 | extern void intel_edp_link_config (struct intel_output *, int *, int *); |
149 | 179 | ||
150 | 180 | ||
181 | extern int intel_panel_fitter_pipe (struct drm_device *dev); | ||
151 | extern void intel_crtc_load_lut(struct drm_crtc *crtc); | 182 | extern void intel_crtc_load_lut(struct drm_crtc *crtc); |
152 | extern void intel_encoder_prepare (struct drm_encoder *encoder); | 183 | extern void intel_encoder_prepare (struct drm_encoder *encoder); |
153 | extern void intel_encoder_commit (struct drm_encoder *encoder); | 184 | extern void intel_encoder_commit (struct drm_encoder *encoder); |
@@ -183,4 +214,16 @@ extern int intel_framebuffer_create(struct drm_device *dev, | |||
183 | struct drm_framebuffer **fb, | 214 | struct drm_framebuffer **fb, |
184 | struct drm_gem_object *obj); | 215 | struct drm_gem_object *obj); |
185 | 216 | ||
217 | extern void intel_prepare_page_flip(struct drm_device *dev, int plane); | ||
218 | extern void intel_finish_page_flip(struct drm_device *dev, int pipe); | ||
219 | |||
220 | extern void intel_setup_overlay(struct drm_device *dev); | ||
221 | extern void intel_cleanup_overlay(struct drm_device *dev); | ||
222 | extern int intel_overlay_switch_off(struct intel_overlay *overlay); | ||
223 | extern int intel_overlay_recover_from_interrupt(struct intel_overlay *overlay, | ||
224 | int interruptible); | ||
225 | extern int intel_overlay_put_image(struct drm_device *dev, void *data, | ||
226 | struct drm_file *file_priv); | ||
227 | extern int intel_overlay_attrs(struct drm_device *dev, void *data, | ||
228 | struct drm_file *file_priv); | ||
186 | #endif /* __INTEL_DRV_H__ */ | 229 | #endif /* __INTEL_DRV_H__ */ |