aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2010-04-07 04:15:53 -0400
committerEric Anholt <eric@anholt.net>2010-04-12 12:23:39 -0400
commit3bad0781832e4e8c9a532f1169bfcd7257bcfd9e (patch)
treed1ab074ca4a3e6f30fa95473584507776d7ac435 /drivers/gpu/drm/i915/i915_drv.h
parent7da9f6cbf70656ed1c913a674b82b68e076c99f7 (diff)
drm/i915: Probe for PCH chipset type
PCH is the new name for south bridge from Ironlake/Sandybridge, which contains most of the display outputs except eDP. This one adds a probe function to detect current PCH type, and method to detect Cougarpoint PCH. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 94fc9b65f4d7..6ffabab3bb60 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -221,6 +221,11 @@ enum no_fbc_reason {
221 FBC_NOT_TILED, /* buffer not tiled */ 221 FBC_NOT_TILED, /* buffer not tiled */
222}; 222};
223 223
224enum intel_pch {
225 PCH_IBX, /* Ibexpeak PCH */
226 PCH_CPT, /* Cougarpoint PCH */
227};
228
224typedef struct drm_i915_private { 229typedef struct drm_i915_private {
225 struct drm_device *dev; 230 struct drm_device *dev;
226 231
@@ -331,6 +336,9 @@ typedef struct drm_i915_private {
331 /* Display functions */ 336 /* Display functions */
332 struct drm_i915_display_funcs display; 337 struct drm_i915_display_funcs display;
333 338
339 /* PCH chipset type */
340 enum intel_pch pch_type;
341
334 /* Register state */ 342 /* Register state */
335 bool modeset_on_lid; 343 bool modeset_on_lid;
336 u8 saveLBB; 344 u8 saveLBB;
@@ -992,6 +1000,8 @@ extern int intel_modeset_vga_set_state(struct drm_device *dev, bool state);
992extern void i8xx_disable_fbc(struct drm_device *dev); 1000extern void i8xx_disable_fbc(struct drm_device *dev);
993extern void g4x_disable_fbc(struct drm_device *dev); 1001extern void g4x_disable_fbc(struct drm_device *dev);
994 1002
1003extern void intel_detect_pch (struct drm_device *dev);
1004
995/** 1005/**
996 * Lock test for when it's just for synchronization of ring access. 1006 * Lock test for when it's just for synchronization of ring access.
997 * 1007 *
@@ -1137,6 +1147,9 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
1137#define HAS_PCH_SPLIT(dev) (IS_IRONLAKE(dev) || \ 1147#define HAS_PCH_SPLIT(dev) (IS_IRONLAKE(dev) || \
1138 IS_GEN6(dev)) 1148 IS_GEN6(dev))
1139 1149
1150#define INTEL_PCH_TYPE(dev) (((struct drm_i915_private *)(dev)->dev_private)->pch_type)
1151#define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
1152
1140#define PRIMARY_RINGBUFFER_SIZE (128*1024) 1153#define PRIMARY_RINGBUFFER_SIZE (128*1024)
1141 1154
1142#endif 1155#endif