intel_drv.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509
  1. /*
  2. * Copyright (c) 2006 Dave Airlie <airlied@linux.ie>
  3. * Copyright (c) 2007-2008 Intel Corporation
  4. * Jesse Barnes <jesse.barnes@intel.com>
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the "Software"),
  8. * to deal in the Software without restriction, including without limitation
  9. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. * and/or sell copies of the Software, and to permit persons to whom the
  11. * Software is furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice (including the next
  14. * paragraph) shall be included in all copies or substantial portions of the
  15. * Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  20. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  22. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  23. * IN THE SOFTWARE.
  24. */
  25. #ifndef __INTEL_DRV_H__
  26. #define __INTEL_DRV_H__
  27. #include <linux/i2c.h>
  28. #include "i915_drm.h"
  29. #include "i915_drv.h"
  30. #include "drm_crtc.h"
  31. #include "drm_crtc_helper.h"
  32. #include "drm_fb_helper.h"
  33. #define _wait_for(COND, MS, W) ({ \
  34. unsigned long timeout__ = jiffies + msecs_to_jiffies(MS); \
  35. int ret__ = 0; \
  36. while (!(COND)) { \
  37. if (time_after(jiffies, timeout__)) { \
  38. ret__ = -ETIMEDOUT; \
  39. break; \
  40. } \
  41. if (W && drm_can_sleep()) msleep(W); \
  42. } \
  43. ret__; \
  44. })
  45. #define wait_for_atomic_us(COND, US) ({ \
  46. int i, ret__ = -ETIMEDOUT; \
  47. for (i = 0; i < (US); i++) { \
  48. if ((COND)) { \
  49. ret__ = 0; \
  50. break; \
  51. } \
  52. udelay(1); \
  53. } \
  54. ret__; \
  55. })
  56. #define wait_for(COND, MS) _wait_for(COND, MS, 1)
  57. #define wait_for_atomic(COND, MS) _wait_for(COND, MS, 0)
  58. #define KHz(x) (1000*x)
  59. #define MHz(x) KHz(1000*x)
  60. /*
  61. * Display related stuff
  62. */
  63. /* store information about an Ixxx DVO */
  64. /* The i830->i865 use multiple DVOs with multiple i2cs */
  65. /* the i915, i945 have a single sDVO i2c bus - which is different */
  66. #define MAX_OUTPUTS 6
  67. /* maximum connectors per crtcs in the mode set */
  68. #define INTELFB_CONN_LIMIT 4
  69. #define INTEL_I2C_BUS_DVO 1
  70. #define INTEL_I2C_BUS_SDVO 2
  71. /* these are outputs from the chip - integrated only
  72. external chips are via DVO or SDVO output */
  73. #define INTEL_OUTPUT_UNUSED 0
  74. #define INTEL_OUTPUT_ANALOG 1
  75. #define INTEL_OUTPUT_DVO 2
  76. #define INTEL_OUTPUT_SDVO 3
  77. #define INTEL_OUTPUT_LVDS 4
  78. #define INTEL_OUTPUT_TVOUT 5
  79. #define INTEL_OUTPUT_HDMI 6
  80. #define INTEL_OUTPUT_DISPLAYPORT 7
  81. #define INTEL_OUTPUT_EDP 8
  82. /* Intel Pipe Clone Bit */
  83. #define INTEL_HDMIB_CLONE_BIT 1
  84. #define INTEL_HDMIC_CLONE_BIT 2
  85. #define INTEL_HDMID_CLONE_BIT 3
  86. #define INTEL_HDMIE_CLONE_BIT 4
  87. #define INTEL_HDMIF_CLONE_BIT 5
  88. #define INTEL_SDVO_NON_TV_CLONE_BIT 6
  89. #define INTEL_SDVO_TV_CLONE_BIT 7
  90. #define INTEL_SDVO_LVDS_CLONE_BIT 8
  91. #define INTEL_ANALOG_CLONE_BIT 9
  92. #define INTEL_TV_CLONE_BIT 10
  93. #define INTEL_DP_B_CLONE_BIT 11
  94. #define INTEL_DP_C_CLONE_BIT 12
  95. #define INTEL_DP_D_CLONE_BIT 13
  96. #define INTEL_LVDS_CLONE_BIT 14
  97. #define INTEL_DVO_TMDS_CLONE_BIT 15
  98. #define INTEL_DVO_LVDS_CLONE_BIT 16
  99. #define INTEL_EDP_CLONE_BIT 17
  100. #define INTEL_DVO_CHIP_NONE 0
  101. #define INTEL_DVO_CHIP_LVDS 1
  102. #define INTEL_DVO_CHIP_TMDS 2
  103. #define INTEL_DVO_CHIP_TVOUT 4
  104. /* drm_display_mode->private_flags */
  105. #define INTEL_MODE_PIXEL_MULTIPLIER_SHIFT (0x0)
  106. #define INTEL_MODE_PIXEL_MULTIPLIER_MASK (0xf << INTEL_MODE_PIXEL_MULTIPLIER_SHIFT)
  107. #define INTEL_MODE_DP_FORCE_6BPC (0x10)
  108. static inline void
  109. intel_mode_set_pixel_multiplier(struct drm_display_mode *mode,
  110. int multiplier)
  111. {
  112. mode->clock *= multiplier;
  113. mode->private_flags |= multiplier;
  114. }
  115. static inline int
  116. intel_mode_get_pixel_multiplier(const struct drm_display_mode *mode)
  117. {
  118. return (mode->private_flags & INTEL_MODE_PIXEL_MULTIPLIER_MASK) >> INTEL_MODE_PIXEL_MULTIPLIER_SHIFT;
  119. }
  120. struct intel_framebuffer {
  121. struct drm_framebuffer base;
  122. struct drm_i915_gem_object *obj;
  123. };
  124. struct intel_fbdev {
  125. struct drm_fb_helper helper;
  126. struct intel_framebuffer ifb;
  127. struct list_head fbdev_list;
  128. struct drm_display_mode *our_mode;
  129. };
  130. struct intel_encoder {
  131. struct drm_encoder base;
  132. int type;
  133. bool needs_tv_clock;
  134. void (*hot_plug)(struct intel_encoder *);
  135. int crtc_mask;
  136. int clone_mask;
  137. };
  138. struct intel_connector {
  139. struct drm_connector base;
  140. struct intel_encoder *encoder;
  141. };
  142. struct intel_crtc {
  143. struct drm_crtc base;
  144. enum pipe pipe;
  145. enum plane plane;
  146. u8 lut_r[256], lut_g[256], lut_b[256];
  147. int dpms_mode;
  148. bool active; /* is the crtc on? independent of the dpms mode */
  149. bool busy; /* is scanout buffer being updated frequently? */
  150. struct timer_list idle_timer;
  151. bool lowfreq_avail;
  152. struct intel_overlay *overlay;
  153. struct intel_unpin_work *unpin_work;
  154. int fdi_lanes;
  155. struct drm_i915_gem_object *cursor_bo;
  156. uint32_t cursor_addr;
  157. int16_t cursor_x, cursor_y;
  158. int16_t cursor_width, cursor_height;
  159. bool cursor_visible;
  160. unsigned int bpp;
  161. bool no_pll; /* tertiary pipe for IVB */
  162. bool use_pll_a;
  163. };
  164. struct intel_plane {
  165. struct drm_plane base;
  166. enum pipe pipe;
  167. struct drm_i915_gem_object *obj;
  168. bool primary_disabled;
  169. int max_downscale;
  170. u32 lut_r[1024], lut_g[1024], lut_b[1024];
  171. void (*update_plane)(struct drm_plane *plane,
  172. struct drm_framebuffer *fb,
  173. struct drm_i915_gem_object *obj,
  174. int crtc_x, int crtc_y,
  175. unsigned int crtc_w, unsigned int crtc_h,
  176. uint32_t x, uint32_t y,
  177. uint32_t src_w, uint32_t src_h);
  178. void (*disable_plane)(struct drm_plane *plane);
  179. int (*update_colorkey)(struct drm_plane *plane,
  180. struct drm_intel_sprite_colorkey *key);
  181. void (*get_colorkey)(struct drm_plane *plane,
  182. struct drm_intel_sprite_colorkey *key);
  183. };
  184. struct intel_watermark_params {
  185. unsigned long fifo_size;
  186. unsigned long max_wm;
  187. unsigned long default_wm;
  188. unsigned long guard_size;
  189. unsigned long cacheline_size;
  190. };
  191. struct cxsr_latency {
  192. int is_desktop;
  193. int is_ddr3;
  194. unsigned long fsb_freq;
  195. unsigned long mem_freq;
  196. unsigned long display_sr;
  197. unsigned long display_hpll_disable;
  198. unsigned long cursor_sr;
  199. unsigned long cursor_hpll_disable;
  200. };
  201. #define to_intel_crtc(x) container_of(x, struct intel_crtc, base)
  202. #define to_intel_connector(x) container_of(x, struct intel_connector, base)
  203. #define to_intel_encoder(x) container_of(x, struct intel_encoder, base)
  204. #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
  205. #define to_intel_plane(x) container_of(x, struct intel_plane, base)
  206. #define DIP_HEADER_SIZE 5
  207. #define DIP_TYPE_AVI 0x82
  208. #define DIP_VERSION_AVI 0x2
  209. #define DIP_LEN_AVI 13
  210. #define DIP_TYPE_SPD 0x83
  211. #define DIP_VERSION_SPD 0x1
  212. #define DIP_LEN_SPD 25
  213. #define DIP_SPD_UNKNOWN 0
  214. #define DIP_SPD_DSTB 0x1
  215. #define DIP_SPD_DVDP 0x2
  216. #define DIP_SPD_DVHS 0x3
  217. #define DIP_SPD_HDDVR 0x4
  218. #define DIP_SPD_DVC 0x5
  219. #define DIP_SPD_DSC 0x6
  220. #define DIP_SPD_VCD 0x7
  221. #define DIP_SPD_GAME 0x8
  222. #define DIP_SPD_PC 0x9
  223. #define DIP_SPD_BD 0xa
  224. #define DIP_SPD_SCD 0xb
  225. struct dip_infoframe {
  226. uint8_t type; /* HB0 */
  227. uint8_t ver; /* HB1 */
  228. uint8_t len; /* HB2 - body len, not including checksum */
  229. uint8_t ecc; /* Header ECC */
  230. uint8_t checksum; /* PB0 */
  231. union {
  232. struct {
  233. /* PB1 - Y 6:5, A 4:4, B 3:2, S 1:0 */
  234. uint8_t Y_A_B_S;
  235. /* PB2 - C 7:6, M 5:4, R 3:0 */
  236. uint8_t C_M_R;
  237. /* PB3 - ITC 7:7, EC 6:4, Q 3:2, SC 1:0 */
  238. uint8_t ITC_EC_Q_SC;
  239. /* PB4 - VIC 6:0 */
  240. uint8_t VIC;
  241. /* PB5 - PR 3:0 */
  242. uint8_t PR;
  243. /* PB6 to PB13 */
  244. uint16_t top_bar_end;
  245. uint16_t bottom_bar_start;
  246. uint16_t left_bar_end;
  247. uint16_t right_bar_start;
  248. } avi;
  249. struct {
  250. uint8_t vn[8];
  251. uint8_t pd[16];
  252. uint8_t sdi;
  253. } spd;
  254. uint8_t payload[27];
  255. } __attribute__ ((packed)) body;
  256. } __attribute__((packed));
  257. static inline struct drm_crtc *
  258. intel_get_crtc_for_pipe(struct drm_device *dev, int pipe)
  259. {
  260. struct drm_i915_private *dev_priv = dev->dev_private;
  261. return dev_priv->pipe_to_crtc_mapping[pipe];
  262. }
  263. static inline struct drm_crtc *
  264. intel_get_crtc_for_plane(struct drm_device *dev, int plane)
  265. {
  266. struct drm_i915_private *dev_priv = dev->dev_private;
  267. return dev_priv->plane_to_crtc_mapping[plane];
  268. }
  269. struct intel_unpin_work {
  270. struct work_struct work;
  271. struct drm_device *dev;
  272. struct drm_i915_gem_object *old_fb_obj;
  273. struct drm_i915_gem_object *pending_flip_obj;
  274. struct drm_pending_vblank_event *event;
  275. int pending;
  276. bool enable_stall_check;
  277. };
  278. struct intel_fbc_work {
  279. struct delayed_work work;
  280. struct drm_crtc *crtc;
  281. struct drm_framebuffer *fb;
  282. int interval;
  283. };
  284. int intel_ddc_get_modes(struct drm_connector *c, struct i2c_adapter *adapter);
  285. extern bool intel_ddc_probe(struct intel_encoder *intel_encoder, int ddc_bus);
  286. extern void intel_attach_force_audio_property(struct drm_connector *connector);
  287. extern void intel_attach_broadcast_rgb_property(struct drm_connector *connector);
  288. extern void intel_crt_init(struct drm_device *dev);
  289. extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg);
  290. void intel_dip_infoframe_csum(struct dip_infoframe *avi_if);
  291. extern bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg,
  292. bool is_sdvob);
  293. extern void intel_dvo_init(struct drm_device *dev);
  294. extern void intel_tv_init(struct drm_device *dev);
  295. extern void intel_mark_busy(struct drm_device *dev,
  296. struct drm_i915_gem_object *obj);
  297. extern bool intel_lvds_init(struct drm_device *dev);
  298. extern void intel_dp_init(struct drm_device *dev, int dp_reg);
  299. void
  300. intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
  301. struct drm_display_mode *adjusted_mode);
  302. extern bool intel_dpd_is_edp(struct drm_device *dev);
  303. extern void intel_edp_link_config(struct intel_encoder *, int *, int *);
  304. extern bool intel_encoder_is_pch_edp(struct drm_encoder *encoder);
  305. extern int intel_plane_init(struct drm_device *dev, enum pipe pipe);
  306. extern void intel_flush_display_plane(struct drm_i915_private *dev_priv,
  307. enum plane plane);
  308. /* intel_panel.c */
  309. extern void intel_fixed_panel_mode(struct drm_display_mode *fixed_mode,
  310. struct drm_display_mode *adjusted_mode);
  311. extern void intel_pch_panel_fitting(struct drm_device *dev,
  312. int fitting_mode,
  313. struct drm_display_mode *mode,
  314. struct drm_display_mode *adjusted_mode);
  315. extern u32 intel_panel_get_max_backlight(struct drm_device *dev);
  316. extern u32 intel_panel_get_backlight(struct drm_device *dev);
  317. extern void intel_panel_set_backlight(struct drm_device *dev, u32 level);
  318. extern int intel_panel_setup_backlight(struct drm_device *dev);
  319. extern void intel_panel_enable_backlight(struct drm_device *dev);
  320. extern void intel_panel_disable_backlight(struct drm_device *dev);
  321. extern void intel_panel_destroy_backlight(struct drm_device *dev);
  322. extern enum drm_connector_status intel_panel_detect(struct drm_device *dev);
  323. extern void intel_crtc_load_lut(struct drm_crtc *crtc);
  324. extern void intel_encoder_prepare(struct drm_encoder *encoder);
  325. extern void intel_encoder_commit(struct drm_encoder *encoder);
  326. extern void intel_encoder_destroy(struct drm_encoder *encoder);
  327. static inline struct intel_encoder *intel_attached_encoder(struct drm_connector *connector)
  328. {
  329. return to_intel_connector(connector)->encoder;
  330. }
  331. extern void intel_connector_attach_encoder(struct intel_connector *connector,
  332. struct intel_encoder *encoder);
  333. extern struct drm_encoder *intel_best_encoder(struct drm_connector *connector);
  334. extern struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,
  335. struct drm_crtc *crtc);
  336. int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
  337. struct drm_file *file_priv);
  338. extern void intel_wait_for_vblank(struct drm_device *dev, int pipe);
  339. extern void intel_wait_for_pipe_off(struct drm_device *dev, int pipe);
  340. struct intel_load_detect_pipe {
  341. struct drm_framebuffer *release_fb;
  342. bool load_detect_temp;
  343. int dpms_mode;
  344. };
  345. extern bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder,
  346. struct drm_connector *connector,
  347. struct drm_display_mode *mode,
  348. struct intel_load_detect_pipe *old);
  349. extern void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
  350. struct drm_connector *connector,
  351. struct intel_load_detect_pipe *old);
  352. extern void intelfb_restore(void);
  353. extern void intel_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 green,
  354. u16 blue, int regno);
  355. extern void intel_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
  356. u16 *blue, int regno);
  357. extern void intel_enable_clock_gating(struct drm_device *dev);
  358. extern void ironlake_disable_rc6(struct drm_device *dev);
  359. extern void ironlake_enable_drps(struct drm_device *dev);
  360. extern void ironlake_disable_drps(struct drm_device *dev);
  361. extern void gen6_enable_rps(struct drm_i915_private *dev_priv);
  362. extern void gen6_update_ring_freq(struct drm_i915_private *dev_priv);
  363. extern void gen6_disable_rps(struct drm_device *dev);
  364. extern void intel_init_emon(struct drm_device *dev);
  365. extern int intel_pin_and_fence_fb_obj(struct drm_device *dev,
  366. struct drm_i915_gem_object *obj,
  367. struct intel_ring_buffer *pipelined);
  368. extern void intel_unpin_fb_obj(struct drm_i915_gem_object *obj);
  369. extern int intel_framebuffer_init(struct drm_device *dev,
  370. struct intel_framebuffer *ifb,
  371. struct drm_mode_fb_cmd2 *mode_cmd,
  372. struct drm_i915_gem_object *obj);
  373. extern int intel_fbdev_init(struct drm_device *dev);
  374. extern void intel_fbdev_fini(struct drm_device *dev);
  375. extern void intel_fbdev_set_suspend(struct drm_device *dev, int state);
  376. extern void intel_prepare_page_flip(struct drm_device *dev, int plane);
  377. extern void intel_finish_page_flip(struct drm_device *dev, int pipe);
  378. extern void intel_finish_page_flip_plane(struct drm_device *dev, int plane);
  379. extern void intel_setup_overlay(struct drm_device *dev);
  380. extern void intel_cleanup_overlay(struct drm_device *dev);
  381. extern int intel_overlay_switch_off(struct intel_overlay *overlay);
  382. extern int intel_overlay_put_image(struct drm_device *dev, void *data,
  383. struct drm_file *file_priv);
  384. extern int intel_overlay_attrs(struct drm_device *dev, void *data,
  385. struct drm_file *file_priv);
  386. extern void intel_fb_output_poll_changed(struct drm_device *dev);
  387. extern void intel_fb_restore_mode(struct drm_device *dev);
  388. extern void assert_pipe(struct drm_i915_private *dev_priv, enum pipe pipe,
  389. bool state);
  390. #define assert_pipe_enabled(d, p) assert_pipe(d, p, true)
  391. #define assert_pipe_disabled(d, p) assert_pipe(d, p, false)
  392. extern void intel_init_clock_gating(struct drm_device *dev);
  393. extern void intel_write_eld(struct drm_encoder *encoder,
  394. struct drm_display_mode *mode);
  395. extern void intel_cpt_verify_modeset(struct drm_device *dev, int pipe);
  396. /* For use by IVB LP watermark workaround in intel_sprite.c */
  397. extern void intel_update_watermarks(struct drm_device *dev);
  398. extern void intel_update_sprite_watermarks(struct drm_device *dev, int pipe,
  399. uint32_t sprite_width,
  400. int pixel_size);
  401. extern int intel_sprite_set_colorkey(struct drm_device *dev, void *data,
  402. struct drm_file *file_priv);
  403. extern int intel_sprite_get_colorkey(struct drm_device *dev, void *data,
  404. struct drm_file *file_priv);
  405. extern u32 intel_dpio_read(struct drm_i915_private *dev_priv, int reg);
  406. /* Power-related functions, located in intel_pm.c */
  407. /* FBC */
  408. extern void i8xx_disable_fbc(struct drm_device *dev);
  409. extern void i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval);
  410. extern bool i8xx_fbc_enabled(struct drm_device *dev);
  411. extern void g4x_enable_fbc(struct drm_crtc *crtc, unsigned long interval);
  412. extern void g4x_disable_fbc(struct drm_device *dev);
  413. extern bool g4x_fbc_enabled(struct drm_device *dev);
  414. extern void ironlake_enable_fbc(struct drm_crtc *crtc, unsigned long interval);
  415. extern void ironlake_disable_fbc(struct drm_device *dev);
  416. extern bool ironlake_fbc_enabled(struct drm_device *dev);
  417. extern bool intel_fbc_enabled(struct drm_device *dev);
  418. extern void intel_enable_fbc(struct drm_crtc *crtc, unsigned long interval);
  419. extern void intel_update_fbc(struct drm_device *dev);
  420. /* Watermarks */
  421. extern void pineview_update_wm(struct drm_device *dev);
  422. extern void valleyview_update_wm(struct drm_device *dev);
  423. extern void g4x_update_wm(struct drm_device *dev);
  424. extern void i965_update_wm(struct drm_device *dev);
  425. extern void i9xx_update_wm(struct drm_device *dev);
  426. extern void i830_update_wm(struct drm_device *dev);
  427. extern void ironlake_update_wm(struct drm_device *dev);
  428. extern void sandybridge_update_wm(struct drm_device *dev);
  429. extern void sandybridge_update_sprite_wm(struct drm_device *dev, int pipe,
  430. uint32_t sprite_width, int pixel_size);
  431. extern const struct cxsr_latency *intel_get_cxsr_latency(int is_desktop,
  432. int is_ddr3,
  433. int fsb,
  434. int mem);
  435. extern void pineview_disable_cxsr(struct drm_device *dev);
  436. extern int i9xx_get_fifo_size(struct drm_device *dev, int plane);
  437. extern int i85x_get_fifo_size(struct drm_device *dev, int plane);
  438. extern int i845_get_fifo_size(struct drm_device *dev, int plane);
  439. extern int i830_get_fifo_size(struct drm_device *dev, int plane);
  440. /* Clock gating */
  441. extern void ironlake_init_clock_gating(struct drm_device *dev);
  442. extern void gen6_init_clock_gating(struct drm_device *dev);
  443. extern void ivybridge_init_clock_gating(struct drm_device *dev);
  444. extern void valleyview_init_clock_gating(struct drm_device *dev);
  445. extern void g4x_init_clock_gating(struct drm_device *dev);
  446. extern void crestline_init_clock_gating(struct drm_device *dev);
  447. extern void broadwater_init_clock_gating(struct drm_device *dev);
  448. extern void gen3_init_clock_gating(struct drm_device *dev);
  449. extern void i85x_init_clock_gating(struct drm_device *dev);
  450. extern void i830_init_clock_gating(struct drm_device *dev);
  451. extern void ibx_init_clock_gating(struct drm_device *dev);
  452. extern void cpt_init_clock_gating(struct drm_device *dev);
  453. #endif /* __INTEL_DRV_H__ */