aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-11-19 18:22:35 -0500
committerDave Airlie <airlied@redhat.com>2012-11-19 18:22:35 -0500
commit9fabd4eedeb904173d05cb1ced3c3e6b9d2e8137 (patch)
treeff5ebc768e1c83446db6b899016e5560b41d36ca /include/drm
parent6380813c6e316455b944ba5f7b1515c98b837850 (diff)
parent6b8294a4d392c2c9f8867e8505511f3fc9419ba7 (diff)
Merge branch 'for-airlied' of git://people.freedesktop.org/~danvet/drm-intel into drm-next
Daniel writes: Highlights of this -next round: - ivb fdi B/C fixes - hsw sprite/plane offset fixes from Damien - unified dp/hdmi encoder for hsw, finally external dp support on hsw (Paulo) - kill-agp and some other prep work in the gtt code from Ben - some fb handling fixes from Ville - massive pile of patches to align hsw VGA with the spec and make it actually work (Paulo) - pile of workarounds from Jesse, mostly for vlv, but also some other related platforms - start of a dev_priv reorg, that thing grew out of bounds and chaotic - small bits&pieces all over the place, down to better error handling for load-detect on gen2 (Chris, Jani, Mika, Zhenyu, ...) On top of the previous pile (just copypasta): - tons of hsw dp prep patches form Paulo - round scheduled work items and timers to nearest second (Chris) - some hw workarounds (Jesse&Damien) - vlv dp support and related fixups (Vijay et al.) - basic haswell dp support, not yet wired up for external ports (Paulo) - edp support (Paulo) - tons of refactorings to prepare for the above (Paulo) - panel rework, unifiying code between lvds and edp panels (Jani) - panel fitter scaling modes (Jani + Yuly Novikov) - panel power improvements, should now work without the BIOS setting it up - extracting some dp helpers from radeon/i915 and move them to drm_dp_helper.c - randome pile of workarounds (Damien, Ben, ...) - some cleanups for the register restore code for suspend/resume - secure batchbuffer support, should enable tear-free blits on gen6+ Chris) - random smaller fixlets and cleanups. * 'for-airlied' of git://people.freedesktop.org/~danvet/drm-intel: (231 commits) drm/i915: Restore physical HWS_PGA after resume drm/i915: Report amount of usable graphics memory in MiB drm/i915/i2c: Track users of GMBUS force-bit drm/i915: Allocate the proper size for contexts. drm/i915: Update load-detect failure paths for modeset-rework drm/i915: Clear unused fields of mode for framebuffer creation drm/i915: Always calculate 8xx WM values based on a 32-bpp framebuffer drm/i915: Fix sparse warnings in from AGP kill code drm/i915: Missed lock change with rps lock drm/i915: Move the remaining gtt code drm/i915: flush system agent TLBs on SNB drm/i915: Kill off now unused gen6+ AGP code drm/i915: Calculate correct stolen size for GEN7+ drm/i915: Stop using AGP layer for GEN6+ drm/i915: drop the double-OP_STOREDW usage in blt_ring_flush drm/i915: don't rewrite the GTT on resume v4 drm/i915: protect RPS/RC6 related accesses (including PCU) with a new mutex drm/i915: put ring frequency and turbo setup into a work queue v5 drm/i915: don't block resume on fb console resume v2 drm/i915: extract l3_parity substruct from dev_priv ...
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_crtc_helper.h2
-rw-r--r--include/drm/drm_dp_helper.h31
-rw-r--r--include/drm/intel-gtt.h7
3 files changed, 35 insertions, 5 deletions
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index e01cc80c9c30..defee28f6b95 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -137,6 +137,8 @@ extern bool drm_helper_encoder_in_use(struct drm_encoder *encoder);
137 137
138extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode); 138extern void drm_helper_connector_dpms(struct drm_connector *connector, int mode);
139 139
140extern void drm_helper_move_panel_connectors_to_head(struct drm_device *);
141
140extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb, 142extern int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
141 struct drm_mode_fb_cmd2 *mode_cmd); 143 struct drm_mode_fb_cmd2 *mode_cmd);
142 144
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index fe061489f91f..c09d36741c94 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -25,6 +25,7 @@
25 25
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/i2c.h> 27#include <linux/i2c.h>
28#include <linux/delay.h>
28 29
29/* 30/*
30 * Unless otherwise noted, all values are from the DP 1.1a spec. Note that 31 * Unless otherwise noted, all values are from the DP 1.1a spec. Note that
@@ -322,4 +323,34 @@ struct i2c_algo_dp_aux_data {
322int 323int
323i2c_dp_aux_add_bus(struct i2c_adapter *adapter); 324i2c_dp_aux_add_bus(struct i2c_adapter *adapter);
324 325
326
327#define DP_LINK_STATUS_SIZE 6
328bool drm_dp_channel_eq_ok(u8 link_status[DP_LINK_STATUS_SIZE],
329 int lane_count);
330bool drm_dp_clock_recovery_ok(u8 link_status[DP_LINK_STATUS_SIZE],
331 int lane_count);
332u8 drm_dp_get_adjust_request_voltage(u8 link_status[DP_LINK_STATUS_SIZE],
333 int lane);
334u8 drm_dp_get_adjust_request_pre_emphasis(u8 link_status[DP_LINK_STATUS_SIZE],
335 int lane);
336
337#define DP_RECEIVER_CAP_SIZE 0xf
338void drm_dp_link_train_clock_recovery_delay(u8 dpcd[DP_RECEIVER_CAP_SIZE]);
339void drm_dp_link_train_channel_eq_delay(u8 dpcd[DP_RECEIVER_CAP_SIZE]);
340
341u8 drm_dp_link_rate_to_bw_code(int link_rate);
342int drm_dp_bw_code_to_link_rate(u8 link_bw);
343
344static inline int
345drm_dp_max_link_rate(u8 dpcd[DP_RECEIVER_CAP_SIZE])
346{
347 return drm_dp_bw_code_to_link_rate(dpcd[DP_MAX_LINK_RATE]);
348}
349
350static inline u8
351drm_dp_max_lane_count(u8 dpcd[DP_RECEIVER_CAP_SIZE])
352{
353 return dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK;
354}
355
325#endif /* _DRM_DP_HELPER_H_ */ 356#endif /* _DRM_DP_HELPER_H_ */
diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h
index 2e37e9f02e71..6eb76a1f11ab 100644
--- a/include/drm/intel-gtt.h
+++ b/include/drm/intel-gtt.h
@@ -3,7 +3,7 @@
3#ifndef _DRM_INTEL_GTT_H 3#ifndef _DRM_INTEL_GTT_H
4#define _DRM_INTEL_GTT_H 4#define _DRM_INTEL_GTT_H
5 5
6const struct intel_gtt { 6struct intel_gtt {
7 /* Size of memory reserved for graphics by the BIOS */ 7 /* Size of memory reserved for graphics by the BIOS */
8 unsigned int stolen_size; 8 unsigned int stolen_size;
9 /* Total number of gtt entries. */ 9 /* Total number of gtt entries. */
@@ -17,6 +17,7 @@ const struct intel_gtt {
17 unsigned int do_idle_maps : 1; 17 unsigned int do_idle_maps : 1;
18 /* Share the scratch page dma with ppgtts. */ 18 /* Share the scratch page dma with ppgtts. */
19 dma_addr_t scratch_page_dma; 19 dma_addr_t scratch_page_dma;
20 struct page *scratch_page;
20 /* for ppgtt PDE access */ 21 /* for ppgtt PDE access */
21 u32 __iomem *gtt; 22 u32 __iomem *gtt;
22 /* needed for ioremap in drm/i915 */ 23 /* needed for ioremap in drm/i915 */
@@ -39,10 +40,6 @@ void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
39#define AGP_DCACHE_MEMORY 1 40#define AGP_DCACHE_MEMORY 1
40#define AGP_PHYS_MEMORY 2 41#define AGP_PHYS_MEMORY 2
41 42
42/* New caching attributes for gen6/sandybridge */
43#define AGP_USER_CACHED_MEMORY_LLC_MLC (AGP_USER_TYPES + 2)
44#define AGP_USER_UNCACHED_MEMORY (AGP_USER_TYPES + 4)
45
46/* flag for GFDT type */ 43/* flag for GFDT type */
47#define AGP_USER_CACHED_MEMORY_GFDT (1 << 3) 44#define AGP_USER_CACHED_MEMORY_GFDT (1 << 3)
48 45