[Intel-gfx] [PATCH 3/6] drm/i915: Add IS_POULSBO and IS_MRST helper macros
Richard Purdie
rpurdie at linux.intel.com
Wed May 13 16:02:59 CEST 2009
Add IS_POULSBO and IS_MRST helper macros to i915_drv.h, then use these
to enable the correct code paths for these pieces of hardware in the
common VDC code.
Signed-off-by: Richard Purdie <rpurdie at linux.intel.com>
Index: git/drivers/gpu/drm/i915/i915_drv.h
===================================================================
--- git.orig/drivers/gpu/drm/i915/i915_drv.h 2009-05-13 13:13:00.000000000 +0100
+++ git/drivers/gpu/drm/i915/i915_drv.h 2009-05-13 13:22:13.000000000 +0100
@@ -691,17 +691,23 @@
#define IS_IGDGM(dev) ((dev)->pci_device == 0xa011)
#define IS_IGD(dev) (IS_IGDG(dev) || IS_IGDGM(dev))
+#define IS_POULSBO(dev) (((dev)->pci_device == 0x8108) || \
+ ((dev)->pci_device == 0x8109))
+
+#define IS_MRST(dev) (((dev)->pci_device & 0xfffc) == 0x4100)
+
#define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \
(dev)->pci_device == 0x29B2 || \
(dev)->pci_device == 0x29D2 || \
(IS_IGD(dev)))
#define IS_I9XX(dev) (IS_I915G(dev) || IS_I915GM(dev) || IS_I945G(dev) || \
- IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev))
+ IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev) || \
+ IS_POULSBO(dev))
#define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \
IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev) || \
- IS_IGD(dev))
+ IS_IGD(dev) || IS_POULSBO(dev))
#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev))
/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
Index: git/drivers/gpu/drm/i915/intel_display.c
===================================================================
--- git.orig/drivers/gpu/drm/i915/intel_display.c 2009-05-13 13:13:00.000000000 +0100
+++ git/drivers/gpu/drm/i915/intel_display.c 2009-05-13 13:22:13.000000000 +0100
@@ -736,7 +736,7 @@
mutex_unlock(&dev->struct_mutex);
return -EINVAL;
}
- if (IS_I965G(dev)) {
+ if (IS_I965G(dev) || IS_MRST(dev)) {
if (obj_priv->tiling_mode != I915_TILING_NONE)
dspcntr |= DISPPLANE_TILED;
else
@@ -750,7 +750,7 @@
DRM_DEBUG("Writing base %08lX %08lX %d %d\n", Start, Offset, x, y);
I915_WRITE(dspstride, crtc->fb->pitch);
- if (IS_I965G(dev)) {
+ if (IS_I965G(dev) || IS_MRST(dev)) {
I915_WRITE(dspbase, Offset);
I915_READ(dspbase);
I915_WRITE(dspsurf, Start);
@@ -1148,10 +1148,13 @@
dpll = DPLL_VGA_MODE_DIS;
if (IS_I9XX(dev)) {
- if (is_lvds)
+ if (is_lvds) {
dpll |= DPLLB_MODE_LVDS;
- else
+ if (IS_POULSBO(dev))
+ dpll |= DPLL_DVO_HIGH_SPEED;
+ } else {
dpll |= DPLLB_MODE_DAC_SERIAL;
+ }
if (is_sdvo) {
dpll |= DPLL_DVO_HIGH_SPEED;
if (IS_I945G(dev) || IS_I945GM(dev)) {
More information about the Intel-gfx
mailing list