Subversion Repositories Kolibri OS

Rev

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

Rev 4560 Rev 5060
Line 30... Line 30...
30
#include 
30
#include 
31
#include "i915_drv.h"
31
#include "i915_drv.h"
32
#include 
32
#include 
33
#include 
33
#include 
34
#include 
34
#include 
35
#include 
35
#include 
Line 36... Line 36...
36
 
36
 
Line 37... Line 37...
37
#define KBUILD_MODNAME "i915.dll"
37
#define KBUILD_MODNAME "i915.dll"
Line 46... Line 46...
46
 * contexts. Note that it's important that we check the condition again after
46
 * contexts. Note that it's important that we check the condition again after
47
 * having timed out, since the timeout could be due to preemption or similar and
47
 * having timed out, since the timeout could be due to preemption or similar and
48
 * we've never had a chance to check the condition before the timeout.
48
 * we've never had a chance to check the condition before the timeout.
49
 */
49
 */
50
#define _wait_for(COND, MS, W) ({ \
50
#define _wait_for(COND, MS, W) ({ \
51
    unsigned long timeout__ = GetTimerTicks() + msecs_to_jiffies(MS);  \
51
	unsigned long timeout__ = jiffies + msecs_to_jiffies(MS) + 1;	\
52
	int ret__ = 0;							\
52
	int ret__ = 0;							\
53
	while (!(COND)) {						\
53
	while (!(COND)) {						\
54
        if (time_after(GetTimerTicks(), timeout__)) {          \
54
		if (time_after(jiffies, timeout__)) {			\
55
			if (!(COND))					\
55
			if (!(COND))					\
56
			ret__ = -ETIMEDOUT;				\
56
			ret__ = -ETIMEDOUT;				\
57
			break;						\
57
			break;						\
58
		}							\
58
		}							\
59
		if (W )  {				\
59
		if (W )  {				\
Line 81... Line 81...
81
/* The i830->i865 use multiple DVOs with multiple i2cs */
81
/* The i830->i865 use multiple DVOs with multiple i2cs */
82
/* the i915, i945 have a single sDVO i2c bus - which is different */
82
/* the i915, i945 have a single sDVO i2c bus - which is different */
83
#define MAX_OUTPUTS 6
83
#define MAX_OUTPUTS 6
84
/* maximum connectors per crtcs in the mode set */
84
/* maximum connectors per crtcs in the mode set */
Line -... Line 85...
-
 
85
 
-
 
86
/* Maximum cursor sizes */
-
 
87
#define GEN2_CURSOR_WIDTH 64
-
 
88
#define GEN2_CURSOR_HEIGHT 64
-
 
89
#define MAX_CURSOR_WIDTH 256
-
 
90
#define MAX_CURSOR_HEIGHT 256
85
 
91
 
86
#define INTEL_I2C_BUS_DVO 1
92
#define INTEL_I2C_BUS_DVO 1
Line 87... Line 93...
87
#define INTEL_I2C_BUS_SDVO 2
93
#define INTEL_I2C_BUS_SDVO 2
88
 
94
 
Line 97... Line 103...
97
#define INTEL_OUTPUT_HDMI 6
103
#define INTEL_OUTPUT_HDMI 6
98
#define INTEL_OUTPUT_DISPLAYPORT 7
104
#define INTEL_OUTPUT_DISPLAYPORT 7
99
#define INTEL_OUTPUT_EDP 8
105
#define INTEL_OUTPUT_EDP 8
100
#define INTEL_OUTPUT_DSI 9
106
#define INTEL_OUTPUT_DSI 9
101
#define INTEL_OUTPUT_UNKNOWN 10
107
#define INTEL_OUTPUT_UNKNOWN 10
-
 
108
#define INTEL_OUTPUT_DP_MST 11
Line 102... Line 109...
102
 
109
 
103
#define INTEL_DVO_CHIP_NONE 0
110
#define INTEL_DVO_CHIP_NONE 0
104
#define INTEL_DVO_CHIP_LVDS 1
111
#define INTEL_DVO_CHIP_LVDS 1
105
#define INTEL_DVO_CHIP_TMDS 2
112
#define INTEL_DVO_CHIP_TMDS 2
Line 106... Line 113...
106
#define INTEL_DVO_CHIP_TVOUT 4
113
#define INTEL_DVO_CHIP_TVOUT 4
107
 
114
 
Line 108... Line 115...
108
#define INTEL_DSI_COMMAND_MODE	0
115
#define INTEL_DSI_VIDEO_MODE	0
109
#define INTEL_DSI_VIDEO_MODE	1
116
#define INTEL_DSI_COMMAND_MODE	1
110
 
117
 
111
struct intel_framebuffer {
118
struct intel_framebuffer {
Line 112... Line 119...
112
	struct drm_framebuffer base;
119
	struct drm_framebuffer base;
113
	struct drm_i915_gem_object *obj;
120
	struct drm_i915_gem_object *obj;
114
};
121
};
115
 
122
 
116
struct intel_fbdev {
123
struct intel_fbdev {
-
 
124
	struct drm_fb_helper helper;
117
	struct drm_fb_helper helper;
125
	struct intel_framebuffer *fb;
Line 118... Line 126...
118
	struct intel_framebuffer ifb;
126
	struct list_head fbdev_list;
119
	struct list_head fbdev_list;
127
	struct drm_display_mode *our_mode;
120
	struct drm_display_mode *our_mode;
128
	int preferred_bpp;
Line 127... Line 135...
127
	 * base->crtc while a modeset is in progress.
135
	 * base->crtc while a modeset is in progress.
128
	 */
136
	 */
129
	struct intel_crtc *new_crtc;
137
	struct intel_crtc *new_crtc;
Line 130... Line 138...
130
 
138
 
131
	int type;
-
 
132
	/*
-
 
133
	 * Intel hw has only one MUX where encoders could be clone, hence a
-
 
134
	 * simple flag is enough to compute the possible_clones mask.
-
 
135
	 */
139
	int type;
136
	bool cloneable;
140
	unsigned int cloneable;
137
	bool connectors_active;
141
	bool connectors_active;
138
	void (*hot_plug)(struct intel_encoder *);
142
	void (*hot_plug)(struct intel_encoder *);
139
	bool (*compute_config)(struct intel_encoder *,
143
	bool (*compute_config)(struct intel_encoder *,
140
			       struct intel_crtc_config *);
144
			       struct intel_crtc_config *);
Line 152... Line 156...
152
	 * state. This must be called _after_ display->get_pipe_config has
156
	 * state. This must be called _after_ display->get_pipe_config has
153
	 * pre-filled the pipe config. Note that intel_encoder->base.crtc must
157
	 * pre-filled the pipe config. Note that intel_encoder->base.crtc must
154
	 * be set correctly before calling this function. */
158
	 * be set correctly before calling this function. */
155
	void (*get_config)(struct intel_encoder *,
159
	void (*get_config)(struct intel_encoder *,
156
			   struct intel_crtc_config *pipe_config);
160
			   struct intel_crtc_config *pipe_config);
-
 
161
	/*
-
 
162
	 * Called during system suspend after all pending requests for the
-
 
163
	 * encoder are flushed (for example for DP AUX transactions) and
-
 
164
	 * device interrupts are disabled.
-
 
165
	 */
-
 
166
	void (*suspend)(struct intel_encoder *);
157
	int crtc_mask;
167
	int crtc_mask;
158
	enum hpd_pin hpd_pin;
168
	enum hpd_pin hpd_pin;
159
};
169
};
Line 160... Line 170...
160
 
170
 
Line 165... Line 175...
165
 
175
 
166
	/* backlight */
176
	/* backlight */
167
	struct {
177
	struct {
168
		bool present;
178
		bool present;
-
 
179
		u32 level;
169
		u32 level;
180
		u32 min;
170
		u32 max;
181
		u32 max;
171
		bool enabled;
182
		bool enabled;
172
		bool combination_mode;	/* gen 2/4 only */
183
		bool combination_mode;	/* gen 2/4 only */
173
		bool active_low_pwm;
184
		bool active_low_pwm;
Line 190... Line 201...
190
 
201
 
191
	/* Reads out the current hw, returning true if the connector is enabled
202
	/* Reads out the current hw, returning true if the connector is enabled
192
	 * and active (i.e. dpms ON state). */
203
	 * and active (i.e. dpms ON state). */
Line -... Line 204...
-
 
204
	bool (*get_hw_state)(struct intel_connector *);
-
 
205
 
-
 
206
	/*
-
 
207
	 * Removes all interfaces through which the connector is accessible
-
 
208
	 * - like sysfs, debugfs entries -, so that no new operations can be
-
 
209
	 * started on the connector. Also makes sure all currently pending
-
 
210
	 * operations finish before returing.
-
 
211
	 */
193
	bool (*get_hw_state)(struct intel_connector *);
212
	void (*unregister)(struct intel_connector *);
194
 
213
 
Line 195... Line 214...
195
	/* Panel info for eDP and LVDS */
214
	/* Panel info for eDP and LVDS */
196
	struct intel_panel panel;
215
	struct intel_panel panel;
Line 197... Line 216...
197
 
216
 
198
	/* Cached EDID for eDP and LVDS. May hold ERR_PTR for invalid EDID. */
217
	/* Cached EDID for eDP and LVDS. May hold ERR_PTR for invalid EDID. */
199
	struct edid *edid;
218
	struct edid *edid;
-
 
219
 
-
 
220
	/* since POLL and HPD connectors may use the same HPD line keep the native
-
 
221
	   state of connector->polled in case hotplug storm detection changes it */
-
 
222
	u8 polled;
200
 
223
 
Line 201... Line 224...
201
	/* since POLL and HPD connectors may use the same HPD line keep the native
224
	void *port; /* store this opaque as its illegal to dereference it */
202
	   state of connector->polled in case hotplug storm detection changes it */
225
 
203
	u8 polled;
226
	struct intel_dp *mst_port;
Line 213... Line 236...
213
	int	vco;
236
	int	vco;
214
	int	m;
237
	int	m;
215
	int	p;
238
	int	p;
216
} intel_clock_t;
239
} intel_clock_t;
Line -... Line 240...
-
 
240
 
-
 
241
struct intel_plane_config {
-
 
242
	bool tiled;
-
 
243
	int size;
-
 
244
	u32 base;
-
 
245
};
217
 
246
 
218
struct intel_crtc_config {
247
struct intel_crtc_config {
219
	/**
248
	/**
220
	 * quirks - bitfield with hw state readout quirks
249
	 * quirks - bitfield with hw state readout quirks
221
	 *
250
	 *
222
	 * For various reasons the hw state readout code might not be able to
251
	 * For various reasons the hw state readout code might not be able to
223
	 * completely faithfully read out the current state. These cases are
252
	 * completely faithfully read out the current state. These cases are
224
	 * tracked with quirk flags so that fastboot and state checker can act
253
	 * tracked with quirk flags so that fastboot and state checker can act
225
	 * accordingly.
254
	 * accordingly.
226
	 */
255
	 */
-
 
256
#define PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS (1<<0) /* unreliable sync mode.flags */
227
#define PIPE_CONFIG_QUIRK_MODE_SYNC_FLAGS (1<<0) /* unreliable sync mode.flags */
257
#define PIPE_CONFIG_QUIRK_INHERITED_MODE	(1<<1) /* mode inherited from firmware */
Line 228... Line 258...
228
	unsigned long quirks;
258
	unsigned long quirks;
229
 
259
 
230
	/* User requested mode, only valid as a starting point to
260
	/* User requested mode, only valid as a starting point to
Line 258... Line 288...
258
 
288
 
259
	/* DP has a bunch of special case unfortunately, so mark the pipe
289
	/* DP has a bunch of special case unfortunately, so mark the pipe
260
	 * accordingly. */
290
	 * accordingly. */
Line -... Line 291...
-
 
291
	bool has_dp_encoder;
-
 
292
 
-
 
293
	/* Whether we should send NULL infoframes. Required for audio. */
-
 
294
	bool has_hdmi_sink;
-
 
295
 
-
 
296
	/* Audio enabled on this pipe. Only valid if either has_hdmi_sink or
-
 
297
	 * has_dp_encoder is set. */
261
	bool has_dp_encoder;
298
	bool has_audio;
262
 
299
 
263
	/*
300
	/*
264
	 * Enable dithering, used when the selected pipe bpp doesn't match the
301
	 * Enable dithering, used when the selected pipe bpp doesn't match the
265
	 * plane bpp.
302
	 * plane bpp.
Line 285... Line 322...
285
	struct dpll dpll;
322
	struct dpll dpll;
Line 286... Line 323...
286
 
323
 
287
	/* Selected dpll when shared or DPLL_ID_PRIVATE. */
324
	/* Selected dpll when shared or DPLL_ID_PRIVATE. */
Line -... Line 325...
-
 
325
	enum intel_dpll_id shared_dpll;
-
 
326
 
-
 
327
	/* PORT_CLK_SEL for DDI ports. */
288
	enum intel_dpll_id shared_dpll;
328
	uint32_t ddi_pll_sel;
289
 
329
 
Line 290... Line 330...
290
	/* Actual register state of the dpll, for shared dpll cross-checking. */
330
	/* Actual register state of the dpll, for shared dpll cross-checking. */
291
	struct intel_dpll_hw_state dpll_hw_state;
331
	struct intel_dpll_hw_state dpll_hw_state;
Line -... Line 332...
-
 
332
 
-
 
333
	int pipe_bpp;
-
 
334
	struct intel_link_m_n dp_m_n;
292
 
335
 
293
	int pipe_bpp;
336
	/* m2_n2 for eDP downclock */
294
	struct intel_link_m_n dp_m_n;
337
	struct intel_link_m_n dp_m2_n2;
295
 
338
 
296
	/*
339
	/*
Line 313... Line 356...
313
	/* Panel fitter placement and size for Ironlake+ */
356
	/* Panel fitter placement and size for Ironlake+ */
314
	struct {
357
	struct {
315
		u32 pos;
358
		u32 pos;
316
		u32 size;
359
		u32 size;
317
		bool enabled;
360
		bool enabled;
-
 
361
		bool force_thru;
318
	} pch_pfit;
362
	} pch_pfit;
Line 319... Line 363...
319
 
363
 
320
	/* FDI configuration, only valid if has_pch_encoder is set. */
364
	/* FDI configuration, only valid if has_pch_encoder is set. */
321
	int fdi_lanes;
365
	int fdi_lanes;
Line 322... Line 366...
322
	struct intel_link_m_n fdi_m_n;
366
	struct intel_link_m_n fdi_m_n;
Line 323... Line 367...
323
 
367
 
-
 
368
	bool ips_enabled;
-
 
369
 
-
 
370
	bool double_wide;
324
	bool ips_enabled;
371
 
Line 325... Line 372...
325
 
372
	bool dp_encoder_is_mst;
326
	bool double_wide;
373
	int pbn;
327
};
374
};
328
 
375
 
-
 
376
struct intel_pipe_wm {
-
 
377
	struct intel_wm_level wm[5];
-
 
378
	uint32_t linetime;
-
 
379
	bool fbc_wm_enabled;
-
 
380
	bool pipe_enabled;
-
 
381
	bool sprites_enabled;
-
 
382
	bool sprites_scaled;
-
 
383
};
329
struct intel_pipe_wm {
384
 
Line 330... Line 385...
330
	struct intel_wm_level wm[5];
385
struct intel_mmio_flip {
331
	uint32_t linetime;
386
	u32 seqno;
332
	bool fbc_wm_enabled;
387
	u32 ring_id;
Line 342... Line 397...
342
	 * that crtc->enabled is set, i.e. the current mode configuration has
397
	 * that crtc->enabled is set, i.e. the current mode configuration has
343
	 * some outputs connected to this crtc.
398
	 * some outputs connected to this crtc.
344
	 */
399
	 */
345
	bool active;
400
	bool active;
346
	unsigned long enabled_power_domains;
401
	unsigned long enabled_power_domains;
347
	bool eld_vld;
-
 
348
	bool primary_enabled; /* is the primary plane (partially) visible? */
402
	bool primary_enabled; /* is the primary plane (partially) visible? */
349
	bool lowfreq_avail;
403
	bool lowfreq_avail;
350
	struct intel_overlay *overlay;
404
	struct intel_overlay *overlay;
351
	struct intel_unpin_work *unpin_work;
405
	struct intel_unpin_work *unpin_work;
Line 357... Line 411...
357
	 * handled in the hw itself (with the TILEOFF register). */
411
	 * handled in the hw itself (with the TILEOFF register). */
358
	unsigned long dspaddr_offset;
412
	unsigned long dspaddr_offset;
Line 359... Line 413...
359
 
413
 
360
	struct drm_i915_gem_object *cursor_bo;
414
	struct drm_i915_gem_object *cursor_bo;
361
	uint32_t cursor_addr;
-
 
362
	int16_t cursor_x, cursor_y;
415
	uint32_t cursor_addr;
-
 
416
	int16_t cursor_width, cursor_height;
363
	int16_t cursor_width, cursor_height;
417
	uint32_t cursor_cntl;
Line -... Line 418...
-
 
418
	uint32_t cursor_base;
364
	bool cursor_visible;
419
 
365
 
-
 
-
 
420
	struct intel_plane_config plane_config;
366
	struct intel_crtc_config config;
421
	struct intel_crtc_config config;
Line 367... Line 422...
367
 
422
	struct intel_crtc_config *new_config;
368
	uint32_t ddi_pll_sel;
423
	bool new_enabled;
Line 369... Line 424...
369
 
424
 
Line 377... Line 432...
377
	/* per-pipe watermark state */
432
	/* per-pipe watermark state */
378
	struct {
433
	struct {
379
		/* watermarks currently being used  */
434
		/* watermarks currently being used  */
380
		struct intel_pipe_wm active;
435
		struct intel_pipe_wm active;
381
	} wm;
436
	} wm;
-
 
437
 
-
 
438
	wait_queue_head_t vbl_wait;
-
 
439
 
-
 
440
	int scanline_offset;
382
};
441
};
Line 383... Line 442...
383
 
442
 
384
struct intel_plane_wm_parameters {
443
struct intel_plane_wm_parameters {
-
 
444
	uint32_t horiz_pixels;
385
	uint32_t horiz_pixels;
445
	uint32_t vert_pixels;
386
	uint8_t bytes_per_pixel;
446
	uint8_t bytes_per_pixel;
387
	bool enabled;
447
	bool enabled;
388
	bool scaled;
448
	bool scaled;
Line 393... Line 453...
393
	int plane;
453
	int plane;
394
	enum pipe pipe;
454
	enum pipe pipe;
395
	struct drm_i915_gem_object *obj;
455
	struct drm_i915_gem_object *obj;
396
	bool can_scale;
456
	bool can_scale;
397
	int max_downscale;
457
	int max_downscale;
398
	u32 lut_r[1024], lut_g[1024], lut_b[1024];
-
 
399
	int crtc_x, crtc_y;
458
	int crtc_x, crtc_y;
400
	unsigned int crtc_w, crtc_h;
459
	unsigned int crtc_w, crtc_h;
401
	uint32_t src_x, src_y;
460
	uint32_t src_x, src_y;
402
	uint32_t src_w, src_h;
461
	uint32_t src_w, src_h;
Line 446... Line 505...
446
#define to_intel_crtc(x) container_of(x, struct intel_crtc, base)
505
#define to_intel_crtc(x) container_of(x, struct intel_crtc, base)
447
#define to_intel_connector(x) container_of(x, struct intel_connector, base)
506
#define to_intel_connector(x) container_of(x, struct intel_connector, base)
448
#define to_intel_encoder(x) container_of(x, struct intel_encoder, base)
507
#define to_intel_encoder(x) container_of(x, struct intel_encoder, base)
449
#define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
508
#define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
450
#define to_intel_plane(x) container_of(x, struct intel_plane, base)
509
#define to_intel_plane(x) container_of(x, struct intel_plane, base)
-
 
510
#define intel_fb_obj(x) (x ? to_intel_framebuffer(x)->obj : NULL)
Line 451... Line 511...
451
 
511
 
452
struct intel_hdmi {
512
struct intel_hdmi {
453
	u32 hdmi_reg;
513
	u32 hdmi_reg;
454
	int ddc_bus;
514
	int ddc_bus;
455
	uint32_t color_range;
515
	uint32_t color_range;
456
	bool color_range_auto;
516
	bool color_range_auto;
457
	bool has_hdmi_sink;
517
	bool has_hdmi_sink;
458
	bool has_audio;
518
	bool has_audio;
459
	enum hdmi_force_audio force_audio;
519
	enum hdmi_force_audio force_audio;
-
 
520
	bool rgb_quant_range_selectable;
460
	bool rgb_quant_range_selectable;
521
	enum hdmi_picture_aspect aspect_ratio;
461
	void (*write_infoframe)(struct drm_encoder *encoder,
522
	void (*write_infoframe)(struct drm_encoder *encoder,
462
				enum hdmi_infoframe_type type,
523
				enum hdmi_infoframe_type type,
463
				const void *frame, ssize_t len);
524
				const void *frame, ssize_t len);
-
 
525
	void (*set_infoframes)(struct drm_encoder *encoder,
464
	void (*set_infoframes)(struct drm_encoder *encoder,
526
			       bool enable,
465
			       struct drm_display_mode *adjusted_mode);
527
			       struct drm_display_mode *adjusted_mode);
Line -... Line 528...
-
 
528
};
466
};
529
 
Line -... Line 530...
-
 
530
struct intel_dp_mst_encoder;
-
 
531
#define DP_MAX_DOWNSTREAM_PORTS		0x10
-
 
532
 
-
 
533
/**
-
 
534
 * HIGH_RR is the highest eDP panel refresh rate read from EDID
-
 
535
 * LOW_RR is the lowest eDP panel refresh rate found from EDID
-
 
536
 * parsing for same resolution.
-
 
537
 */
-
 
538
enum edp_drrs_refresh_rate_type {
-
 
539
	DRRS_HIGH_RR,
-
 
540
	DRRS_LOW_RR,
467
 
541
	DRRS_MAX_RR, /* RR count */
468
#define DP_MAX_DOWNSTREAM_PORTS		0x10
542
};
469
 
543
 
470
struct intel_dp {
544
struct intel_dp {
471
	uint32_t output_reg;
545
	uint32_t output_reg;
Line 478... Line 552...
478
	uint8_t link_bw;
552
	uint8_t link_bw;
479
	uint8_t lane_count;
553
	uint8_t lane_count;
480
	uint8_t dpcd[DP_RECEIVER_CAP_SIZE];
554
	uint8_t dpcd[DP_RECEIVER_CAP_SIZE];
481
	uint8_t psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE];
555
	uint8_t psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE];
482
	uint8_t downstream_ports[DP_MAX_DOWNSTREAM_PORTS];
556
	uint8_t downstream_ports[DP_MAX_DOWNSTREAM_PORTS];
483
	struct i2c_adapter adapter;
-
 
484
	struct i2c_algo_dp_aux_data algo;
557
	struct drm_dp_aux aux;
485
	uint8_t train_set[4];
558
	uint8_t train_set[4];
486
	int panel_power_up_delay;
559
	int panel_power_up_delay;
487
	int panel_power_down_delay;
560
	int panel_power_down_delay;
488
	int panel_power_cycle_delay;
561
	int panel_power_cycle_delay;
489
	int backlight_on_delay;
562
	int backlight_on_delay;
490
	int backlight_off_delay;
563
	int backlight_off_delay;
491
	struct delayed_work panel_vdd_work;
564
	struct delayed_work panel_vdd_work;
492
	bool want_panel_vdd;
565
	bool want_panel_vdd;
-
 
566
	unsigned long last_power_cycle;
-
 
567
	unsigned long last_power_on;
-
 
568
	unsigned long last_backlight_off;
-
 
569
 
493
	bool psr_setup_done;
570
	bool use_tps3;
-
 
571
	bool can_mst; /* this port supports mst */
-
 
572
	bool is_mst;
-
 
573
	int active_mst_links;
-
 
574
	/* connector directly attached - won't be use for modeset in mst world */
494
	struct intel_connector *attached_connector;
575
	struct intel_connector *attached_connector;
-
 
576
 
-
 
577
	/* mst connector list */
-
 
578
	struct intel_dp_mst_encoder *mst_encoders[I915_MAX_PIPES];
-
 
579
	struct drm_dp_mst_topology_mgr mst_mgr;
-
 
580
 
-
 
581
	uint32_t (*get_aux_clock_divider)(struct intel_dp *dp, int index);
-
 
582
	/*
-
 
583
	 * This function returns the value we have to program the AUX_CTL
-
 
584
	 * register with to kick off an AUX transaction.
-
 
585
	 */
-
 
586
	uint32_t (*get_aux_send_ctl)(struct intel_dp *dp,
-
 
587
				     bool has_aux_irq,
-
 
588
				     int send_bytes,
-
 
589
				     uint32_t aux_clock_divider);
-
 
590
	struct {
-
 
591
		enum drrs_support_type type;
-
 
592
		enum edp_drrs_refresh_rate_type refresh_rate_type;
-
 
593
		struct mutex mutex;
-
 
594
	} drrs_state;
-
 
595
 
495
};
596
};
Line 496... Line 597...
496
 
597
 
497
struct intel_digital_port {
598
struct intel_digital_port {
498
	struct intel_encoder base;
599
	struct intel_encoder base;
499
	enum port port;
600
	enum port port;
500
	u32 saved_port_bits;
601
	u32 saved_port_bits;
501
	struct intel_dp dp;
602
	struct intel_dp dp;
-
 
603
	struct intel_hdmi hdmi;
-
 
604
	bool (*hpd_pulse)(struct intel_digital_port *, bool);
-
 
605
};
-
 
606
 
-
 
607
struct intel_dp_mst_encoder {
-
 
608
	struct intel_encoder base;
-
 
609
	enum pipe pipe;
-
 
610
	struct intel_digital_port *primary;
502
	struct intel_hdmi hdmi;
611
	void *port; /* store this opaque as its illegal to dereference it */
Line 503... Line 612...
503
};
612
};
504
 
613
 
505
static inline int
614
static inline int
506
vlv_dport_to_channel(struct intel_digital_port *dport)
615
vlv_dport_to_channel(struct intel_digital_port *dport)
507
{
616
{
-
 
617
	switch (dport->port) {
508
	switch (dport->port) {
618
	case PORT_B:
509
	case PORT_B:
619
	case PORT_D:
510
		return DPIO_CH0;
620
		return DPIO_CH0;
511
	case PORT_C:
621
	case PORT_C:
512
		return DPIO_CH1;
622
		return DPIO_CH1;
513
	default:
623
	default:
514
		BUG();
624
		BUG();
Line -... Line 625...
-
 
625
	}
-
 
626
}
-
 
627
 
-
 
628
static inline int
-
 
629
vlv_pipe_to_channel(enum pipe pipe)
-
 
630
{
-
 
631
	switch (pipe) {
-
 
632
	case PIPE_A:
-
 
633
	case PIPE_C:
-
 
634
		return DPIO_CH0;
-
 
635
	case PIPE_B:
-
 
636
		return DPIO_CH1;
-
 
637
	default:
-
 
638
		BUG();
515
	}
639
	}
516
}
640
}
517
 
641
 
518
static inline struct drm_crtc *
642
static inline struct drm_crtc *
519
intel_get_crtc_for_pipe(struct drm_device *dev, int pipe)
643
intel_get_crtc_for_pipe(struct drm_device *dev, int pipe)
Line 537... Line 661...
537
	struct drm_pending_vblank_event *event;
661
	struct drm_pending_vblank_event *event;
538
	atomic_t pending;
662
	atomic_t pending;
539
#define INTEL_FLIP_INACTIVE	0
663
#define INTEL_FLIP_INACTIVE	0
540
#define INTEL_FLIP_PENDING	1
664
#define INTEL_FLIP_PENDING	1
541
#define INTEL_FLIP_COMPLETE	2
665
#define INTEL_FLIP_COMPLETE	2
-
 
666
	u32 flip_count;
-
 
667
	u32 gtt_offset;
542
	bool enable_stall_check;
668
	bool enable_stall_check;
543
};
669
};
Line 544... Line 670...
544
 
670
 
545
struct intel_set_config {
671
struct intel_set_config {
546
	struct drm_encoder **save_connector_encoders;
672
	struct drm_encoder **save_connector_encoders;
-
 
673
	struct drm_crtc **save_encoder_crtcs;
Line 547... Line 674...
547
	struct drm_crtc **save_encoder_crtcs;
674
	bool *save_crtc_enabled;
548
 
675
 
549
	bool fb_changed;
676
	bool fb_changed;
Line 566... Line 693...
566
enc_to_dig_port(struct drm_encoder *encoder)
693
enc_to_dig_port(struct drm_encoder *encoder)
567
{
694
{
568
	return container_of(encoder, struct intel_digital_port, base.base);
695
	return container_of(encoder, struct intel_digital_port, base.base);
569
}
696
}
Line -... Line 697...
-
 
697
 
-
 
698
static inline struct intel_dp_mst_encoder *
-
 
699
enc_to_mst(struct drm_encoder *encoder)
-
 
700
{
-
 
701
	return container_of(encoder, struct intel_dp_mst_encoder, base.base);
-
 
702
}
570
 
703
 
571
static inline struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder)
704
static inline struct intel_dp *enc_to_intel_dp(struct drm_encoder *encoder)
572
{
705
{
573
	return &enc_to_dig_port(encoder)->dp;
706
	return &enc_to_dig_port(encoder)->dp;
Line 590... Line 723...
590
bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
723
bool intel_set_cpu_fifo_underrun_reporting(struct drm_device *dev,
591
					   enum pipe pipe, bool enable);
724
					   enum pipe pipe, bool enable);
592
bool intel_set_pch_fifo_underrun_reporting(struct drm_device *dev,
725
bool intel_set_pch_fifo_underrun_reporting(struct drm_device *dev,
593
					   enum transcoder pch_transcoder,
726
					   enum transcoder pch_transcoder,
594
					   bool enable);
727
					   bool enable);
595
void ilk_enable_gt_irq(struct drm_i915_private *dev_priv, uint32_t mask);
728
void gen5_enable_gt_irq(struct drm_i915_private *dev_priv, uint32_t mask);
596
void ilk_disable_gt_irq(struct drm_i915_private *dev_priv, uint32_t mask);
729
void gen5_disable_gt_irq(struct drm_i915_private *dev_priv, uint32_t mask);
-
 
730
void gen6_enable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask);
-
 
731
void gen6_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask);
597
void snb_enable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask);
732
void gen8_enable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask);
598
void snb_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask);
733
void gen8_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask);
599
void hsw_pc8_disable_interrupts(struct drm_device *dev);
734
void intel_runtime_pm_disable_interrupts(struct drm_device *dev);
600
void hsw_pc8_restore_interrupts(struct drm_device *dev);
735
void intel_runtime_pm_restore_interrupts(struct drm_device *dev);
-
 
736
static inline bool intel_irqs_enabled(struct drm_i915_private *dev_priv)
-
 
737
{
-
 
738
	/*
-
 
739
	 * We only use drm_irq_uninstall() at unload and VT switch, so
-
 
740
	 * this is the only thing we need to check.
-
 
741
	 */
-
 
742
	return !dev_priv->pm._irqs_disabled;
-
 
743
}
Line -... Line 744...
-
 
744
 
-
 
745
int intel_get_crtc_scanline(struct intel_crtc *crtc);
-
 
746
void i9xx_check_fifo_underruns(struct drm_device *dev);
Line 601... Line 747...
601
 
747
void gen8_irq_power_well_post_enable(struct drm_i915_private *dev_priv);
602
 
748
 
Line 615... Line 761...
615
void intel_ddi_enable_transcoder_func(struct drm_crtc *crtc);
761
void intel_ddi_enable_transcoder_func(struct drm_crtc *crtc);
616
void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
762
void intel_ddi_disable_transcoder_func(struct drm_i915_private *dev_priv,
617
				       enum transcoder cpu_transcoder);
763
				       enum transcoder cpu_transcoder);
618
void intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc);
764
void intel_ddi_enable_pipe_clock(struct intel_crtc *intel_crtc);
619
void intel_ddi_disable_pipe_clock(struct intel_crtc *intel_crtc);
765
void intel_ddi_disable_pipe_clock(struct intel_crtc *intel_crtc);
620
void intel_ddi_setup_hw_pll_state(struct drm_device *dev);
-
 
621
bool intel_ddi_pll_select(struct intel_crtc *crtc);
766
bool intel_ddi_pll_select(struct intel_crtc *crtc);
622
void intel_ddi_pll_enable(struct intel_crtc *crtc);
-
 
623
void intel_ddi_put_crtc_pll(struct drm_crtc *crtc);
-
 
624
void intel_ddi_set_pipe_settings(struct drm_crtc *crtc);
767
void intel_ddi_set_pipe_settings(struct drm_crtc *crtc);
625
void intel_ddi_prepare_link_retrain(struct drm_encoder *encoder);
768
void intel_ddi_prepare_link_retrain(struct drm_encoder *encoder);
626
bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector);
769
bool intel_ddi_connector_get_hw_state(struct intel_connector *intel_connector);
627
void intel_ddi_fdi_disable(struct drm_crtc *crtc);
770
void intel_ddi_fdi_disable(struct drm_crtc *crtc);
628
void intel_ddi_get_config(struct intel_encoder *encoder,
771
void intel_ddi_get_config(struct intel_encoder *encoder,
629
			  struct intel_crtc_config *pipe_config);
772
			  struct intel_crtc_config *pipe_config);
Line -... Line 773...
-
 
773
 
-
 
774
void intel_ddi_init_dp_buf_reg(struct intel_encoder *encoder);
-
 
775
void intel_ddi_clock_get(struct intel_encoder *encoder,
-
 
776
			 struct intel_crtc_config *pipe_config);
Line 630... Line 777...
630
 
777
void intel_ddi_set_vc_payload_alloc(struct drm_crtc *crtc, bool state);
631
 
778
 
632
/* intel_display.c */
779
/* intel_display.c */
633
const char *intel_output_name(int output);
780
const char *intel_output_name(int output);
634
bool intel_has_pending_fb_unpin(struct drm_device *dev);
781
bool intel_has_pending_fb_unpin(struct drm_device *dev);
635
int intel_pch_rawclk(struct drm_device *dev);
782
int intel_pch_rawclk(struct drm_device *dev);
636
void intel_mark_busy(struct drm_device *dev);
783
void intel_mark_busy(struct drm_device *dev);
-
 
784
void intel_fb_obj_invalidate(struct drm_i915_gem_object *obj,
-
 
785
			struct intel_engine_cs *ring);
-
 
786
void intel_frontbuffer_flip_prepare(struct drm_device *dev,
-
 
787
				    unsigned frontbuffer_bits);
-
 
788
void intel_frontbuffer_flip_complete(struct drm_device *dev,
-
 
789
				     unsigned frontbuffer_bits);
-
 
790
void intel_frontbuffer_flush(struct drm_device *dev,
-
 
791
			     unsigned frontbuffer_bits);
-
 
792
/**
-
 
793
 * intel_frontbuffer_flip - prepare frontbuffer flip
-
 
794
 * @dev: DRM device
-
 
795
 * @frontbuffer_bits: frontbuffer plane tracking bits
-
 
796
 *
-
 
797
 * This function gets called after scheduling a flip on @obj. This is for
-
 
798
 * synchronous plane updates which will happen on the next vblank and which will
-
 
799
 * not get delayed by pending gpu rendering.
-
 
800
 *
-
 
801
 * Can be called without any locks held.
-
 
802
 */
-
 
803
static inline
-
 
804
void intel_frontbuffer_flip(struct drm_device *dev,
-
 
805
			    unsigned frontbuffer_bits)
-
 
806
{
-
 
807
	intel_frontbuffer_flush(dev, frontbuffer_bits);
-
 
808
}
637
void intel_mark_fb_busy(struct drm_i915_gem_object *obj,
809
 
638
			struct intel_ring_buffer *ring);
810
void intel_fb_obj_flush(struct drm_i915_gem_object *obj, bool retire);
-
 
811
void intel_mark_idle(struct drm_device *dev);
639
void intel_mark_idle(struct drm_device *dev);
812
void intel_crtc_restore_mode(struct drm_crtc *crtc);
640
void intel_crtc_restore_mode(struct drm_crtc *crtc);
813
void intel_crtc_control(struct drm_crtc *crtc, bool enable);
641
void intel_crtc_update_dpms(struct drm_crtc *crtc);
814
void intel_crtc_update_dpms(struct drm_crtc *crtc);
642
void intel_encoder_destroy(struct drm_encoder *encoder);
815
void intel_encoder_destroy(struct drm_encoder *encoder);
643
void intel_connector_dpms(struct drm_connector *, int mode);
816
void intel_connector_dpms(struct drm_connector *, int mode);
Line 660... Line 833...
660
int ironlake_get_lanes_required(int target_clock, int link_bw, int bpp);
833
int ironlake_get_lanes_required(int target_clock, int link_bw, int bpp);
661
void vlv_wait_port_ready(struct drm_i915_private *dev_priv,
834
void vlv_wait_port_ready(struct drm_i915_private *dev_priv,
662
			 struct intel_digital_port *dport);
835
			 struct intel_digital_port *dport);
663
bool intel_get_load_detect_pipe(struct drm_connector *connector,
836
bool intel_get_load_detect_pipe(struct drm_connector *connector,
664
				       struct drm_display_mode *mode,
837
				       struct drm_display_mode *mode,
665
				       struct intel_load_detect_pipe *old);
838
				struct intel_load_detect_pipe *old,
-
 
839
				struct drm_modeset_acquire_ctx *ctx);
666
void intel_release_load_detect_pipe(struct drm_connector *connector,
840
void intel_release_load_detect_pipe(struct drm_connector *connector,
667
					   struct intel_load_detect_pipe *old);
841
				    struct intel_load_detect_pipe *old);
668
int intel_pin_and_fence_fb_obj(struct drm_device *dev,
842
int intel_pin_and_fence_fb_obj(struct drm_device *dev,
669
				      struct drm_i915_gem_object *obj,
843
				      struct drm_i915_gem_object *obj,
670
				      struct intel_ring_buffer *pipelined);
844
			       struct intel_engine_cs *pipelined);
671
void intel_unpin_fb_obj(struct drm_i915_gem_object *obj);
845
void intel_unpin_fb_obj(struct drm_i915_gem_object *obj);
-
 
846
struct drm_framebuffer *
672
int intel_framebuffer_init(struct drm_device *dev,
847
__intel_framebuffer_create(struct drm_device *dev,
673
				  struct intel_framebuffer *ifb,
-
 
674
				  struct drm_mode_fb_cmd2 *mode_cmd,
848
				  struct drm_mode_fb_cmd2 *mode_cmd,
675
				  struct drm_i915_gem_object *obj);
849
				  struct drm_i915_gem_object *obj);
676
void intel_framebuffer_fini(struct intel_framebuffer *fb);
-
 
677
void intel_prepare_page_flip(struct drm_device *dev, int plane);
850
void intel_prepare_page_flip(struct drm_device *dev, int plane);
678
void intel_finish_page_flip(struct drm_device *dev, int pipe);
851
void intel_finish_page_flip(struct drm_device *dev, int pipe);
679
void intel_finish_page_flip_plane(struct drm_device *dev, int plane);
852
void intel_finish_page_flip_plane(struct drm_device *dev, int plane);
-
 
853
 
-
 
854
/* shared dpll functions */
680
struct intel_shared_dpll *intel_crtc_to_shared_dpll(struct intel_crtc *crtc);
855
struct intel_shared_dpll *intel_crtc_to_shared_dpll(struct intel_crtc *crtc);
681
void assert_shared_dpll(struct drm_i915_private *dev_priv,
856
void assert_shared_dpll(struct drm_i915_private *dev_priv,
682
			struct intel_shared_dpll *pll,
857
			struct intel_shared_dpll *pll,
683
			bool state);
858
			bool state);
684
#define assert_shared_dpll_enabled(d, p) assert_shared_dpll(d, p, true)
859
#define assert_shared_dpll_enabled(d, p) assert_shared_dpll(d, p, true)
685
#define assert_shared_dpll_disabled(d, p) assert_shared_dpll(d, p, false)
860
#define assert_shared_dpll_disabled(d, p) assert_shared_dpll(d, p, false)
-
 
861
struct intel_shared_dpll *intel_get_shared_dpll(struct intel_crtc *crtc);
-
 
862
void intel_put_shared_dpll(struct intel_crtc *crtc);
-
 
863
 
-
 
864
/* modesetting asserts */
686
void assert_pll(struct drm_i915_private *dev_priv,
865
void assert_pll(struct drm_i915_private *dev_priv,
687
		enum pipe pipe, bool state);
866
		enum pipe pipe, bool state);
688
#define assert_pll_enabled(d, p) assert_pll(d, p, true)
867
#define assert_pll_enabled(d, p) assert_pll(d, p, true)
689
#define assert_pll_disabled(d, p) assert_pll(d, p, false)
868
#define assert_pll_disabled(d, p) assert_pll(d, p, false)
690
void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,
869
void assert_fdi_rx_pll(struct drm_i915_private *dev_priv,
Line 699... Line 878...
699
unsigned long intel_gen4_compute_page_offset(int *x, int *y,
878
unsigned long intel_gen4_compute_page_offset(int *x, int *y,
700
						    unsigned int tiling_mode,
879
						    unsigned int tiling_mode,
701
						      unsigned int bpp,
880
						      unsigned int bpp,
702
						      unsigned int pitch);
881
						      unsigned int pitch);
703
void intel_display_handle_reset(struct drm_device *dev);
882
void intel_display_handle_reset(struct drm_device *dev);
704
void hsw_enable_pc8_work(struct work_struct *__work);
-
 
705
void hsw_enable_package_c8(struct drm_i915_private *dev_priv);
883
void hsw_enable_pc8(struct drm_i915_private *dev_priv);
706
void hsw_disable_package_c8(struct drm_i915_private *dev_priv);
884
void hsw_disable_pc8(struct drm_i915_private *dev_priv);
707
void intel_dp_get_m_n(struct intel_crtc *crtc,
885
void intel_dp_get_m_n(struct intel_crtc *crtc,
708
		      struct intel_crtc_config *pipe_config);
886
		      struct intel_crtc_config *pipe_config);
709
int intel_dotclock_calculate(int link_freq, const struct intel_link_m_n *m_n);
887
int intel_dotclock_calculate(int link_freq, const struct intel_link_m_n *m_n);
710
void
888
void
711
ironlake_check_encoder_dotclock(const struct intel_crtc_config *pipe_config,
889
ironlake_check_encoder_dotclock(const struct intel_crtc_config *pipe_config,
712
				int dotclock);
890
				int dotclock);
713
bool intel_crtc_active(struct drm_crtc *crtc);
891
bool intel_crtc_active(struct drm_crtc *crtc);
714
void hsw_enable_ips(struct intel_crtc *crtc);
892
void hsw_enable_ips(struct intel_crtc *crtc);
715
void hsw_disable_ips(struct intel_crtc *crtc);
893
void hsw_disable_ips(struct intel_crtc *crtc);
716
void intel_display_set_init_power(struct drm_device *dev, bool enable);
894
void intel_display_set_init_power(struct drm_i915_private *dev, bool enable);
-
 
895
enum intel_display_power_domain
717
int valleyview_get_vco(struct drm_i915_private *dev_priv);
896
intel_display_port_power_domain(struct intel_encoder *intel_encoder);
-
 
897
void intel_mode_from_pipe_config(struct drm_display_mode *mode,
-
 
898
				 struct intel_crtc_config *pipe_config);
-
 
899
int intel_format_to_fourcc(int format);
-
 
900
void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc);
-
 
901
 
Line 718... Line 902...
718
 
902
 
719
/* intel_dp.c */
903
/* intel_dp.c */
720
void intel_dp_init(struct drm_device *dev, int output_reg, enum port port);
904
void intel_dp_init(struct drm_device *dev, int output_reg, enum port port);
721
bool intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
905
bool intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
Line 724... Line 908...
724
void intel_dp_complete_link_train(struct intel_dp *intel_dp);
908
void intel_dp_complete_link_train(struct intel_dp *intel_dp);
725
void intel_dp_stop_link_train(struct intel_dp *intel_dp);
909
void intel_dp_stop_link_train(struct intel_dp *intel_dp);
726
void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode);
910
void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode);
727
void intel_dp_encoder_destroy(struct drm_encoder *encoder);
911
void intel_dp_encoder_destroy(struct drm_encoder *encoder);
728
void intel_dp_check_link_status(struct intel_dp *intel_dp);
912
void intel_dp_check_link_status(struct intel_dp *intel_dp);
-
 
913
int intel_dp_sink_crc(struct intel_dp *intel_dp, u8 *crc);
729
bool intel_dp_compute_config(struct intel_encoder *encoder,
914
bool intel_dp_compute_config(struct intel_encoder *encoder,
730
			     struct intel_crtc_config *pipe_config);
915
			     struct intel_crtc_config *pipe_config);
731
bool intel_dp_is_edp(struct drm_device *dev, enum port port);
916
bool intel_dp_is_edp(struct drm_device *dev, enum port port);
-
 
917
bool intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port,
-
 
918
			bool long_hpd);
732
void ironlake_edp_backlight_on(struct intel_dp *intel_dp);
919
void intel_edp_backlight_on(struct intel_dp *intel_dp);
733
void ironlake_edp_backlight_off(struct intel_dp *intel_dp);
920
void intel_edp_backlight_off(struct intel_dp *intel_dp);
734
void ironlake_edp_panel_on(struct intel_dp *intel_dp);
921
void intel_edp_panel_vdd_on(struct intel_dp *intel_dp);
735
void ironlake_edp_panel_off(struct intel_dp *intel_dp);
922
void intel_edp_panel_vdd_sanitize(struct intel_encoder *intel_encoder);
736
void ironlake_edp_panel_vdd_on(struct intel_dp *intel_dp);
923
void intel_edp_panel_on(struct intel_dp *intel_dp);
737
void ironlake_edp_panel_vdd_off(struct intel_dp *intel_dp, bool sync);
924
void intel_edp_panel_off(struct intel_dp *intel_dp);
738
void intel_edp_psr_enable(struct intel_dp *intel_dp);
925
void intel_edp_psr_enable(struct intel_dp *intel_dp);
739
void intel_edp_psr_disable(struct intel_dp *intel_dp);
926
void intel_edp_psr_disable(struct intel_dp *intel_dp);
-
 
927
void intel_dp_set_drrs_state(struct drm_device *dev, int refresh_rate);
-
 
928
void intel_edp_psr_invalidate(struct drm_device *dev,
-
 
929
			      unsigned frontbuffer_bits);
-
 
930
void intel_edp_psr_flush(struct drm_device *dev,
-
 
931
			 unsigned frontbuffer_bits);
740
void intel_edp_psr_update(struct drm_device *dev);
932
void intel_edp_psr_init(struct drm_device *dev);
741
 
933
 
742
 
-
 
-
 
934
int intel_dp_handle_hpd_irq(struct intel_digital_port *digport, bool long_hpd);
-
 
935
void intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connector);
-
 
936
void intel_dp_mst_suspend(struct drm_device *dev);
-
 
937
void intel_dp_mst_resume(struct drm_device *dev);
-
 
938
int intel_dp_max_link_bw(struct intel_dp *intel_dp);
-
 
939
void intel_dp_hot_plug(struct intel_encoder *intel_encoder);
-
 
940
/* intel_dp_mst.c */
-
 
941
int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id);
-
 
942
void intel_dp_mst_encoder_cleanup(struct intel_digital_port *intel_dig_port);
743
/* intel_dsi.c */
943
/* intel_dsi.c */
744
bool intel_dsi_init(struct drm_device *dev);
944
void intel_dsi_init(struct drm_device *dev);
Line 745... Line 945...
745
 
945
 
746
 
946
 
Line 811... Line 1011...
811
				     struct drm_file *file_priv);
1011
				     struct drm_file *file_priv);
Line 812... Line 1012...
812
 
1012
 
813
 
1013
 
814
/* intel_panel.c */
1014
/* intel_panel.c */
-
 
1015
int intel_panel_init(struct intel_panel *panel,
815
int intel_panel_init(struct intel_panel *panel,
1016
		     struct drm_display_mode *fixed_mode,
816
		     struct drm_display_mode *fixed_mode);
1017
		     struct drm_display_mode *downclock_mode);
817
void intel_panel_fini(struct intel_panel *panel);
1018
void intel_panel_fini(struct intel_panel *panel);
818
void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
1019
void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
819
			    struct drm_display_mode *adjusted_mode);
1020
			    struct drm_display_mode *adjusted_mode);
820
void intel_pch_panel_fitting(struct intel_crtc *crtc,
1021
void intel_pch_panel_fitting(struct intel_crtc *crtc,
821
			     struct intel_crtc_config *pipe_config,
1022
			     struct intel_crtc_config *pipe_config,
822
			     int fitting_mode);
1023
			     int fitting_mode);
823
void intel_gmch_panel_fitting(struct intel_crtc *crtc,
1024
void intel_gmch_panel_fitting(struct intel_crtc *crtc,
824
			      struct intel_crtc_config *pipe_config,
1025
			      struct intel_crtc_config *pipe_config,
825
			      int fitting_mode);
1026
			      int fitting_mode);
826
void intel_panel_set_backlight(struct intel_connector *connector, u32 level,
1027
void intel_panel_set_backlight_acpi(struct intel_connector *connector,
827
			       u32 max);
1028
				    u32 level, u32 max);
828
int intel_panel_setup_backlight(struct drm_connector *connector);
1029
int intel_panel_setup_backlight(struct drm_connector *connector);
829
void intel_panel_enable_backlight(struct intel_connector *connector);
1030
void intel_panel_enable_backlight(struct intel_connector *connector);
830
void intel_panel_disable_backlight(struct intel_connector *connector);
1031
void intel_panel_disable_backlight(struct intel_connector *connector);
Line 837... Line 1038...
837
				struct drm_connector *connector);
1038
				struct drm_connector *connector);
Line 838... Line 1039...
838
 
1039
 
839
/* intel_pm.c */
1040
/* intel_pm.c */
840
void intel_init_clock_gating(struct drm_device *dev);
1041
void intel_init_clock_gating(struct drm_device *dev);
-
 
1042
void intel_suspend_hw(struct drm_device *dev);
841
void intel_suspend_hw(struct drm_device *dev);
1043
int ilk_wm_max_level(const struct drm_device *dev);
842
void intel_update_watermarks(struct drm_crtc *crtc);
1044
void intel_update_watermarks(struct drm_crtc *crtc);
843
void intel_update_sprite_watermarks(struct drm_plane *plane,
1045
void intel_update_sprite_watermarks(struct drm_plane *plane,
844
				    struct drm_crtc *crtc,
1046
				    struct drm_crtc *crtc,
-
 
1047
				    uint32_t sprite_width,
-
 
1048
				    uint32_t sprite_height,
845
				    uint32_t sprite_width, int pixel_size,
1049
				    int pixel_size,
846
				    bool enabled, bool scaled);
1050
				    bool enabled, bool scaled);
847
void intel_init_pm(struct drm_device *dev);
1051
void intel_init_pm(struct drm_device *dev);
848
void intel_pm_setup(struct drm_device *dev);
1052
void intel_pm_setup(struct drm_device *dev);
849
bool intel_fbc_enabled(struct drm_device *dev);
1053
bool intel_fbc_enabled(struct drm_device *dev);
850
void intel_update_fbc(struct drm_device *dev);
1054
void intel_update_fbc(struct drm_device *dev);
851
void intel_gpu_ips_init(struct drm_i915_private *dev_priv);
1055
void intel_gpu_ips_init(struct drm_i915_private *dev_priv);
852
void intel_gpu_ips_teardown(void);
1056
void intel_gpu_ips_teardown(void);
853
int intel_power_domains_init(struct drm_device *dev);
1057
int intel_power_domains_init(struct drm_i915_private *);
854
void intel_power_domains_remove(struct drm_device *dev);
1058
void intel_power_domains_remove(struct drm_i915_private *);
855
bool intel_display_power_enabled(struct drm_device *dev,
1059
bool intel_display_power_enabled(struct drm_i915_private *dev_priv,
856
				 enum intel_display_power_domain domain);
1060
				 enum intel_display_power_domain domain);
857
bool intel_display_power_enabled_sw(struct drm_device *dev,
1061
bool intel_display_power_enabled_unlocked(struct drm_i915_private *dev_priv,
858
				    enum intel_display_power_domain domain);
1062
				    enum intel_display_power_domain domain);
859
void intel_display_power_get(struct drm_device *dev,
1063
void intel_display_power_get(struct drm_i915_private *dev_priv,
860
			     enum intel_display_power_domain domain);
1064
			     enum intel_display_power_domain domain);
861
void intel_display_power_put(struct drm_device *dev,
1065
void intel_display_power_put(struct drm_i915_private *dev_priv,
862
					enum intel_display_power_domain domain);
1066
					enum intel_display_power_domain domain);
863
void intel_power_domains_init_hw(struct drm_device *dev);
1067
void intel_power_domains_init_hw(struct drm_i915_private *dev_priv);
-
 
1068
void intel_init_gt_powersave(struct drm_device *dev);
864
void intel_set_power_well(struct drm_device *dev, bool enable);
1069
void intel_cleanup_gt_powersave(struct drm_device *dev);
865
void intel_enable_gt_powersave(struct drm_device *dev);
1070
void intel_enable_gt_powersave(struct drm_device *dev);
-
 
1071
void intel_disable_gt_powersave(struct drm_device *dev);
-
 
1072
void intel_suspend_gt_powersave(struct drm_device *dev);
866
void intel_disable_gt_powersave(struct drm_device *dev);
1073
void intel_reset_gt_powersave(struct drm_device *dev);
867
void ironlake_teardown_rc6(struct drm_device *dev);
1074
void ironlake_teardown_rc6(struct drm_device *dev);
868
void gen6_update_ring_freq(struct drm_device *dev);
1075
void gen6_update_ring_freq(struct drm_device *dev);
869
void gen6_rps_idle(struct drm_i915_private *dev_priv);
1076
void gen6_rps_idle(struct drm_i915_private *dev_priv);
870
void gen6_rps_boost(struct drm_i915_private *dev_priv);
1077
void gen6_rps_boost(struct drm_i915_private *dev_priv);
871
void intel_aux_display_runtime_get(struct drm_i915_private *dev_priv);
1078
void intel_aux_display_runtime_get(struct drm_i915_private *dev_priv);
872
void intel_aux_display_runtime_put(struct drm_i915_private *dev_priv);
1079
void intel_aux_display_runtime_put(struct drm_i915_private *dev_priv);
-
 
1080
void intel_runtime_pm_get(struct drm_i915_private *dev_priv);
873
void intel_runtime_pm_get(struct drm_i915_private *dev_priv);
1081
void intel_runtime_pm_get_noresume(struct drm_i915_private *dev_priv);
874
void intel_runtime_pm_put(struct drm_i915_private *dev_priv);
1082
void intel_runtime_pm_put(struct drm_i915_private *dev_priv);
875
void intel_init_runtime_pm(struct drm_i915_private *dev_priv);
1083
void intel_init_runtime_pm(struct drm_i915_private *dev_priv);
876
void intel_fini_runtime_pm(struct drm_i915_private *dev_priv);
1084
void intel_fini_runtime_pm(struct drm_i915_private *dev_priv);