Subversion Repositories Kolibri OS

Rev

Rev 3033 | Rev 3480 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3033 Rev 3243
Line 31... Line 31...
31
#define _I915_DRV_H_
31
#define _I915_DRV_H_
Line 32... Line 32...
32
 
32
 
33
#include "i915_reg.h"
33
#include "i915_reg.h"
34
#include "intel_bios.h"
34
#include "intel_bios.h"
-
 
35
#include "intel_ringbuffer.h"
35
#include "intel_ringbuffer.h"
36
#include 
36
//#include 
37
//#include 
37
#include 
38
#include 
38
#include 
39
#include 
39
#include 
40
#include 
Line 40... Line 41...
40
//#include 
41
//#include 
-
 
42
 
Line 41... Line 43...
41
 
43
#include 
42
#include 
44
#include 
Line 67... Line 69...
67
	PIPE_C,
69
	PIPE_C,
68
	I915_MAX_PIPES
70
	I915_MAX_PIPES
69
};
71
};
70
#define pipe_name(p) ((p) + 'A')
72
#define pipe_name(p) ((p) + 'A')
Line -... Line 73...
-
 
73
 
-
 
74
enum transcoder {
-
 
75
	TRANSCODER_A = 0,
-
 
76
	TRANSCODER_B,
-
 
77
	TRANSCODER_C,
-
 
78
	TRANSCODER_EDP = 0xF,
-
 
79
};
-
 
80
#define transcoder_name(t) ((t) + 'A')
71
 
81
 
72
enum plane {
82
enum plane {
73
	PLANE_A = 0,
83
	PLANE_A = 0,
74
	PLANE_B,
84
	PLANE_B,
75
	PLANE_C,
85
	PLANE_C,
Line 102... Line 112...
102
	int fp0_reg;
112
	int fp0_reg;
103
	int fp1_reg;
113
	int fp1_reg;
104
};
114
};
105
#define I915_NUM_PLLS 2
115
#define I915_NUM_PLLS 2
Line -... Line 116...
-
 
116
 
-
 
117
struct intel_ddi_plls {
-
 
118
	int spll_refcount;
-
 
119
	int wrpll1_refcount;
-
 
120
	int wrpll2_refcount;
-
 
121
};
106
 
122
 
107
/* Interface history:
123
/* Interface history:
108
 *
124
 *
109
 * 1.1: Original.
125
 * 1.1: Original.
110
 * 1.2: Add Power Management
126
 * 1.2: Add Power Management
Line 125... Line 141...
125
#define I915_GEM_PHYS_CURSOR_0 1
141
#define I915_GEM_PHYS_CURSOR_0 1
126
#define I915_GEM_PHYS_CURSOR_1 2
142
#define I915_GEM_PHYS_CURSOR_1 2
127
#define I915_GEM_PHYS_OVERLAY_REGS 3
143
#define I915_GEM_PHYS_OVERLAY_REGS 3
128
#define I915_MAX_PHYS_OBJECT (I915_GEM_PHYS_OVERLAY_REGS)
144
#define I915_MAX_PHYS_OBJECT (I915_GEM_PHYS_OVERLAY_REGS)
Line 129... Line -...
129
 
-
 
130
struct mem_block {
-
 
131
	struct mem_block *next;
-
 
132
	struct mem_block *prev;
-
 
133
	int start;
-
 
134
	int size;
-
 
135
	struct drm_file *file_priv; /* NULL: free, -1: heap, other: real files */
145
 
Line 136... Line 146...
136
};
146
 
137
 
147
 
138
struct opregion_header;
148
struct opregion_header;
139
struct opregion_acpi;
149
struct opregion_acpi;
Line 179... Line 189...
179
};
189
};
Line 180... Line 190...
180
 
190
 
Line 181... Line 191...
181
struct intel_display_error_state;
191
struct intel_display_error_state;
-
 
192
 
182
 
193
struct drm_i915_error_state {
183
struct drm_i915_error_state {
194
	struct kref ref;
184
	u32 eir;
195
	u32 eir;
185
	u32 pgtbl_er;
196
	u32 pgtbl_er;
-
 
197
	u32 ier;
-
 
198
	u32 ccid;
186
	u32 ier;
199
	u32 derrmr;
187
	u32 ccid;
200
	u32 forcewake;
188
	bool waiting[I915_NUM_RINGS];
201
	bool waiting[I915_NUM_RINGS];
189
	u32 pipestat[I915_MAX_PIPES];
202
	u32 pipestat[I915_MAX_PIPES];
-
 
203
	u32 tail[I915_NUM_RINGS];
190
	u32 tail[I915_NUM_RINGS];
204
	u32 head[I915_NUM_RINGS];
191
	u32 head[I915_NUM_RINGS];
205
	u32 ctl[I915_NUM_RINGS];
192
	u32 ipeir[I915_NUM_RINGS];
206
	u32 ipeir[I915_NUM_RINGS];
193
	u32 ipehr[I915_NUM_RINGS];
207
	u32 ipehr[I915_NUM_RINGS];
194
	u32 instdone[I915_NUM_RINGS];
208
	u32 instdone[I915_NUM_RINGS];
-
 
209
	u32 acthd[I915_NUM_RINGS];
195
	u32 acthd[I915_NUM_RINGS];
210
	u32 semaphore_mboxes[I915_NUM_RINGS][I915_NUM_RINGS - 1];
196
	u32 semaphore_mboxes[I915_NUM_RINGS][I915_NUM_RINGS - 1];
211
	u32 semaphore_seqno[I915_NUM_RINGS][I915_NUM_RINGS - 1];
197
	u32 rc_psmi[I915_NUM_RINGS]; /* sleep state */
212
	u32 rc_psmi[I915_NUM_RINGS]; /* sleep state */
198
	/* our own tracking of ring head and tail */
213
	/* our own tracking of ring head and tail */
199
	u32 cpu_ring_head[I915_NUM_RINGS];
214
	u32 cpu_ring_head[I915_NUM_RINGS];
Line 252... Line 267...
252
	void (*update_wm)(struct drm_device *dev);
267
	void (*update_wm)(struct drm_device *dev);
253
	void (*update_sprite_wm)(struct drm_device *dev, int pipe,
268
	void (*update_sprite_wm)(struct drm_device *dev, int pipe,
254
				 uint32_t sprite_width, int pixel_size);
269
				 uint32_t sprite_width, int pixel_size);
255
	void (*update_linetime_wm)(struct drm_device *dev, int pipe,
270
	void (*update_linetime_wm)(struct drm_device *dev, int pipe,
256
				 struct drm_display_mode *mode);
271
				 struct drm_display_mode *mode);
-
 
272
	void (*modeset_global_resources)(struct drm_device *dev);
257
	int (*crtc_mode_set)(struct drm_crtc *crtc,
273
	int (*crtc_mode_set)(struct drm_crtc *crtc,
258
			     struct drm_display_mode *mode,
274
			     struct drm_display_mode *mode,
259
			     struct drm_display_mode *adjusted_mode,
275
			     struct drm_display_mode *adjusted_mode,
260
			     int x, int y,
276
			     int x, int y,
261
			     struct drm_framebuffer *old_fb);
277
			     struct drm_framebuffer *old_fb);
Line 264... Line 280...
264
	void (*off)(struct drm_crtc *crtc);
280
	void (*off)(struct drm_crtc *crtc);
265
	void (*write_eld)(struct drm_connector *connector,
281
	void (*write_eld)(struct drm_connector *connector,
266
			  struct drm_crtc *crtc);
282
			  struct drm_crtc *crtc);
267
	void (*fdi_link_train)(struct drm_crtc *crtc);
283
	void (*fdi_link_train)(struct drm_crtc *crtc);
268
	void (*init_clock_gating)(struct drm_device *dev);
284
	void (*init_clock_gating)(struct drm_device *dev);
269
	void (*init_pch_clock_gating)(struct drm_device *dev);
-
 
270
	int (*queue_flip)(struct drm_device *dev, struct drm_crtc *crtc,
285
	int (*queue_flip)(struct drm_device *dev, struct drm_crtc *crtc,
271
			  struct drm_framebuffer *fb,
286
			  struct drm_framebuffer *fb,
272
			  struct drm_i915_gem_object *obj);
287
			  struct drm_i915_gem_object *obj);
273
	int (*update_plane)(struct drm_crtc *crtc, struct drm_framebuffer *fb,
288
	int (*update_plane)(struct drm_crtc *crtc, struct drm_framebuffer *fb,
274
			    int x, int y);
289
			    int x, int y);
Line 339... Line 354...
339
};
354
};
Line 340... Line 355...
340
 
355
 
341
#define I915_PPGTT_PD_ENTRIES 512
356
#define I915_PPGTT_PD_ENTRIES 512
342
#define I915_PPGTT_PT_ENTRIES 1024
357
#define I915_PPGTT_PT_ENTRIES 1024
-
 
358
struct i915_hw_ppgtt {
343
struct i915_hw_ppgtt {
359
	struct drm_device *dev;
344
	unsigned num_pd_entries;
360
	unsigned num_pd_entries;
345
    dma_addr_t *pt_pages;
361
	struct page **pt_pages;
346
	uint32_t pd_offset;
362
	uint32_t pd_offset;
347
	dma_addr_t *pt_dma_addr;
363
	dma_addr_t *pt_dma_addr;
348
	dma_addr_t scratch_page_dma_addr;
364
	dma_addr_t scratch_page_dma_addr;
Line 375... Line 391...
375
	PCH_IBX,	/* Ibexpeak PCH */
391
	PCH_IBX,	/* Ibexpeak PCH */
376
	PCH_CPT,	/* Cougarpoint PCH */
392
	PCH_CPT,	/* Cougarpoint PCH */
377
	PCH_LPT,	/* Lynxpoint PCH */
393
	PCH_LPT,	/* Lynxpoint PCH */
378
};
394
};
Line -... Line 395...
-
 
395
 
-
 
396
enum intel_sbi_destination {
-
 
397
	SBI_ICLK,
-
 
398
	SBI_MPHY,
-
 
399
};
379
 
400
 
380
#define QUIRK_PIPEA_FORCE (1<<0)
401
#define QUIRK_PIPEA_FORCE (1<<0)
381
#define QUIRK_LVDS_SSC_DISABLE (1<<1)
402
#define QUIRK_LVDS_SSC_DISABLE (1<<1)
Line 382... Line 403...
382
#define QUIRK_INVERT_BRIGHTNESS (1<<2)
403
#define QUIRK_INVERT_BRIGHTNESS (1<<2)
383
 
404
 
Line 384... Line 405...
384
struct intel_fbdev;
405
struct intel_fbdev;
385
struct intel_fbc_work;
406
struct intel_fbc_work;
386
 
407
 
387
struct intel_gmbus {
408
struct intel_gmbus {
388
	struct i2c_adapter adapter;
409
	struct i2c_adapter adapter;
389
	bool force_bit;
410
	u32 force_bit;
390
	u32 reg0;
411
	u32 reg0;
391
	u32 gpio_reg;
412
	u32 gpio_reg;
Line 392... Line -...
392
	struct i2c_algo_bit_data bit_algo;
-
 
393
	struct drm_i915_private *dev_priv;
-
 
394
};
-
 
395
 
-
 
396
typedef struct drm_i915_private {
-
 
397
	struct drm_device *dev;
-
 
398
 
-
 
399
	const struct intel_device_info *info;
-
 
400
 
-
 
401
	int relative_constants_mode;
-
 
402
 
-
 
403
	void __iomem *regs;
-
 
404
 
-
 
405
	struct drm_i915_gt_funcs gt;
-
 
406
	/** gt_fifo_count and the subsequent register write are synchronized
-
 
407
	 * with dev->struct_mutex. */
-
 
408
	unsigned gt_fifo_count;
-
 
409
	/** forcewake_count is protected by gt_lock */
-
 
410
	unsigned forcewake_count;
-
 
411
	/** gt_lock is also taken in irq contexts. */
-
 
412
    spinlock_t gt_lock;
-
 
413
 
-
 
414
	struct intel_gmbus gmbus[GMBUS_NUM_PORTS];
-
 
415
 
-
 
416
	/** gmbus_mutex protects against concurrent usage of the single hw gmbus
-
 
417
	 * controller on different i2c buses. */
-
 
418
	struct mutex gmbus_mutex;
-
 
419
 
-
 
420
	/**
-
 
421
	 * Base address of the gmbus and gpio block.
-
 
422
	 */
-
 
423
	uint32_t gpio_mmio_base;
-
 
424
 
-
 
425
	struct pci_dev *bridge_dev;
-
 
426
    struct intel_ring_buffer ring[I915_NUM_RINGS];
-
 
427
	uint32_t next_seqno;
-
 
428
 
-
 
429
    drm_dma_handle_t *status_page_dmah;
-
 
430
	uint32_t counter;
-
 
431
    struct drm_i915_gem_object *pwrctx;
-
 
432
    struct drm_i915_gem_object *renderctx;
-
 
433
 
-
 
434
//   struct resource mch_res;
-
 
435
 
-
 
436
	atomic_t irq_received;
-
 
437
 
-
 
438
	/* protects the irq masks */
-
 
439
	spinlock_t irq_lock;
-
 
440
 
-
 
441
	/* DPIO indirect register protection */
-
 
442
	spinlock_t dpio_lock;
-
 
443
 
-
 
444
	/** Cached value of IMR to avoid reads in updating the bitfield */
-
 
445
	u32 pipestat[2];
-
 
446
	u32 irq_mask;
-
 
447
	u32 gt_irq_mask;
-
 
448
	u32 pch_irq_mask;
-
 
449
 
-
 
450
	u32 hotplug_supported_mask;
-
 
451
	struct work_struct hotplug_work;
-
 
452
 
-
 
453
	int num_pipe;
-
 
454
	int num_pch_pll;
-
 
455
 
-
 
456
	/* For hangcheck timer */
-
 
457
#define DRM_I915_HANGCHECK_PERIOD 1500 /* in ms */
-
 
458
    struct timer_list hangcheck_timer;
-
 
459
	int hangcheck_count;
-
 
460
	uint32_t last_acthd[I915_NUM_RINGS];
-
 
461
	uint32_t prev_instdone[I915_NUM_INSTDONE_REG];
-
 
462
 
-
 
463
	unsigned int stop_rings;
-
 
464
 
-
 
465
	unsigned long cfb_size;
-
 
466
	unsigned int cfb_fb;
-
 
467
	enum plane cfb_plane;
-
 
468
	int cfb_y;
-
 
469
//   struct intel_fbc_work *fbc_work;
-
 
470
 
-
 
471
    struct intel_opregion opregion;
-
 
472
 
-
 
473
	/* overlay */
-
 
474
//   struct intel_overlay *overlay;
-
 
475
	bool sprite_scaling_enabled;
-
 
476
 
-
 
477
	/* LVDS info */
-
 
478
	int backlight_level;  /* restore backlight to this value */
-
 
479
	bool backlight_enabled;
-
 
480
	struct drm_display_mode *lfp_lvds_vbt_mode; /* if any */
-
 
481
	struct drm_display_mode *sdvo_lvds_vbt_mode; /* if any */
-
 
482
 
-
 
483
	/* Feature bits from the VBIOS */
-
 
484
	unsigned int int_tv_support:1;
-
 
485
	unsigned int lvds_dither:1;
-
 
486
	unsigned int lvds_vbt:1;
-
 
487
	unsigned int int_crt_support:1;
-
 
488
	unsigned int lvds_use_ssc:1;
-
 
489
	unsigned int display_clock_mode:1;
-
 
490
	int lvds_ssc_freq;
-
 
491
	unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */
-
 
492
	unsigned int lvds_val; /* used for checking LVDS channel mode */
-
 
493
	struct {
-
 
494
		int rate;
-
 
495
		int lanes;
-
 
496
		int preemphasis;
-
 
497
		int vswing;
-
 
498
 
-
 
499
		bool initialized;
-
 
500
		bool support;
-
 
501
		int bpp;
-
 
502
        struct edp_power_seq pps;
-
 
503
	} edp;
-
 
504
	bool no_aux_handshake;
-
 
505
 
-
 
506
//   struct notifier_block lid_notifier;
-
 
507
 
-
 
508
	int crt_ddc_pin;
-
 
509
	struct drm_i915_fence_reg fence_regs[I915_MAX_NUM_FENCES]; /* assume 965 */
-
 
510
	int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
-
 
511
	int num_fence_regs; /* 8 on pre-965, 16 otherwise */
-
 
512
 
-
 
513
	unsigned int fsb_freq, mem_freq, is_ddr3;
413
	struct i2c_algo_bit_data bit_algo;
514
 
-
 
515
	spinlock_t error_lock;
-
 
516
	/* Protected by dev->error_lock. */
-
 
517
	struct drm_i915_error_state *first_error;
-
 
518
	struct work_struct error_work;
-
 
519
	struct completion error_completion;
-
 
520
    struct workqueue_struct *wq;
-
 
521
 
-
 
522
	/* Display functions */
-
 
523
    struct drm_i915_display_funcs display;
-
 
524
 
-
 
525
	/* PCH chipset type */
-
 
526
	enum intel_pch pch_type;
-
 
527
 
-
 
528
	unsigned long quirks;
414
	struct drm_i915_private *dev_priv;
529
 
415
};
530
	/* Register state */
416
 
531
	bool modeset_on_lid;
417
struct i915_suspend_saved_registers {
532
	u8 saveLBB;
-
 
533
	u32 saveDSPACNTR;
418
	u8 saveLBB;
534
	u32 saveDSPBCNTR;
419
	u32 saveDSPACNTR;
535
	u32 saveDSPARB;
420
	u32 saveDSPBCNTR;
536
	u32 saveHWS;
421
	u32 saveDSPARB;
537
	u32 savePIPEACONF;
422
	u32 savePIPEACONF;
Line 677... Line 562...
677
	u32 savePIPEB_DATA_N1;
562
	u32 savePIPEB_DATA_N1;
678
	u32 savePIPEB_LINK_M1;
563
	u32 savePIPEB_LINK_M1;
679
	u32 savePIPEB_LINK_N1;
564
	u32 savePIPEB_LINK_N1;
680
	u32 saveMCHBAR_RENDER_STANDBY;
565
	u32 saveMCHBAR_RENDER_STANDBY;
681
	u32 savePCH_PORT_HOTPLUG;
566
	u32 savePCH_PORT_HOTPLUG;
-
 
567
};
-
 
568
 
-
 
569
struct intel_gen6_power_mgmt {
-
 
570
	struct work_struct work;
-
 
571
	u32 pm_iir;
-
 
572
	/* lock - irqsave spinlock that protectects the work_struct and
-
 
573
	 * pm_iir. */
-
 
574
	spinlock_t lock;
-
 
575
 
-
 
576
	/* The below variables an all the rps hw state are protected by
-
 
577
	 * dev->struct mutext. */
-
 
578
	u8 cur_delay;
-
 
579
	u8 min_delay;
-
 
580
	u8 max_delay;
-
 
581
 
-
 
582
	struct delayed_work delayed_resume_work;
-
 
583
 
-
 
584
	/*
-
 
585
	 * Protects RPS/RC6 register access and PCU communication.
-
 
586
	 * Must be taken after struct_mutex if nested.
-
 
587
	 */
-
 
588
	struct mutex hw_lock;
-
 
589
};
-
 
590
 
-
 
591
struct intel_ilk_power_mgmt {
-
 
592
	u8 cur_delay;
-
 
593
	u8 min_delay;
-
 
594
	u8 max_delay;
-
 
595
	u8 fmax;
-
 
596
	u8 fstart;
-
 
597
 
-
 
598
	u64 last_count1;
-
 
599
	unsigned long last_time1;
-
 
600
	unsigned long chipset_power;
-
 
601
	u64 last_count2;
-
 
602
	struct timespec last_time2;
-
 
603
	unsigned long gfx_power;
-
 
604
	u8 corr;
-
 
605
 
-
 
606
	int c_m;
-
 
607
	int r_t;
-
 
608
 
-
 
609
	struct drm_i915_gem_object *pwrctx;
-
 
610
	struct drm_i915_gem_object *renderctx;
-
 
611
};
-
 
612
 
-
 
613
struct i915_dri1_state {
-
 
614
	unsigned allow_batchbuffer : 1;
-
 
615
	u32 __iomem *gfx_hws_cpu_addr;
-
 
616
 
-
 
617
	unsigned int cpp;
-
 
618
	int back_offset;
-
 
619
	int front_offset;
-
 
620
	int current_page;
-
 
621
	int page_flipping;
-
 
622
 
-
 
623
	uint32_t counter;
-
 
624
};
-
 
625
 
-
 
626
struct intel_l3_parity {
-
 
627
	u32 *remap_info;
-
 
628
	struct work_struct error_work;
-
 
629
};
-
 
630
 
-
 
631
typedef struct drm_i915_private {
-
 
632
	struct drm_device *dev;
-
 
633
 
-
 
634
	const struct intel_device_info *info;
-
 
635
 
-
 
636
	int relative_constants_mode;
-
 
637
 
-
 
638
	void __iomem *regs;
-
 
639
 
-
 
640
	struct drm_i915_gt_funcs gt;
-
 
641
	/** gt_fifo_count and the subsequent register write are synchronized
-
 
642
	 * with dev->struct_mutex. */
-
 
643
	unsigned gt_fifo_count;
-
 
644
	/** forcewake_count is protected by gt_lock */
-
 
645
	unsigned forcewake_count;
-
 
646
	/** gt_lock is also taken in irq contexts. */
-
 
647
	struct spinlock gt_lock;
-
 
648
 
-
 
649
	struct intel_gmbus gmbus[GMBUS_NUM_PORTS];
-
 
650
 
-
 
651
	/** gmbus_mutex protects against concurrent usage of the single hw gmbus
-
 
652
	 * controller on different i2c buses. */
-
 
653
	struct mutex gmbus_mutex;
-
 
654
 
-
 
655
	/**
-
 
656
	 * Base address of the gmbus and gpio block.
-
 
657
	 */
-
 
658
	uint32_t gpio_mmio_base;
-
 
659
 
-
 
660
	struct pci_dev *bridge_dev;
-
 
661
	struct intel_ring_buffer ring[I915_NUM_RINGS];
-
 
662
	uint32_t next_seqno;
-
 
663
 
-
 
664
	drm_dma_handle_t *status_page_dmah;
-
 
665
	struct resource mch_res;
-
 
666
 
-
 
667
	atomic_t irq_received;
-
 
668
 
-
 
669
	/* protects the irq masks */
-
 
670
	spinlock_t irq_lock;
-
 
671
 
-
 
672
	/* DPIO indirect register protection */
-
 
673
	spinlock_t dpio_lock;
-
 
674
 
-
 
675
	/** Cached value of IMR to avoid reads in updating the bitfield */
-
 
676
	u32 pipestat[2];
-
 
677
	u32 irq_mask;
-
 
678
	u32 gt_irq_mask;
-
 
679
	u32 pch_irq_mask;
-
 
680
 
-
 
681
	u32 hotplug_supported_mask;
-
 
682
	struct work_struct hotplug_work;
-
 
683
 
-
 
684
	int num_pipe;
-
 
685
	int num_pch_pll;
-
 
686
 
-
 
687
	/* For hangcheck timer */
-
 
688
#define DRM_I915_HANGCHECK_PERIOD 1500 /* in ms */
-
 
689
#define DRM_I915_HANGCHECK_JIFFIES msecs_to_jiffies(DRM_I915_HANGCHECK_PERIOD)
-
 
690
	struct timer_list hangcheck_timer;
-
 
691
	int hangcheck_count;
-
 
692
	uint32_t last_acthd[I915_NUM_RINGS];
-
 
693
	uint32_t prev_instdone[I915_NUM_INSTDONE_REG];
-
 
694
 
-
 
695
	unsigned int stop_rings;
-
 
696
 
-
 
697
	unsigned long cfb_size;
-
 
698
	unsigned int cfb_fb;
-
 
699
	enum plane cfb_plane;
-
 
700
	int cfb_y;
-
 
701
	struct intel_fbc_work *fbc_work;
-
 
702
 
-
 
703
	struct intel_opregion opregion;
-
 
704
 
-
 
705
	/* overlay */
-
 
706
	struct intel_overlay *overlay;
-
 
707
	bool sprite_scaling_enabled;
-
 
708
 
-
 
709
	/* LVDS info */
-
 
710
	int backlight_level;  /* restore backlight to this value */
-
 
711
	bool backlight_enabled;
-
 
712
	struct drm_display_mode *lfp_lvds_vbt_mode; /* if any */
-
 
713
	struct drm_display_mode *sdvo_lvds_vbt_mode; /* if any */
-
 
714
 
-
 
715
	/* Feature bits from the VBIOS */
-
 
716
	unsigned int int_tv_support:1;
-
 
717
	unsigned int lvds_dither:1;
-
 
718
	unsigned int lvds_vbt:1;
-
 
719
	unsigned int int_crt_support:1;
-
 
720
	unsigned int lvds_use_ssc:1;
-
 
721
	unsigned int display_clock_mode:1;
-
 
722
	int lvds_ssc_freq;
-
 
723
	unsigned int bios_lvds_val; /* initial [PCH_]LVDS reg val in VBIOS */
-
 
724
	unsigned int lvds_val; /* used for checking LVDS channel mode */
-
 
725
	struct {
-
 
726
		int rate;
-
 
727
		int lanes;
-
 
728
		int preemphasis;
-
 
729
		int vswing;
-
 
730
 
-
 
731
		bool initialized;
-
 
732
		bool support;
-
 
733
		int bpp;
-
 
734
		struct edp_power_seq pps;
-
 
735
	} edp;
-
 
736
	bool no_aux_handshake;
-
 
737
 
-
 
738
	int crt_ddc_pin;
-
 
739
	struct drm_i915_fence_reg fence_regs[I915_MAX_NUM_FENCES]; /* assume 965 */
-
 
740
	int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
-
 
741
	int num_fence_regs; /* 8 on pre-965, 16 otherwise */
-
 
742
 
-
 
743
	unsigned int fsb_freq, mem_freq, is_ddr3;
-
 
744
 
-
 
745
	spinlock_t error_lock;
-
 
746
	/* Protected by dev->error_lock. */
-
 
747
	struct drm_i915_error_state *first_error;
-
 
748
	struct work_struct error_work;
-
 
749
	struct completion error_completion;
-
 
750
	struct workqueue_struct *wq;
-
 
751
 
-
 
752
	/* Display functions */
-
 
753
	struct drm_i915_display_funcs display;
-
 
754
 
-
 
755
	/* PCH chipset type */
-
 
756
	enum intel_pch pch_type;
-
 
757
	unsigned short pch_id;
-
 
758
 
-
 
759
	unsigned long quirks;
-
 
760
 
-
 
761
	/* Register state */
-
 
762
	bool modeset_on_lid;
Line 682... Line 763...
682
 
763
 
683
	struct {
764
	struct {
684
		/** Bridge to intel-gtt-ko */
765
		/** Bridge to intel-gtt-ko */
685
		const struct intel_gtt *gtt;
766
		struct intel_gtt *gtt;
686
		/** Memory allocator for GTT stolen memory */
767
		/** Memory allocator for GTT stolen memory */
687
        struct drm_mm stolen;
768
        struct drm_mm stolen;
688
		/** Memory allocator for GTT */
769
		/** Memory allocator for GTT */
689
        struct drm_mm gtt_space;
770
        struct drm_mm gtt_space;
Line 707... Line 788...
707
		int gtt_mtrr;
788
		int gtt_mtrr;
Line 708... Line 789...
708
 
789
 
709
		/** PPGTT used for aliasing the PPGTT with the GTT */
790
		/** PPGTT used for aliasing the PPGTT with the GTT */
Line 710... Line -...
710
		struct i915_hw_ppgtt *aliasing_ppgtt;
-
 
711
 
-
 
712
		u32 *l3_remap_info;
791
		struct i915_hw_ppgtt *aliasing_ppgtt;
-
 
792
 
Line 713... Line 793...
713
 
793
//       struct shrinker inactive_shrinker;
714
//       struct shrinker inactive_shrinker;
794
		bool shrinker_no_lock_stealing;
715
 
795
 
716
		/**
796
		/**
Line 786... Line 866...
786
		size_t mappable_gtt_total;
866
		size_t mappable_gtt_total;
787
		size_t object_memory;
867
		size_t object_memory;
788
		u32 object_count;
868
		u32 object_count;
789
	} mm;
869
	} mm;
Line 790... Line -...
790
 
-
 
791
	/* Old dri1 support infrastructure, beware the dragons ya fools entering
-
 
792
	 * here! */
-
 
793
	struct {
-
 
794
		unsigned allow_batchbuffer : 1;
-
 
795
		u32 __iomem *gfx_hws_cpu_addr;
-
 
796
 
-
 
797
		unsigned int cpp;
-
 
798
		int back_offset;
-
 
799
		int front_offset;
-
 
800
		int current_page;
-
 
801
		int page_flipping;
-
 
802
	} dri1;
-
 
803
 
870
 
Line 804... Line 871...
804
	/* Kernel Modesetting */
871
	/* Kernel Modesetting */
805
 
872
 
806
    struct sdvo_device_mapping sdvo_mappings[2];
873
    struct sdvo_device_mapping sdvo_mappings[2];
Line 812... Line 879...
812
    struct drm_crtc *plane_to_crtc_mapping[3];
879
    struct drm_crtc *plane_to_crtc_mapping[3];
813
    struct drm_crtc *pipe_to_crtc_mapping[3];
880
    struct drm_crtc *pipe_to_crtc_mapping[3];
814
	wait_queue_head_t pending_flip_queue;
881
	wait_queue_head_t pending_flip_queue;
Line 815... Line 882...
815
 
882
 
-
 
883
	struct intel_pch_pll pch_plls[I915_NUM_PLLS];
Line 816... Line 884...
816
	struct intel_pch_pll pch_plls[I915_NUM_PLLS];
884
	struct intel_ddi_plls ddi_plls;
817
 
885
 
818
	/* Reclocking support */
886
	/* Reclocking support */
819
	bool render_reclock_avail;
887
	bool render_reclock_avail;
820
	bool lvds_downclock_avail;
888
	bool lvds_downclock_avail;
821
	/* indicates the reduced downclock for LVDS*/
889
	/* indicates the reduced downclock for LVDS*/
822
	int lvds_downclock;
890
	int lvds_downclock;
823
	u16 orig_clock;
891
	u16 orig_clock;
824
	int child_dev_num;
-
 
825
    struct child_device_config *child_dev;
-
 
Line 826... Line 892...
826
    struct drm_connector *int_lvds_connector;
892
	int child_dev_num;
Line 827... Line -...
827
    struct drm_connector *int_edp_connector;
-
 
828
 
-
 
829
	bool mchbar_need_disable;
893
    struct child_device_config *child_dev;
830
 
-
 
831
	/* gen6+ rps state */
-
 
832
	struct {
-
 
833
		struct work_struct work;
-
 
Line 834... Line -...
834
	u32 pm_iir;
-
 
835
		/* lock - irqsave spinlock that protectects the work_struct and
894
 
836
		 * pm_iir. */
-
 
837
		spinlock_t lock;
895
	bool mchbar_need_disable;
838
 
-
 
839
		/* The below variables an all the rps hw state are protected by
-
 
Line 840... Line 896...
840
		 * dev->struct mutext. */
896
 
841
		u8 cur_delay;
897
	struct intel_l3_parity l3_parity;
842
		u8 min_delay;
-
 
843
		u8 max_delay;
-
 
844
	} rps;
-
 
845
 
-
 
846
	/* ilk-only ips/rps state. Everything in here is protected by the global
-
 
847
	 * mchdev_lock in intel_pm.c */
-
 
848
	struct {
-
 
849
	u8 cur_delay;
-
 
850
	u8 min_delay;
-
 
851
	u8 max_delay;
-
 
852
	u8 fmax;
-
 
853
	u8 fstart;
898
 
854
 
-
 
855
	u64 last_count1;
-
 
856
	unsigned long last_time1;
-
 
857
	unsigned long chipset_power;
-
 
858
	u64 last_count2;
-
 
859
    struct timespec last_time2;
-
 
Line 860... Line 899...
860
	unsigned long gfx_power;
899
	/* gen6+ rps state */
Line 861... Line 900...
861
		u8 corr;
900
	struct intel_gen6_power_mgmt rps;
862
 
901
 
Line 872... Line 911...
872
	unsigned long last_gpu_reset;
911
	unsigned long last_gpu_reset;
Line 873... Line 912...
873
 
912
 
874
	/* list of fbdev register on this device */
913
	/* list of fbdev register on this device */
Line -... Line 914...
-
 
914
    struct intel_fbdev *fbdev;
-
 
915
 
-
 
916
	/*
-
 
917
	 * The console may be contended at resume, but we don't
-
 
918
	 * want it to block on it.
-
 
919
	 */
875
    struct intel_fbdev *fbdev;
920
	struct work_struct console_resume_work;
Line 876... Line 921...
876
 
921
 
877
//   struct backlight_device *backlight;
922
//   struct backlight_device *backlight;
Line 878... Line 923...
878
 
923
 
879
	struct drm_property *broadcast_rgb_property;
924
	struct drm_property *broadcast_rgb_property;
-
 
925
	struct drm_property *force_audio_property;
-
 
926
 
-
 
927
	bool hw_contexts_disabled;
-
 
928
	uint32_t hw_context_size;
-
 
929
 
-
 
930
	bool fdi_rx_polarity_reversed;
-
 
931
 
-
 
932
	struct i915_suspend_saved_registers regfile;
880
	struct drm_property *force_audio_property;
933
 
Line 881... Line 934...
881
 
934
	/* Old dri1 support infrastructure, beware the dragons ya fools entering
882
	bool hw_contexts_disabled;
935
	 * here! */
883
	uint32_t hw_context_size;
936
	struct i915_dri1_state dri1;
Line 922... Line 975...
922
struct drm_i915_gem_object {
975
struct drm_i915_gem_object {
923
    struct drm_gem_object base;
976
    struct drm_gem_object base;
Line 924... Line 977...
924
 
977
 
Line 925... Line 978...
925
	const struct drm_i915_gem_object_ops *ops;
978
	const struct drm_i915_gem_object_ops *ops;
Line 926... Line 979...
926
 
979
 
927
    void  *mapped;
980
//    void  *mapped;
928
 
981
 
Line 1010... Line 1063...
1010
 
1063
 
1011
	unsigned int has_aliasing_ppgtt_mapping:1;
1064
	unsigned int has_aliasing_ppgtt_mapping:1;
1012
	unsigned int has_global_gtt_mapping:1;
1065
	unsigned int has_global_gtt_mapping:1;
Line 1013... Line 1066...
1013
	unsigned int has_dma_mapping:1;
1066
	unsigned int has_dma_mapping:1;
1014
 
1067
 
1015
    dma_addr_t *allocated_pages;
1068
//    dma_addr_t *allocated_pages;
Line 1016... Line 1069...
1016
    struct pagelist pages;
1069
	struct sg_table *pages;
1017
	int pages_pin_count;
1070
	int pages_pin_count;
1018
 
1071
 
Line 1060... Line 1113...
1060
     * will be page flipped away on the next vblank.  When it
1113
     * will be page flipped away on the next vblank.  When it
1061
     * reaches 0, dev_priv->pending_flip_queue will be woken up.
1114
     * reaches 0, dev_priv->pending_flip_queue will be woken up.
1062
     */
1115
     */
1063
    atomic_t pending_flip;
1116
    atomic_t pending_flip;
1064
};
1117
};
-
 
1118
#define to_gem_object(obj) (&((struct drm_i915_gem_object *)(obj))->base)
Line 1065... Line 1119...
1065
 
1119
 
Line 1066... Line 1120...
1066
#define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base)
1120
#define to_intel_bo(x) container_of(x, struct drm_i915_gem_object, base)
1067
 
1121
 
Line 1096... Line 1150...
1096
	struct list_head client_list;
1150
	struct list_head client_list;
1097
};
1151
};
Line 1098... Line 1152...
1098
 
1152
 
1099
struct drm_i915_file_private {
1153
struct drm_i915_file_private {
1100
	struct {
1154
	struct {
1101
        spinlock_t lock;
1155
		struct spinlock lock;
1102
		struct list_head request_list;
1156
		struct list_head request_list;
1103
	} mm;
1157
	} mm;
1104
	struct idr context_idr;
1158
	struct idr context_idr;
Line 1123... Line 1177...
1123
#define IS_PINEVIEW(dev)	(INTEL_INFO(dev)->is_pineview)
1177
#define IS_PINEVIEW(dev)	(INTEL_INFO(dev)->is_pineview)
1124
#define IS_G33(dev)		(INTEL_INFO(dev)->is_g33)
1178
#define IS_G33(dev)		(INTEL_INFO(dev)->is_g33)
1125
#define IS_IRONLAKE_D(dev)	((dev)->pci_device == 0x0042)
1179
#define IS_IRONLAKE_D(dev)	((dev)->pci_device == 0x0042)
1126
#define IS_IRONLAKE_M(dev)	((dev)->pci_device == 0x0046)
1180
#define IS_IRONLAKE_M(dev)	((dev)->pci_device == 0x0046)
1127
#define IS_IVYBRIDGE(dev)	(INTEL_INFO(dev)->is_ivybridge)
1181
#define IS_IVYBRIDGE(dev)	(INTEL_INFO(dev)->is_ivybridge)
-
 
1182
#define IS_IVB_GT1(dev)		((dev)->pci_device == 0x0156 || \
-
 
1183
				 (dev)->pci_device == 0x0152 ||	\
-
 
1184
				 (dev)->pci_device == 0x015a)
-
 
1185
#define IS_SNB_GT1(dev)		((dev)->pci_device == 0x0102 || \
-
 
1186
				 (dev)->pci_device == 0x0106 ||	\
-
 
1187
				 (dev)->pci_device == 0x010A)
1128
#define IS_VALLEYVIEW(dev)	(INTEL_INFO(dev)->is_valleyview)
1188
#define IS_VALLEYVIEW(dev)	(INTEL_INFO(dev)->is_valleyview)
1129
#define IS_HASWELL(dev)	(INTEL_INFO(dev)->is_haswell)
1189
#define IS_HASWELL(dev)	(INTEL_INFO(dev)->is_haswell)
1130
#define IS_MOBILE(dev)		(INTEL_INFO(dev)->is_mobile)
1190
#define IS_MOBILE(dev)		(INTEL_INFO(dev)->is_mobile)
-
 
1191
#define IS_ULT(dev)		(IS_HASWELL(dev) && \
-
 
1192
				 ((dev)->pci_device & 0xFF00) == 0x0A00)
Line 1131... Line 1193...
1131
 
1193
 
1132
/*
1194
/*
1133
 * The genX designation typically refers to the render engine, so render
1195
 * The genX designation typically refers to the render engine, so render
1134
 * capability related checks should use IS_GEN, while display and other checks
1196
 * capability related checks should use IS_GEN, while display and other checks
Line 1151... Line 1213...
1151
#define HAS_ALIASING_PPGTT(dev)	(INTEL_INFO(dev)->gen >=6 && !IS_VALLEYVIEW(dev))
1213
#define HAS_ALIASING_PPGTT(dev)	(INTEL_INFO(dev)->gen >=6 && !IS_VALLEYVIEW(dev))
Line 1152... Line 1214...
1152
 
1214
 
1153
#define HAS_OVERLAY(dev)		(INTEL_INFO(dev)->has_overlay)
1215
#define HAS_OVERLAY(dev)		(INTEL_INFO(dev)->has_overlay)
Line -... Line 1216...
-
 
1216
#define OVERLAY_NEEDS_PHYSICAL(dev)	(INTEL_INFO(dev)->overlay_needs_physical)
-
 
1217
 
-
 
1218
/* Early gen2 have a totally busted CS tlb and require pinned batches. */
1154
#define OVERLAY_NEEDS_PHYSICAL(dev)	(INTEL_INFO(dev)->overlay_needs_physical)
1219
#define HAS_BROKEN_CS_TLB(dev)		(IS_I830(dev) || IS_845G(dev))
1155
 
1220
 
1156
/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
1221
/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
1157
 * rows, which changed the alignment requirements and fence programming.
1222
 * rows, which changed the alignment requirements and fence programming.
1158
 */
1223
 */
Line 1171... Line 1236...
1171
#define HAS_PIPE_CXSR(dev) (INTEL_INFO(dev)->has_pipe_cxsr)
1236
#define HAS_PIPE_CXSR(dev) (INTEL_INFO(dev)->has_pipe_cxsr)
1172
#define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc)
1237
#define I915_HAS_FBC(dev) (INTEL_INFO(dev)->has_fbc)
Line 1173... Line 1238...
1173
 
1238
 
Line -... Line 1239...
-
 
1239
#define HAS_PIPE_CONTROL(dev) (INTEL_INFO(dev)->gen >= 5)
-
 
1240
 
-
 
1241
#define INTEL_PCH_DEVICE_ID_MASK		0xff00
-
 
1242
#define INTEL_PCH_IBX_DEVICE_ID_TYPE		0x3b00
-
 
1243
#define INTEL_PCH_CPT_DEVICE_ID_TYPE		0x1c00
-
 
1244
#define INTEL_PCH_PPT_DEVICE_ID_TYPE		0x1e00
-
 
1245
#define INTEL_PCH_LPT_DEVICE_ID_TYPE		0x8c00
1174
#define HAS_PIPE_CONTROL(dev) (INTEL_INFO(dev)->gen >= 5)
1246
#define INTEL_PCH_LPT_LP_DEVICE_ID_TYPE		0x9c00
1175
 
1247
 
1176
#define INTEL_PCH_TYPE(dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type)
1248
#define INTEL_PCH_TYPE(dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type)
1177
#define HAS_PCH_LPT(dev) (INTEL_PCH_TYPE(dev) == PCH_LPT)
1249
#define HAS_PCH_LPT(dev) (INTEL_PCH_TYPE(dev) == PCH_LPT)
1178
#define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
1250
#define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
Line 1256... Line 1328...
1256
void i915_hangcheck_elapsed(unsigned long data);
1328
void i915_hangcheck_elapsed(unsigned long data);
1257
void i915_handle_error(struct drm_device *dev, bool wedged);
1329
void i915_handle_error(struct drm_device *dev, bool wedged);
Line 1258... Line 1330...
1258
 
1330
 
1259
extern void intel_irq_init(struct drm_device *dev);
1331
extern void intel_irq_init(struct drm_device *dev);
-
 
1332
extern void intel_gt_init(struct drm_device *dev);
Line 1260... Line 1333...
1260
extern void intel_gt_init(struct drm_device *dev);
1333
extern void intel_gt_reset(struct drm_device *dev);
Line 1261... Line 1334...
1261
 
1334
 
1262
void i915_error_state_free(struct kref *error_ref);
1335
void i915_error_state_free(struct kref *error_ref);
Line 1338... Line 1411...
1338
int __must_check i915_gem_object_unbind(struct drm_i915_gem_object *obj);
1411
int __must_check i915_gem_object_unbind(struct drm_i915_gem_object *obj);
1339
void i915_gem_release_mmap(struct drm_i915_gem_object *obj);
1412
void i915_gem_release_mmap(struct drm_i915_gem_object *obj);
1340
void i915_gem_lastclose(struct drm_device *dev);
1413
void i915_gem_lastclose(struct drm_device *dev);
Line 1341... Line 1414...
1341
 
1414
 
1342
int __must_check i915_gem_object_get_pages(struct drm_i915_gem_object *obj);
-
 
1343
 
1415
int __must_check i915_gem_object_get_pages(struct drm_i915_gem_object *obj);
1344
static inline dma_addr_t i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n)
1416
static inline struct page *i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n)
-
 
1417
{
1345
{
1418
	struct scatterlist *sg = obj->pages->sgl;
-
 
1419
	int nents = obj->pages->nents;
-
 
1420
	while (nents > SG_MAX_SINGLE_ALLOC) {
-
 
1421
		if (n < SG_MAX_SINGLE_ALLOC - 1)
-
 
1422
			break;
-
 
1423
 
-
 
1424
		sg = sg_chain_ptr(sg + SG_MAX_SINGLE_ALLOC - 1);
-
 
1425
		n -= SG_MAX_SINGLE_ALLOC - 1;
1346
    return obj->pages.page[n];
1426
		nents -= SG_MAX_SINGLE_ALLOC - 1;
-
 
1427
	}
1347
};
1428
	return sg_page(sg+n);
1348
 
1429
}
1349
static inline void i915_gem_object_pin_pages(struct drm_i915_gem_object *obj)
1430
static inline void i915_gem_object_pin_pages(struct drm_i915_gem_object *obj)
1350
{
1431
{
1351
    BUG_ON(obj->pages.page == NULL);
1432
	BUG_ON(obj->pages == NULL);
1352
	obj->pages_pin_count++;
1433
	obj->pages_pin_count++;
1353
}
1434
}
1354
static inline void i915_gem_object_unpin_pages(struct drm_i915_gem_object *obj)
1435
static inline void i915_gem_object_unpin_pages(struct drm_i915_gem_object *obj)
1355
{
1436
{
Line 1359... Line 1440...
1359
 
1440
 
1360
int __must_check i915_mutex_lock_interruptible(struct drm_device *dev);
1441
int __must_check i915_mutex_lock_interruptible(struct drm_device *dev);
1361
int i915_gem_object_sync(struct drm_i915_gem_object *obj,
1442
int i915_gem_object_sync(struct drm_i915_gem_object *obj,
1362
			 struct intel_ring_buffer *to);
1443
			 struct intel_ring_buffer *to);
1363
void i915_gem_object_move_to_active(struct drm_i915_gem_object *obj,
1444
void i915_gem_object_move_to_active(struct drm_i915_gem_object *obj,
1364
				    struct intel_ring_buffer *ring,
-
 
Line 1365... Line 1445...
1365
				    u32 seqno);
1445
				    struct intel_ring_buffer *ring);
1366
 
1446
 
1367
int i915_gem_dumb_create(struct drm_file *file_priv,
1447
int i915_gem_dumb_create(struct drm_file *file_priv,
1368
			 struct drm_device *dev,
1448
			 struct drm_device *dev,
Line 1378... Line 1458...
1378
i915_seqno_passed(uint32_t seq1, uint32_t seq2)
1458
i915_seqno_passed(uint32_t seq1, uint32_t seq2)
1379
{
1459
{
1380
	return (int32_t)(seq1 - seq2) >= 0;
1460
	return (int32_t)(seq1 - seq2) >= 0;
1381
}
1461
}
Line 1382... Line 1462...
1382
 
1462
 
Line 1383... Line 1463...
1383
u32 i915_gem_next_request_seqno(struct intel_ring_buffer *ring);
1463
extern int i915_gem_get_seqno(struct drm_device *dev, u32 *seqno);
1384
 
1464
 
Line 1385... Line 1465...
1385
int __must_check i915_gem_object_get_fence(struct drm_i915_gem_object *obj);
1465
int __must_check i915_gem_object_get_fence(struct drm_i915_gem_object *obj);
Line 1488... Line 1568...
1488
void i915_gem_gtt_finish_object(struct drm_i915_gem_object *obj);
1568
void i915_gem_gtt_finish_object(struct drm_i915_gem_object *obj);
1489
void i915_gem_init_global_gtt(struct drm_device *dev,
1569
void i915_gem_init_global_gtt(struct drm_device *dev,
1490
			      unsigned long start,
1570
			      unsigned long start,
1491
			      unsigned long mappable_end,
1571
			      unsigned long mappable_end,
1492
			      unsigned long end);
1572
			      unsigned long end);
-
 
1573
int i915_gem_gtt_init(struct drm_device *dev);
-
 
1574
void i915_gem_gtt_fini(struct drm_device *dev);
-
 
1575
static inline void i915_gem_chipset_flush(struct drm_device *dev)
-
 
1576
{
-
 
1577
	if (INTEL_INFO(dev)->gen < 6)
-
 
1578
		intel_gtt_chipset_flush();
-
 
1579
}
-
 
1580
 
Line 1493... Line 1581...
1493
 
1581
 
1494
/* i915_gem_evict.c */
1582
/* i915_gem_evict.c */
1495
int __must_check i915_gem_evict_something(struct drm_device *dev, int min_size,
1583
int __must_check i915_gem_evict_something(struct drm_device *dev, int min_size,
1496
					  unsigned alignment,
1584
					  unsigned alignment,
Line 1584... Line 1672...
1584
extern void intel_modeset_init_hw(struct drm_device *dev);
1672
extern void intel_modeset_init_hw(struct drm_device *dev);
1585
extern void intel_modeset_init(struct drm_device *dev);
1673
extern void intel_modeset_init(struct drm_device *dev);
1586
extern void intel_modeset_gem_init(struct drm_device *dev);
1674
extern void intel_modeset_gem_init(struct drm_device *dev);
1587
extern void intel_modeset_cleanup(struct drm_device *dev);
1675
extern void intel_modeset_cleanup(struct drm_device *dev);
1588
extern int intel_modeset_vga_set_state(struct drm_device *dev, bool state);
1676
extern int intel_modeset_vga_set_state(struct drm_device *dev, bool state);
1589
extern void intel_modeset_setup_hw_state(struct drm_device *dev);
1677
extern void intel_modeset_setup_hw_state(struct drm_device *dev,
-
 
1678
					 bool force_restore);
1590
extern bool intel_fbc_enabled(struct drm_device *dev);
1679
extern bool intel_fbc_enabled(struct drm_device *dev);
1591
extern void intel_disable_fbc(struct drm_device *dev);
1680
extern void intel_disable_fbc(struct drm_device *dev);
1592
extern bool ironlake_set_drps(struct drm_device *dev, u8 val);
1681
extern bool ironlake_set_drps(struct drm_device *dev, u8 val);
1593
extern void ironlake_init_pch_refclk(struct drm_device *dev);
1682
extern void intel_init_pch_refclk(struct drm_device *dev);
1594
extern void gen6_set_rps(struct drm_device *dev, u8 val);
1683
extern void gen6_set_rps(struct drm_device *dev, u8 val);
1595
extern void intel_detect_pch(struct drm_device *dev);
1684
extern void intel_detect_pch(struct drm_device *dev);
1596
extern int intel_trans_dp_port_sel(struct drm_crtc *crtc);
1685
extern int intel_trans_dp_port_sel(struct drm_crtc *crtc);
1597
extern int intel_enable_rc6(const struct drm_device *dev);
1686
extern int intel_enable_rc6(const struct drm_device *dev);
Line 1617... Line 1706...
1617
 */
1706
 */
1618
void gen6_gt_force_wake_get(struct drm_i915_private *dev_priv);
1707
void gen6_gt_force_wake_get(struct drm_i915_private *dev_priv);
1619
void gen6_gt_force_wake_put(struct drm_i915_private *dev_priv);
1708
void gen6_gt_force_wake_put(struct drm_i915_private *dev_priv);
1620
int __gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv);
1709
int __gen6_gt_wait_for_fifo(struct drm_i915_private *dev_priv);
Line -... Line 1710...
-
 
1710
 
-
 
1711
int sandybridge_pcode_read(struct drm_i915_private *dev_priv, u8 mbox, u32 *val);
-
 
1712
int sandybridge_pcode_write(struct drm_i915_private *dev_priv, u8 mbox, u32 val);
1621
 
1713
 
1622
#define __i915_read(x, y) \
1714
#define __i915_read(x, y) \
Line 1623... Line 1715...
1623
	u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg);
1715
	u##x i915_read##x(struct drm_i915_private *dev_priv, u32 reg);
1624
 
1716