Commit f2b115e6 authored by Adam Jackson's avatar Adam Jackson Committed by Eric Anholt

drm/i915: Fix product names and #defines

IGD* isn't a useful name.  Replace with the codenames, as sourced from
pci.ids.
Signed-off-by: default avatarAdam Jackson <ajax@redhat.com>
[anholt: Fixed up for merge with pineview/ironlake changes]
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 107f517b
...@@ -161,7 +161,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data) ...@@ -161,7 +161,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
struct drm_device *dev = node->minor->dev; struct drm_device *dev = node->minor->dev;
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
if (!IS_IGDNG(dev)) { if (!IS_IRONLAKE(dev)) {
seq_printf(m, "Interrupt enable: %08x\n", seq_printf(m, "Interrupt enable: %08x\n",
I915_READ(IER)); I915_READ(IER));
seq_printf(m, "Interrupt identity: %08x\n", seq_printf(m, "Interrupt identity: %08x\n",
......
...@@ -968,7 +968,7 @@ static int i915_probe_agp(struct drm_device *dev, uint32_t *aperture_size, ...@@ -968,7 +968,7 @@ static int i915_probe_agp(struct drm_device *dev, uint32_t *aperture_size,
* Some of the preallocated space is taken by the GTT * Some of the preallocated space is taken by the GTT
* and popup. GTT is 1K per MB of aperture size, and popup is 4K. * and popup. GTT is 1K per MB of aperture size, and popup is 4K.
*/ */
if (IS_G4X(dev) || IS_IGD(dev) || IS_IGDNG(dev)) if (IS_G4X(dev) || IS_PINEVIEW(dev) || IS_IRONLAKE(dev))
overhead = 4096; overhead = 4096;
else else
overhead = (*aperture_size / 1024) + 4096; overhead = (*aperture_size / 1024) + 4096;
...@@ -1054,7 +1054,7 @@ static unsigned long i915_gtt_to_phys(struct drm_device *dev, ...@@ -1054,7 +1054,7 @@ static unsigned long i915_gtt_to_phys(struct drm_device *dev,
int gtt_offset, gtt_size; int gtt_offset, gtt_size;
if (IS_I965G(dev)) { if (IS_I965G(dev)) {
if (IS_G4X(dev) || IS_IGDNG(dev)) { if (IS_G4X(dev) || IS_IRONLAKE(dev)) {
gtt_offset = 2*1024*1024; gtt_offset = 2*1024*1024;
gtt_size = 2*1024*1024; gtt_size = 2*1024*1024;
} else { } else {
...@@ -1312,7 +1312,7 @@ static void i915_get_mem_freq(struct drm_device *dev) ...@@ -1312,7 +1312,7 @@ static void i915_get_mem_freq(struct drm_device *dev)
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
u32 tmp; u32 tmp;
if (!IS_IGD(dev)) if (!IS_PINEVIEW(dev))
return; return;
tmp = I915_READ(CLKCFG); tmp = I915_READ(CLKCFG);
...@@ -1440,7 +1440,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) ...@@ -1440,7 +1440,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
dev->driver->get_vblank_counter = i915_get_vblank_counter; dev->driver->get_vblank_counter = i915_get_vblank_counter;
dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
if (IS_G4X(dev) || IS_IGDNG(dev)) { if (IS_G4X(dev) || IS_IRONLAKE(dev)) {
dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */ dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */
dev->driver->get_vblank_counter = gm45_get_vblank_counter; dev->driver->get_vblank_counter = gm45_get_vblank_counter;
} }
......
...@@ -209,7 +209,7 @@ typedef struct drm_i915_private { ...@@ -209,7 +209,7 @@ typedef struct drm_i915_private {
/** Cached value of IMR to avoid reads in updating the bitfield */ /** Cached value of IMR to avoid reads in updating the bitfield */
u32 irq_mask_reg; u32 irq_mask_reg;
u32 pipestat[2]; u32 pipestat[2];
/** splitted irq regs for graphics and display engine on IGDNG, /** splitted irq regs for graphics and display engine on Ironlake,
irq_mask_reg is still used for display irq. */ irq_mask_reg is still used for display irq. */
u32 gt_irq_mask_reg; u32 gt_irq_mask_reg;
u32 gt_irq_enable_reg; u32 gt_irq_enable_reg;
...@@ -1010,51 +1010,51 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); ...@@ -1010,51 +1010,51 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
(dev)->pci_device == 0x2E42 || \ (dev)->pci_device == 0x2E42 || \
IS_GM45(dev)) IS_GM45(dev))
#define IS_IGDG(dev) ((dev)->pci_device == 0xa001) #define IS_PINEVIEW_G(dev) ((dev)->pci_device == 0xa001)
#define IS_IGDGM(dev) ((dev)->pci_device == 0xa011) #define IS_PINEVIEW_M(dev) ((dev)->pci_device == 0xa011)
#define IS_IGD(dev) (IS_IGDG(dev) || IS_IGDGM(dev)) #define IS_PINEVIEW(dev) (IS_PINEVIEW_G(dev) || IS_PINEVIEW_M(dev))
#define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \ #define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \
(dev)->pci_device == 0x29B2 || \ (dev)->pci_device == 0x29B2 || \
(dev)->pci_device == 0x29D2 || \ (dev)->pci_device == 0x29D2 || \
(IS_IGD(dev))) (IS_PINEVIEW(dev)))
#define IS_IGDNG_D(dev) ((dev)->pci_device == 0x0042) #define IS_IRONLAKE_D(dev) ((dev)->pci_device == 0x0042)
#define IS_IGDNG_M(dev) ((dev)->pci_device == 0x0046) #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046)
#define IS_IGDNG(dev) (IS_IGDNG_D(dev) || IS_IGDNG_M(dev)) #define IS_IRONLAKE(dev) (IS_IRONLAKE_D(dev) || IS_IRONLAKE_M(dev))
#define IS_I9XX(dev) (IS_I915G(dev) || IS_I915GM(dev) || IS_I945G(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_IGDNG(dev)) IS_IRONLAKE(dev))
#define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \ #define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) || IS_I915GM(dev) || \
IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev) || \ IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev) || \
IS_IGD(dev) || IS_IGDNG_M(dev)) IS_PINEVIEW(dev) || IS_IRONLAKE_M(dev))
#define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev) || \ #define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) || IS_G4X(dev) || \
IS_IGDNG(dev)) IS_IRONLAKE(dev))
/* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte
* rows, which changed the alignment requirements and fence programming. * rows, which changed the alignment requirements and fence programming.
*/ */
#define HAS_128_BYTE_Y_TILING(dev) (IS_I9XX(dev) && !(IS_I915G(dev) || \ #define HAS_128_BYTE_Y_TILING(dev) (IS_I9XX(dev) && !(IS_I915G(dev) || \
IS_I915GM(dev))) IS_I915GM(dev)))
#define SUPPORTS_DIGITAL_OUTPUTS(dev) (IS_I9XX(dev) && !IS_IGD(dev)) #define SUPPORTS_DIGITAL_OUTPUTS(dev) (IS_I9XX(dev) && !IS_PINEVIEW(dev))
#define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IGDNG(dev)) #define SUPPORTS_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_IRONLAKE(dev))
#define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_IGDNG(dev)) #define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_IRONLAKE(dev))
#define SUPPORTS_EDP(dev) (IS_IGDNG_M(dev)) #define SUPPORTS_EDP(dev) (IS_IRONLAKE_M(dev))
#define SUPPORTS_TV(dev) (IS_I9XX(dev) && IS_MOBILE(dev) && \ #define SUPPORTS_TV(dev) (IS_I9XX(dev) && IS_MOBILE(dev) && \
!IS_IGDNG(dev) && !IS_IGD(dev)) !IS_IRONLAKE(dev) && !IS_PINEVIEW(dev))
#define I915_HAS_HOTPLUG(dev) (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev) || IS_I965G(dev)) #define I915_HAS_HOTPLUG(dev) (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev) || IS_I965G(dev))
/* dsparb controlled by hw only */ /* dsparb controlled by hw only */
#define DSPARB_HWCONTROL(dev) (IS_G4X(dev) || IS_IGDNG(dev)) #define DSPARB_HWCONTROL(dev) (IS_G4X(dev) || IS_IRONLAKE(dev))
#define HAS_FW_BLC(dev) (IS_I9XX(dev) || IS_G4X(dev) || IS_IGDNG(dev)) #define HAS_FW_BLC(dev) (IS_I9XX(dev) || IS_G4X(dev) || IS_IRONLAKE(dev))
#define HAS_PIPE_CXSR(dev) (IS_G4X(dev) || IS_IGDNG(dev)) #define HAS_PIPE_CXSR(dev) (IS_G4X(dev) || IS_IRONLAKE(dev))
#define I915_HAS_FBC(dev) (IS_MOBILE(dev) && \ #define I915_HAS_FBC(dev) (IS_MOBILE(dev) && \
(IS_I9XX(dev) || IS_GM45(dev)) && \ (IS_I9XX(dev) || IS_GM45(dev)) && \
!IS_IGD(dev) && \ !IS_PINEVIEW(dev) && \
!IS_IGDNG(dev)) !IS_IRONLAKE(dev))
#define I915_HAS_RC6(dev) (IS_I965GM(dev) || IS_GM45(dev) || IS_IGDNG_M(dev)) #define I915_HAS_RC6(dev) (IS_I965GM(dev) || IS_GM45(dev) || IS_IRONLAKE_M(dev))
#define PRIMARY_RINGBUFFER_SIZE (128*1024) #define PRIMARY_RINGBUFFER_SIZE (128*1024)
......
...@@ -1833,7 +1833,7 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno, int interruptible) ...@@ -1833,7 +1833,7 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno, int interruptible)
return -EIO; return -EIO;
if (!i915_seqno_passed(i915_get_gem_seqno(dev), seqno)) { if (!i915_seqno_passed(i915_get_gem_seqno(dev), seqno)) {
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
ier = I915_READ(DEIER) | I915_READ(GTIER); ier = I915_READ(DEIER) | I915_READ(GTIER);
else else
ier = I915_READ(IER); ier = I915_READ(IER);
......
...@@ -209,8 +209,8 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev) ...@@ -209,8 +209,8 @@ i915_gem_detect_bit_6_swizzle(struct drm_device *dev)
uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN; uint32_t swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
bool need_disable; bool need_disable;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
/* On IGDNG whatever DRAM config, GPU always do /* On Ironlake whatever DRAM config, GPU always do
* same swizzling setup. * same swizzling setup.
*/ */
swizzle_x = I915_BIT_6_SWIZZLE_9_10; swizzle_x = I915_BIT_6_SWIZZLE_9_10;
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
DRM_I915_VBLANK_PIPE_B) DRM_I915_VBLANK_PIPE_B)
void void
igdng_enable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask) ironlake_enable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask)
{ {
if ((dev_priv->gt_irq_mask_reg & mask) != 0) { if ((dev_priv->gt_irq_mask_reg & mask) != 0) {
dev_priv->gt_irq_mask_reg &= ~mask; dev_priv->gt_irq_mask_reg &= ~mask;
...@@ -74,7 +74,7 @@ igdng_enable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask) ...@@ -74,7 +74,7 @@ igdng_enable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask)
} }
static inline void static inline void
igdng_disable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask) ironlake_disable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask)
{ {
if ((dev_priv->gt_irq_mask_reg & mask) != mask) { if ((dev_priv->gt_irq_mask_reg & mask) != mask) {
dev_priv->gt_irq_mask_reg |= mask; dev_priv->gt_irq_mask_reg |= mask;
...@@ -85,7 +85,7 @@ igdng_disable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask) ...@@ -85,7 +85,7 @@ igdng_disable_graphics_irq(drm_i915_private_t *dev_priv, u32 mask)
/* For display hotplug interrupt */ /* For display hotplug interrupt */
void void
igdng_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask) ironlake_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask)
{ {
if ((dev_priv->irq_mask_reg & mask) != 0) { if ((dev_priv->irq_mask_reg & mask) != 0) {
dev_priv->irq_mask_reg &= ~mask; dev_priv->irq_mask_reg &= ~mask;
...@@ -95,7 +95,7 @@ igdng_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask) ...@@ -95,7 +95,7 @@ igdng_enable_display_irq(drm_i915_private_t *dev_priv, u32 mask)
} }
static inline void static inline void
igdng_disable_display_irq(drm_i915_private_t *dev_priv, u32 mask) ironlake_disable_display_irq(drm_i915_private_t *dev_priv, u32 mask)
{ {
if ((dev_priv->irq_mask_reg & mask) != mask) { if ((dev_priv->irq_mask_reg & mask) != mask) {
dev_priv->irq_mask_reg |= mask; dev_priv->irq_mask_reg |= mask;
...@@ -166,8 +166,8 @@ void intel_enable_asle (struct drm_device *dev) ...@@ -166,8 +166,8 @@ void intel_enable_asle (struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
igdng_enable_display_irq(dev_priv, DE_GSE); ironlake_enable_display_irq(dev_priv, DE_GSE);
else else
i915_enable_pipestat(dev_priv, 1, i915_enable_pipestat(dev_priv, 1,
I915_LEGACY_BLC_EVENT_ENABLE); I915_LEGACY_BLC_EVENT_ENABLE);
...@@ -269,7 +269,7 @@ static void i915_hotplug_work_func(struct work_struct *work) ...@@ -269,7 +269,7 @@ static void i915_hotplug_work_func(struct work_struct *work)
drm_sysfs_hotplug_event(dev); drm_sysfs_hotplug_event(dev);
} }
irqreturn_t igdng_irq_handler(struct drm_device *dev) irqreturn_t ironlake_irq_handler(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
int ret = IRQ_NONE; int ret = IRQ_NONE;
...@@ -561,8 +561,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS) ...@@ -561,8 +561,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
atomic_inc(&dev_priv->irq_received); atomic_inc(&dev_priv->irq_received);
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return igdng_irq_handler(dev); return ironlake_irq_handler(dev);
iir = I915_READ(IIR); iir = I915_READ(IIR);
...@@ -722,8 +722,8 @@ void i915_user_irq_get(struct drm_device *dev) ...@@ -722,8 +722,8 @@ void i915_user_irq_get(struct drm_device *dev)
spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
if (dev->irq_enabled && (++dev_priv->user_irq_refcount == 1)) { if (dev->irq_enabled && (++dev_priv->user_irq_refcount == 1)) {
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
igdng_enable_graphics_irq(dev_priv, GT_USER_INTERRUPT); ironlake_enable_graphics_irq(dev_priv, GT_USER_INTERRUPT);
else else
i915_enable_irq(dev_priv, I915_USER_INTERRUPT); i915_enable_irq(dev_priv, I915_USER_INTERRUPT);
} }
...@@ -738,8 +738,8 @@ void i915_user_irq_put(struct drm_device *dev) ...@@ -738,8 +738,8 @@ void i915_user_irq_put(struct drm_device *dev)
spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
BUG_ON(dev->irq_enabled && dev_priv->user_irq_refcount <= 0); BUG_ON(dev->irq_enabled && dev_priv->user_irq_refcount <= 0);
if (dev->irq_enabled && (--dev_priv->user_irq_refcount == 0)) { if (dev->irq_enabled && (--dev_priv->user_irq_refcount == 0)) {
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
igdng_disable_graphics_irq(dev_priv, GT_USER_INTERRUPT); ironlake_disable_graphics_irq(dev_priv, GT_USER_INTERRUPT);
else else
i915_disable_irq(dev_priv, I915_USER_INTERRUPT); i915_disable_irq(dev_priv, I915_USER_INTERRUPT);
} }
...@@ -845,7 +845,7 @@ int i915_enable_vblank(struct drm_device *dev, int pipe) ...@@ -845,7 +845,7 @@ int i915_enable_vblank(struct drm_device *dev, int pipe)
if (!(pipeconf & PIPEACONF_ENABLE)) if (!(pipeconf & PIPEACONF_ENABLE))
return -EINVAL; return -EINVAL;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return 0; return 0;
spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
...@@ -867,7 +867,7 @@ void i915_disable_vblank(struct drm_device *dev, int pipe) ...@@ -867,7 +867,7 @@ void i915_disable_vblank(struct drm_device *dev, int pipe)
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
unsigned long irqflags; unsigned long irqflags;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return; return;
spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags);
...@@ -881,7 +881,7 @@ void i915_enable_interrupt (struct drm_device *dev) ...@@ -881,7 +881,7 @@ void i915_enable_interrupt (struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (!IS_IGDNG(dev)) if (!IS_IRONLAKE(dev))
opregion_enable_asle(dev); opregion_enable_asle(dev);
dev_priv->irq_enabled = 1; dev_priv->irq_enabled = 1;
} }
...@@ -989,7 +989,7 @@ void i915_hangcheck_elapsed(unsigned long data) ...@@ -989,7 +989,7 @@ void i915_hangcheck_elapsed(unsigned long data)
/* drm_dma.h hooks /* drm_dma.h hooks
*/ */
static void igdng_irq_preinstall(struct drm_device *dev) static void ironlake_irq_preinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
...@@ -1012,7 +1012,7 @@ static void igdng_irq_preinstall(struct drm_device *dev) ...@@ -1012,7 +1012,7 @@ static void igdng_irq_preinstall(struct drm_device *dev)
(void) I915_READ(SDEIER); (void) I915_READ(SDEIER);
} }
static int igdng_irq_postinstall(struct drm_device *dev) static int ironlake_irq_postinstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
/* enable kind of interrupts always enabled */ /* enable kind of interrupts always enabled */
...@@ -1059,8 +1059,8 @@ void i915_driver_irq_preinstall(struct drm_device * dev) ...@@ -1059,8 +1059,8 @@ void i915_driver_irq_preinstall(struct drm_device * dev)
INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func); INIT_WORK(&dev_priv->hotplug_work, i915_hotplug_work_func);
INIT_WORK(&dev_priv->error_work, i915_error_work_func); INIT_WORK(&dev_priv->error_work, i915_error_work_func);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
igdng_irq_preinstall(dev); ironlake_irq_preinstall(dev);
return; return;
} }
...@@ -1087,8 +1087,8 @@ int i915_driver_irq_postinstall(struct drm_device *dev) ...@@ -1087,8 +1087,8 @@ int i915_driver_irq_postinstall(struct drm_device *dev)
dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B; dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return igdng_irq_postinstall(dev); return ironlake_irq_postinstall(dev);
/* Unmask the interrupts that we always want on. */ /* Unmask the interrupts that we always want on. */
dev_priv->irq_mask_reg = ~I915_INTERRUPT_ENABLE_FIX; dev_priv->irq_mask_reg = ~I915_INTERRUPT_ENABLE_FIX;
...@@ -1148,7 +1148,7 @@ int i915_driver_irq_postinstall(struct drm_device *dev) ...@@ -1148,7 +1148,7 @@ int i915_driver_irq_postinstall(struct drm_device *dev)
return 0; return 0;
} }
static void igdng_irq_uninstall(struct drm_device *dev) static void ironlake_irq_uninstall(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
I915_WRITE(HWSTAM, 0xffffffff); I915_WRITE(HWSTAM, 0xffffffff);
...@@ -1171,8 +1171,8 @@ void i915_driver_irq_uninstall(struct drm_device * dev) ...@@ -1171,8 +1171,8 @@ void i915_driver_irq_uninstall(struct drm_device * dev)
dev_priv->vblank_pipe = 0; dev_priv->vblank_pipe = 0;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
igdng_irq_uninstall(dev); ironlake_irq_uninstall(dev);
return; return;
} }
......
...@@ -167,7 +167,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp) ...@@ -167,7 +167,7 @@ static u32 asle_set_backlight(struct drm_device *dev, u32 bclp)
if (IS_I965G(dev) && (blc_pwm_ctl2 & BLM_COMBINATION_MODE)) if (IS_I965G(dev) && (blc_pwm_ctl2 & BLM_COMBINATION_MODE))
pci_write_config_dword(dev->pdev, PCI_LBPC, bclp); pci_write_config_dword(dev->pdev, PCI_LBPC, bclp);
else { else {
if (IS_IGD(dev)) { if (IS_PINEVIEW(dev)) {
blc_pwm_ctl &= ~(BACKLIGHT_DUTY_CYCLE_MASK - 1); blc_pwm_ctl &= ~(BACKLIGHT_DUTY_CYCLE_MASK - 1);
max_backlight = (blc_pwm_ctl & BACKLIGHT_MODULATION_FREQ_MASK) >> max_backlight = (blc_pwm_ctl & BACKLIGHT_MODULATION_FREQ_MASK) >>
BACKLIGHT_MODULATION_FREQ_SHIFT; BACKLIGHT_MODULATION_FREQ_SHIFT;
......
...@@ -451,7 +451,7 @@ ...@@ -451,7 +451,7 @@
#define DPLLB_LVDS_P2_CLOCK_DIV_7 (1 << 24) /* i915 */ #define DPLLB_LVDS_P2_CLOCK_DIV_7 (1 << 24) /* i915 */
#define DPLL_P2_CLOCK_DIV_MASK 0x03000000 /* i915 */ #define DPLL_P2_CLOCK_DIV_MASK 0x03000000 /* i915 */
#define DPLL_FPA01_P1_POST_DIV_MASK 0x00ff0000 /* i915 */ #define DPLL_FPA01_P1_POST_DIV_MASK 0x00ff0000 /* i915 */
#define DPLL_FPA01_P1_POST_DIV_MASK_IGD 0x00ff8000 /* IGD */ #define DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW 0x00ff8000 /* Pineview */
#define I915_FIFO_UNDERRUN_STATUS (1UL<<31) #define I915_FIFO_UNDERRUN_STATUS (1UL<<31)
#define I915_CRC_ERROR_ENABLE (1UL<<29) #define I915_CRC_ERROR_ENABLE (1UL<<29)
...@@ -528,7 +528,7 @@ ...@@ -528,7 +528,7 @@
*/ */
#define DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS 0x003f0000 #define DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS 0x003f0000
#define DPLL_FPA01_P1_POST_DIV_SHIFT 16 #define DPLL_FPA01_P1_POST_DIV_SHIFT 16
#define DPLL_FPA01_P1_POST_DIV_SHIFT_IGD 15 #define DPLL_FPA01_P1_POST_DIV_SHIFT_PINEVIEW 15
/* i830, required in DVO non-gang */ /* i830, required in DVO non-gang */
#define PLL_P2_DIVIDE_BY_4 (1 << 23) #define PLL_P2_DIVIDE_BY_4 (1 << 23)
#define PLL_P1_DIVIDE_BY_TWO (1 << 21) /* i830 */ #define PLL_P1_DIVIDE_BY_TWO (1 << 21) /* i830 */
...@@ -538,7 +538,7 @@ ...@@ -538,7 +538,7 @@
#define PLLB_REF_INPUT_SPREADSPECTRUMIN (3 << 13) #define PLLB_REF_INPUT_SPREADSPECTRUMIN (3 << 13)
#define PLL_REF_INPUT_MASK (3 << 13) #define PLL_REF_INPUT_MASK (3 << 13)
#define PLL_LOAD_PULSE_PHASE_SHIFT 9 #define PLL_LOAD_PULSE_PHASE_SHIFT 9
/* IGDNG */ /* Ironlake */
# define PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT 9 # define PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT 9
# define PLL_REF_SDVO_HDMI_MULTIPLIER_MASK (7 << 9) # define PLL_REF_SDVO_HDMI_MULTIPLIER_MASK (7 << 9)
# define PLL_REF_SDVO_HDMI_MULTIPLIER(x) (((x)-1) << 9) # define PLL_REF_SDVO_HDMI_MULTIPLIER(x) (((x)-1) << 9)
...@@ -602,12 +602,12 @@ ...@@ -602,12 +602,12 @@
#define FPB0 0x06048 #define FPB0 0x06048
#define FPB1 0x0604c #define FPB1 0x0604c
#define FP_N_DIV_MASK 0x003f0000 #define FP_N_DIV_MASK 0x003f0000
#define FP_N_IGD_DIV_MASK 0x00ff0000 #define FP_N_PINEVIEW_DIV_MASK 0x00ff0000
#define FP_N_DIV_SHIFT 16 #define FP_N_DIV_SHIFT 16
#define FP_M1_DIV_MASK 0x00003f00 #define FP_M1_DIV_MASK 0x00003f00
#define FP_M1_DIV_SHIFT 8 #define FP_M1_DIV_SHIFT 8
#define FP_M2_DIV_MASK 0x0000003f #define FP_M2_DIV_MASK 0x0000003f
#define FP_M2_IGD_DIV_MASK 0x000000ff #define FP_M2_PINEVIEW_DIV_MASK 0x000000ff
#define FP_M2_DIV_SHIFT 0 #define FP_M2_DIV_SHIFT 0
#define DPLL_TEST 0x606c #define DPLL_TEST 0x606c
#define DPLLB_TEST_SDVO_DIV_1 (0 << 22) #define DPLLB_TEST_SDVO_DIV_1 (0 << 22)
...@@ -1634,7 +1634,7 @@ ...@@ -1634,7 +1634,7 @@
#define DP_CLOCK_OUTPUT_ENABLE (1 << 13) #define DP_CLOCK_OUTPUT_ENABLE (1 << 13)
#define DP_SCRAMBLING_DISABLE (1 << 12) #define DP_SCRAMBLING_DISABLE (1 << 12)
#define DP_SCRAMBLING_DISABLE_IGDNG (1 << 7) #define DP_SCRAMBLING_DISABLE_IRONLAKE (1 << 7)
/** limit RGB values to avoid confusing TVs */ /** limit RGB values to avoid confusing TVs */
#define DP_COLOR_RANGE_16_235 (1 << 8) #define DP_COLOR_RANGE_16_235 (1 << 8)
...@@ -1822,7 +1822,7 @@ ...@@ -1822,7 +1822,7 @@
#define DSPFW3 0x7003c #define DSPFW3 0x7003c
#define DSPFW_HPLL_SR_EN (1<<31) #define DSPFW_HPLL_SR_EN (1<<31)
#define DSPFW_CURSOR_SR_SHIFT 24 #define DSPFW_CURSOR_SR_SHIFT 24
#define IGD_SELF_REFRESH_EN (1<<30) #define PINEVIEW_SELF_REFRESH_EN (1<<30)
/* FIFO watermark sizes etc */ /* FIFO watermark sizes etc */
#define G4X_FIFO_LINE_SIZE 64 #define G4X_FIFO_LINE_SIZE 64
...@@ -1838,16 +1838,16 @@ ...@@ -1838,16 +1838,16 @@
#define G4X_MAX_WM 0x3f #define G4X_MAX_WM 0x3f
#define I915_MAX_WM 0x3f #define I915_MAX_WM 0x3f
#define IGD_DISPLAY_FIFO 512 /* in 64byte unit */ #define PINEVIEW_DISPLAY_FIFO 512 /* in 64byte unit */
#define IGD_FIFO_LINE_SIZE 64 #define PINEVIEW_FIFO_LINE_SIZE 64
#define IGD_MAX_WM 0x1ff #define PINEVIEW_MAX_WM 0x1ff
#define IGD_DFT_WM 0x3f #define PINEVIEW_DFT_WM 0x3f
#define IGD_DFT_HPLLOFF_WM 0 #define PINEVIEW_DFT_HPLLOFF_WM 0
#define IGD_GUARD_WM 10 #define PINEVIEW_GUARD_WM 10
#define IGD_CURSOR_FIFO 64 #define PINEVIEW_CURSOR_FIFO 64
#define IGD_CURSOR_MAX_WM 0x3f #define PINEVIEW_CURSOR_MAX_WM 0x3f
#define IGD_CURSOR_DFT_WM 0 #define PINEVIEW_CURSOR_DFT_WM 0
#define IGD_CURSOR_GUARD_WM 5 #define PINEVIEW_CURSOR_GUARD_WM 5
/* /*
* The two pipe frame counter registers are not synchronized, so * The two pipe frame counter registers are not synchronized, so
...@@ -1933,7 +1933,7 @@ ...@@ -1933,7 +1933,7 @@
#define DISPPLANE_NO_LINE_DOUBLE 0 #define DISPPLANE_NO_LINE_DOUBLE 0
#define DISPPLANE_STEREO_POLARITY_FIRST 0 #define DISPPLANE_STEREO_POLARITY_FIRST 0
#define DISPPLANE_STEREO_POLARITY_SECOND (1<<18) #define DISPPLANE_STEREO_POLARITY_SECOND (1<<18)
#define DISPPLANE_TRICKLE_FEED_DISABLE (1<<14) /* IGDNG */ #define DISPPLANE_TRICKLE_FEED_DISABLE (1<<14) /* Ironlake */
#define DISPPLANE_TILED (1<<10) #define DISPPLANE_TILED (1<<10)
#define DSPAADDR 0x70184 #define DSPAADDR 0x70184
#define DSPASTRIDE 0x70188 #define DSPASTRIDE 0x70188
...@@ -1986,7 +1986,7 @@ ...@@ -1986,7 +1986,7 @@
# define VGA_2X_MODE (1 << 30) # define VGA_2X_MODE (1 << 30)
# define VGA_PIPE_B_SELECT (1 << 29) # define VGA_PIPE_B_SELECT (1 << 29)
/* IGDNG */ /* Ironlake */
#define CPU_VGACNTRL 0x41000 #define CPU_VGACNTRL 0x41000
...@@ -2315,7 +2315,7 @@ ...@@ -2315,7 +2315,7 @@
#define FDI_DP_PORT_WIDTH_X3 (2<<19) #define FDI_DP_PORT_WIDTH_X3 (2<<19)
#define FDI_DP_PORT_WIDTH_X4 (3<<19) #define FDI_DP_PORT_WIDTH_X4 (3<<19)
#define FDI_TX_ENHANCE_FRAME_ENABLE (1<<18) #define FDI_TX_ENHANCE_FRAME_ENABLE (1<<18)
/* IGDNG: hardwired to 1 */ /* Ironlake: hardwired to 1 */
#define FDI_TX_PLL_ENABLE (1<<14) #define FDI_TX_PLL_ENABLE (1<<14)
/* both Tx and Rx */ /* both Tx and Rx */
#define FDI_SCRAMBLING_ENABLE (0<<7) #define FDI_SCRAMBLING_ENABLE (0<<7)
......
...@@ -34,7 +34,7 @@ static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe) ...@@ -34,7 +34,7 @@ static bool i915_pipe_enabled(struct drm_device *dev, enum pipe pipe)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 dpll_reg; u32 dpll_reg;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dpll_reg = (pipe == PIPE_A) ? PCH_DPLL_A: PCH_DPLL_B; dpll_reg = (pipe == PIPE_A) ? PCH_DPLL_A: PCH_DPLL_B;
} else { } else {
dpll_reg = (pipe == PIPE_A) ? DPLL_A: DPLL_B; dpll_reg = (pipe == PIPE_A) ? DPLL_A: DPLL_B;
...@@ -53,7 +53,7 @@ static void i915_save_palette(struct drm_device *dev, enum pipe pipe) ...@@ -53,7 +53,7 @@ static void i915_save_palette(struct drm_device *dev, enum pipe pipe)
if (!i915_pipe_enabled(dev, pipe)) if (!i915_pipe_enabled(dev, pipe))
return; return;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
reg = (pipe == PIPE_A) ? LGC_PALETTE_A : LGC_PALETTE_B; reg = (pipe == PIPE_A) ? LGC_PALETTE_A : LGC_PALETTE_B;
if (pipe == PIPE_A) if (pipe == PIPE_A)
...@@ -75,7 +75,7 @@ static void i915_restore_palette(struct drm_device *dev, enum pipe pipe) ...@@ -75,7 +75,7 @@ static void i915_restore_palette(struct drm_device *dev, enum pipe pipe)
if (!i915_pipe_enabled(dev, pipe)) if (!i915_pipe_enabled(dev, pipe))
return; return;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
reg = (pipe == PIPE_A) ? LGC_PALETTE_A : LGC_PALETTE_B; reg = (pipe == PIPE_A) ? LGC_PALETTE_A : LGC_PALETTE_B;
if (pipe == PIPE_A) if (pipe == PIPE_A)
...@@ -242,7 +242,7 @@ static void i915_save_modeset_reg(struct drm_device *dev) ...@@ -242,7 +242,7 @@ static void i915_save_modeset_reg(struct drm_device *dev)
/* Pipe & plane A info */ /* Pipe & plane A info */
dev_priv->savePIPEACONF = I915_READ(PIPEACONF); dev_priv->savePIPEACONF = I915_READ(PIPEACONF);
dev_priv->savePIPEASRC = I915_READ(PIPEASRC); dev_priv->savePIPEASRC = I915_READ(PIPEASRC);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dev_priv->saveFPA0 = I915_READ(PCH_FPA0); dev_priv->saveFPA0 = I915_READ(PCH_FPA0);
dev_priv->saveFPA1 = I915_READ(PCH_FPA1); dev_priv->saveFPA1 = I915_READ(PCH_FPA1);
dev_priv->saveDPLL_A = I915_READ(PCH_DPLL_A); dev_priv->saveDPLL_A = I915_READ(PCH_DPLL_A);
...@@ -251,7 +251,7 @@ static void i915_save_modeset_reg(struct drm_device *dev) ...@@ -251,7 +251,7 @@ static void i915_save_modeset_reg(struct drm_device *dev)
dev_priv->saveFPA1 = I915_READ(FPA1); dev_priv->saveFPA1 = I915_READ(FPA1);
dev_priv->saveDPLL_A = I915_READ(DPLL_A); dev_priv->saveDPLL_A = I915_READ(DPLL_A);
} }
if (IS_I965G(dev) && !IS_IGDNG(dev)) if (IS_I965G(dev) && !IS_IRONLAKE(dev))
dev_priv->saveDPLL_A_MD = I915_READ(DPLL_A_MD); dev_priv->saveDPLL_A_MD = I915_READ(DPLL_A_MD);
dev_priv->saveHTOTAL_A = I915_READ(HTOTAL_A); dev_priv->saveHTOTAL_A = I915_READ(HTOTAL_A);
dev_priv->saveHBLANK_A = I915_READ(HBLANK_A); dev_priv->saveHBLANK_A = I915_READ(HBLANK_A);
...@@ -259,10 +259,10 @@ static void i915_save_modeset_reg(struct drm_device *dev) ...@@ -259,10 +259,10 @@ static void i915_save_modeset_reg(struct drm_device *dev)
dev_priv->saveVTOTAL_A = I915_READ(VTOTAL_A); dev_priv->saveVTOTAL_A = I915_READ(VTOTAL_A);
dev_priv->saveVBLANK_A = I915_READ(VBLANK_A); dev_priv->saveVBLANK_A = I915_READ(VBLANK_A);
dev_priv->saveVSYNC_A = I915_READ(VSYNC_A); dev_priv->saveVSYNC_A = I915_READ(VSYNC_A);
if (!IS_IGDNG(dev)) if (!IS_IRONLAKE(dev))
dev_priv->saveBCLRPAT_A = I915_READ(BCLRPAT_A); dev_priv->saveBCLRPAT_A = I915_READ(BCLRPAT_A);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dev_priv->saveFDI_TXA_CTL = I915_READ(FDI_TXA_CTL); dev_priv->saveFDI_TXA_CTL = I915_READ(FDI_TXA_CTL);
dev_priv->saveFDI_RXA_CTL = I915_READ(FDI_RXA_CTL); dev_priv->saveFDI_RXA_CTL = I915_READ(FDI_RXA_CTL);
...@@ -293,7 +293,7 @@ static void i915_save_modeset_reg(struct drm_device *dev) ...@@ -293,7 +293,7 @@ static void i915_save_modeset_reg(struct drm_device *dev)
/* Pipe & plane B info */ /* Pipe & plane B info */
dev_priv->savePIPEBCONF = I915_READ(PIPEBCONF); dev_priv->savePIPEBCONF = I915_READ(PIPEBCONF);
dev_priv->savePIPEBSRC = I915_READ(PIPEBSRC); dev_priv->savePIPEBSRC = I915_READ(PIPEBSRC);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dev_priv->saveFPB0 = I915_READ(PCH_FPB0); dev_priv->saveFPB0 = I915_READ(PCH_FPB0);
dev_priv->saveFPB1 = I915_READ(PCH_FPB1); dev_priv->saveFPB1 = I915_READ(PCH_FPB1);
dev_priv->saveDPLL_B = I915_READ(PCH_DPLL_B); dev_priv->saveDPLL_B = I915_READ(PCH_DPLL_B);
...@@ -302,7 +302,7 @@ static void i915_save_modeset_reg(struct drm_device *dev) ...@@ -302,7 +302,7 @@ static void i915_save_modeset_reg(struct drm_device *dev)
dev_priv->saveFPB1 = I915_READ(FPB1); dev_priv->saveFPB1 = I915_READ(FPB1);
dev_priv->saveDPLL_B = I915_READ(DPLL_B); dev_priv->saveDPLL_B = I915_READ(DPLL_B);
} }
if (IS_I965G(dev) && !IS_IGDNG(dev)) if (IS_I965G(dev) && !IS_IRONLAKE(dev))
dev_priv->saveDPLL_B_MD = I915_READ(DPLL_B_MD); dev_priv->saveDPLL_B_MD = I915_READ(DPLL_B_MD);
dev_priv->saveHTOTAL_B = I915_READ(HTOTAL_B); dev_priv->saveHTOTAL_B = I915_READ(HTOTAL_B);
dev_priv->saveHBLANK_B = I915_READ(HBLANK_B); dev_priv->saveHBLANK_B = I915_READ(HBLANK_B);
...@@ -310,10 +310,10 @@ static void i915_save_modeset_reg(struct drm_device *dev) ...@@ -310,10 +310,10 @@ static void i915_save_modeset_reg(struct drm_device *dev)
dev_priv->saveVTOTAL_B = I915_READ(VTOTAL_B); dev_priv->saveVTOTAL_B = I915_READ(VTOTAL_B);
dev_priv->saveVBLANK_B = I915_READ(VBLANK_B); dev_priv->saveVBLANK_B = I915_READ(VBLANK_B);
dev_priv->saveVSYNC_B = I915_READ(VSYNC_B); dev_priv->saveVSYNC_B = I915_READ(VSYNC_B);
if (!IS_IGDNG(dev)) if (!IS_IRONLAKE(dev))
dev_priv->saveBCLRPAT_B = I915_READ(BCLRPAT_B); dev_priv->saveBCLRPAT_B = I915_READ(BCLRPAT_B);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dev_priv->saveFDI_TXB_CTL = I915_READ(FDI_TXB_CTL); dev_priv->saveFDI_TXB_CTL = I915_READ(FDI_TXB_CTL);
dev_priv->saveFDI_RXB_CTL = I915_READ(FDI_RXB_CTL); dev_priv->saveFDI_RXB_CTL = I915_READ(FDI_RXB_CTL);
...@@ -352,7 +352,7 @@ static void i915_restore_modeset_reg(struct drm_device *dev) ...@@ -352,7 +352,7 @@ static void i915_restore_modeset_reg(struct drm_device *dev)
if (drm_core_check_feature(dev, DRIVER_MODESET)) if (drm_core_check_feature(dev, DRIVER_MODESET))
return; return;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dpll_a_reg = PCH_DPLL_A; dpll_a_reg = PCH_DPLL_A;
dpll_b_reg = PCH_DPLL_B; dpll_b_reg = PCH_DPLL_B;
fpa0_reg = PCH_FPA0; fpa0_reg = PCH_FPA0;
...@@ -380,7 +380,7 @@ static void i915_restore_modeset_reg(struct drm_device *dev) ...@@ -380,7 +380,7 @@ static void i915_restore_modeset_reg(struct drm_device *dev)
/* Actually enable it */ /* Actually enable it */
I915_WRITE(dpll_a_reg, dev_priv->saveDPLL_A); I915_WRITE(dpll_a_reg, dev_priv->saveDPLL_A);
DRM_UDELAY(150); DRM_UDELAY(150);
if (IS_I965G(dev) && !IS_IGDNG(dev)) if (IS_I965G(dev) && !IS_IRONLAKE(dev))
I915_WRITE(DPLL_A_MD, dev_priv->saveDPLL_A_MD); I915_WRITE(DPLL_A_MD, dev_priv->saveDPLL_A_MD);
DRM_UDELAY(150); DRM_UDELAY(150);
...@@ -391,10 +391,10 @@ static void i915_restore_modeset_reg(struct drm_device *dev) ...@@ -391,10 +391,10 @@ static void i915_restore_modeset_reg(struct drm_device *dev)
I915_WRITE(VTOTAL_A, dev_priv->saveVTOTAL_A); I915_WRITE(VTOTAL_A, dev_priv->saveVTOTAL_A);
I915_WRITE(VBLANK_A, dev_priv->saveVBLANK_A); I915_WRITE(VBLANK_A, dev_priv->saveVBLANK_A);
I915_WRITE(VSYNC_A, dev_priv->saveVSYNC_A); I915_WRITE(VSYNC_A, dev_priv->saveVSYNC_A);
if (!IS_IGDNG(dev)) if (!IS_IRONLAKE(dev))
I915_WRITE(BCLRPAT_A, dev_priv->saveBCLRPAT_A); I915_WRITE(BCLRPAT_A, dev_priv->saveBCLRPAT_A);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(FDI_RXA_CTL, dev_priv->saveFDI_RXA_CTL); I915_WRITE(FDI_RXA_CTL, dev_priv->saveFDI_RXA_CTL);
I915_WRITE(FDI_TXA_CTL, dev_priv->saveFDI_TXA_CTL); I915_WRITE(FDI_TXA_CTL, dev_priv->saveFDI_TXA_CTL);
...@@ -450,10 +450,10 @@ static void i915_restore_modeset_reg(struct drm_device *dev) ...@@ -450,10 +450,10 @@ static void i915_restore_modeset_reg(struct drm_device *dev)
I915_WRITE(VTOTAL_B, dev_priv->saveVTOTAL_B); I915_WRITE(VTOTAL_B, dev_priv->saveVTOTAL_B);
I915_WRITE(VBLANK_B, dev_priv->saveVBLANK_B); I915_WRITE(VBLANK_B, dev_priv->saveVBLANK_B);
I915_WRITE(VSYNC_B, dev_priv->saveVSYNC_B); I915_WRITE(VSYNC_B, dev_priv->saveVSYNC_B);
if (!IS_IGDNG(dev)) if (!IS_IRONLAKE(dev))
I915_WRITE(BCLRPAT_B, dev_priv->saveBCLRPAT_B); I915_WRITE(BCLRPAT_B, dev_priv->saveBCLRPAT_B);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(FDI_RXB_CTL, dev_priv->saveFDI_RXB_CTL); I915_WRITE(FDI_RXB_CTL, dev_priv->saveFDI_RXB_CTL);
I915_WRITE(FDI_TXB_CTL, dev_priv->saveFDI_TXB_CTL); I915_WRITE(FDI_TXB_CTL, dev_priv->saveFDI_TXB_CTL);
...@@ -512,14 +512,14 @@ void i915_save_display(struct drm_device *dev) ...@@ -512,14 +512,14 @@ void i915_save_display(struct drm_device *dev)
dev_priv->saveCURSIZE = I915_READ(CURSIZE); dev_priv->saveCURSIZE = I915_READ(CURSIZE);
/* CRT state */ /* CRT state */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dev_priv->saveADPA = I915_READ(PCH_ADPA); dev_priv->saveADPA = I915_READ(PCH_ADPA);
} else { } else {
dev_priv->saveADPA = I915_READ(ADPA); dev_priv->saveADPA = I915_READ(ADPA);
} }
/* LVDS state */ /* LVDS state */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dev_priv->savePP_CONTROL = I915_READ(PCH_PP_CONTROL); dev_priv->savePP_CONTROL = I915_READ(PCH_PP_CONTROL);
dev_priv->saveBLC_PWM_CTL = I915_READ(BLC_PWM_PCH_CTL1); dev_priv->saveBLC_PWM_CTL = I915_READ(BLC_PWM_PCH_CTL1);
dev_priv->saveBLC_PWM_CTL2 = I915_READ(BLC_PWM_PCH_CTL2); dev_priv->saveBLC_PWM_CTL2 = I915_READ(BLC_PWM_PCH_CTL2);
...@@ -537,10 +537,10 @@ void i915_save_display(struct drm_device *dev) ...@@ -537,10 +537,10 @@ void i915_save_display(struct drm_device *dev)
dev_priv->saveLVDS = I915_READ(LVDS); dev_priv->saveLVDS = I915_READ(LVDS);
} }
if (!IS_I830(dev) && !IS_845G(dev) && !IS_IGDNG(dev)) if (!IS_I830(dev) && !IS_845G(dev) && !IS_IRONLAKE(dev))
dev_priv->savePFIT_CONTROL = I915_READ(PFIT_CONTROL); dev_priv->savePFIT_CONTROL = I915_READ(PFIT_CONTROL);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dev_priv->savePP_ON_DELAYS = I915_READ(PCH_PP_ON_DELAYS); dev_priv->savePP_ON_DELAYS = I915_READ(PCH_PP_ON_DELAYS);
dev_priv->savePP_OFF_DELAYS = I915_READ(PCH_PP_OFF_DELAYS); dev_priv->savePP_OFF_DELAYS = I915_READ(PCH_PP_OFF_DELAYS);
dev_priv->savePP_DIVISOR = I915_READ(PCH_PP_DIVISOR); dev_priv->savePP_DIVISOR = I915_READ(PCH_PP_DIVISOR);
...@@ -580,7 +580,7 @@ void i915_save_display(struct drm_device *dev) ...@@ -580,7 +580,7 @@ void i915_save_display(struct drm_device *dev)
dev_priv->saveVGA0 = I915_READ(VGA0); dev_priv->saveVGA0 = I915_READ(VGA0);
dev_priv->saveVGA1 = I915_READ(VGA1); dev_priv->saveVGA1 = I915_READ(VGA1);
dev_priv->saveVGA_PD = I915_READ(VGA_PD); dev_priv->saveVGA_PD = I915_READ(VGA_PD);
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
dev_priv->saveVGACNTRL = I915_READ(CPU_VGACNTRL); dev_priv->saveVGACNTRL = I915_READ(CPU_VGACNTRL);
else else
dev_priv->saveVGACNTRL = I915_READ(VGACNTRL); dev_priv->saveVGACNTRL = I915_READ(VGACNTRL);
...@@ -622,24 +622,24 @@ void i915_restore_display(struct drm_device *dev) ...@@ -622,24 +622,24 @@ void i915_restore_display(struct drm_device *dev)
I915_WRITE(CURSIZE, dev_priv->saveCURSIZE); I915_WRITE(CURSIZE, dev_priv->saveCURSIZE);
/* CRT state */ /* CRT state */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
I915_WRITE(PCH_ADPA, dev_priv->saveADPA); I915_WRITE(PCH_ADPA, dev_priv->saveADPA);
else else
I915_WRITE(ADPA, dev_priv->saveADPA); I915_WRITE(ADPA, dev_priv->saveADPA);
/* LVDS state */ /* LVDS state */
if (IS_I965G(dev) && !IS_IGDNG(dev)) if (IS_I965G(dev) && !IS_IRONLAKE(dev))
I915_WRITE(BLC_PWM_CTL2, dev_priv->saveBLC_PWM_CTL2); I915_WRITE(BLC_PWM_CTL2, dev_priv->saveBLC_PWM_CTL2);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(PCH_LVDS, dev_priv->saveLVDS); I915_WRITE(PCH_LVDS, dev_priv->saveLVDS);
} else if (IS_MOBILE(dev) && !IS_I830(dev)) } else if (IS_MOBILE(dev) && !IS_I830(dev))
I915_WRITE(LVDS, dev_priv->saveLVDS); I915_WRITE(LVDS, dev_priv->saveLVDS);
if (!IS_I830(dev) && !IS_845G(dev) && !IS_IGDNG(dev)) if (!IS_I830(dev) && !IS_845G(dev) && !IS_IRONLAKE(dev))
I915_WRITE(PFIT_CONTROL, dev_priv->savePFIT_CONTROL); I915_WRITE(PFIT_CONTROL, dev_priv->savePFIT_CONTROL);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(BLC_PWM_PCH_CTL1, dev_priv->saveBLC_PWM_CTL); I915_WRITE(BLC_PWM_PCH_CTL1, dev_priv->saveBLC_PWM_CTL);
I915_WRITE(BLC_PWM_PCH_CTL2, dev_priv->saveBLC_PWM_CTL2); I915_WRITE(BLC_PWM_PCH_CTL2, dev_priv->saveBLC_PWM_CTL2);
I915_WRITE(BLC_PWM_CPU_CTL, dev_priv->saveBLC_CPU_PWM_CTL); I915_WRITE(BLC_PWM_CPU_CTL, dev_priv->saveBLC_CPU_PWM_CTL);
...@@ -679,7 +679,7 @@ void i915_restore_display(struct drm_device *dev) ...@@ -679,7 +679,7 @@ void i915_restore_display(struct drm_device *dev)
} }
/* VGA state */ /* VGA state */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
I915_WRITE(CPU_VGACNTRL, dev_priv->saveVGACNTRL); I915_WRITE(CPU_VGACNTRL, dev_priv->saveVGACNTRL);
else else
I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL); I915_WRITE(VGACNTRL, dev_priv->saveVGACNTRL);
...@@ -710,7 +710,7 @@ int i915_save_state(struct drm_device *dev) ...@@ -710,7 +710,7 @@ int i915_save_state(struct drm_device *dev)
i915_save_display(dev); i915_save_display(dev);
/* Interrupt state */ /* Interrupt state */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
dev_priv->saveDEIER = I915_READ(DEIER); dev_priv->saveDEIER = I915_READ(DEIER);
dev_priv->saveDEIMR = I915_READ(DEIMR); dev_priv->saveDEIMR = I915_READ(DEIMR);
dev_priv->saveGTIER = I915_READ(GTIER); dev_priv->saveGTIER = I915_READ(GTIER);
...@@ -787,7 +787,7 @@ int i915_restore_state(struct drm_device *dev) ...@@ -787,7 +787,7 @@ int i915_restore_state(struct drm_device *dev)
i915_restore_display(dev); i915_restore_display(dev);
/* Interrupt state */ /* Interrupt state */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(DEIER, dev_priv->saveDEIER); I915_WRITE(DEIER, dev_priv->saveDEIER);
I915_WRITE(DEIMR, dev_priv->saveDEIMR); I915_WRITE(DEIMR, dev_priv->saveDEIMR);
I915_WRITE(GTIER, dev_priv->saveGTIER); I915_WRITE(GTIER, dev_priv->saveGTIER);
......
...@@ -259,7 +259,7 @@ parse_general_features(struct drm_i915_private *dev_priv, ...@@ -259,7 +259,7 @@ parse_general_features(struct drm_i915_private *dev_priv,
if (IS_I85X(dev_priv->dev)) if (IS_I85X(dev_priv->dev))
dev_priv->lvds_ssc_freq = dev_priv->lvds_ssc_freq =
general->ssc_freq ? 66 : 48; general->ssc_freq ? 66 : 48;
else if (IS_IGDNG(dev_priv->dev)) else if (IS_IRONLAKE(dev_priv->dev))
dev_priv->lvds_ssc_freq = dev_priv->lvds_ssc_freq =
general->ssc_freq ? 100 : 120; general->ssc_freq ? 100 : 120;
else else
......
...@@ -39,7 +39,7 @@ static void intel_crt_dpms(struct drm_encoder *encoder, int mode) ...@@ -39,7 +39,7 @@ static void intel_crt_dpms(struct drm_encoder *encoder, int mode)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 temp, reg; u32 temp, reg;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
reg = PCH_ADPA; reg = PCH_ADPA;
else else
reg = ADPA; reg = ADPA;
...@@ -113,7 +113,7 @@ static void intel_crt_mode_set(struct drm_encoder *encoder, ...@@ -113,7 +113,7 @@ static void intel_crt_mode_set(struct drm_encoder *encoder,
else else
dpll_md_reg = DPLL_B_MD; dpll_md_reg = DPLL_B_MD;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
adpa_reg = PCH_ADPA; adpa_reg = PCH_ADPA;
else else
adpa_reg = ADPA; adpa_reg = ADPA;
...@@ -122,7 +122,7 @@ static void intel_crt_mode_set(struct drm_encoder *encoder, ...@@ -122,7 +122,7 @@ static void intel_crt_mode_set(struct drm_encoder *encoder,
* Disable separate mode multiplier used when cloning SDVO to CRT * Disable separate mode multiplier used when cloning SDVO to CRT
* XXX this needs to be adjusted when we really are cloning * XXX this needs to be adjusted when we really are cloning
*/ */
if (IS_I965G(dev) && !IS_IGDNG(dev)) { if (IS_I965G(dev) && !IS_IRONLAKE(dev)) {
dpll_md = I915_READ(dpll_md_reg); dpll_md = I915_READ(dpll_md_reg);
I915_WRITE(dpll_md_reg, I915_WRITE(dpll_md_reg,
dpll_md & ~DPLL_MD_UDI_MULTIPLIER_MASK); dpll_md & ~DPLL_MD_UDI_MULTIPLIER_MASK);
...@@ -136,18 +136,18 @@ static void intel_crt_mode_set(struct drm_encoder *encoder, ...@@ -136,18 +136,18 @@ static void intel_crt_mode_set(struct drm_encoder *encoder,
if (intel_crtc->pipe == 0) { if (intel_crtc->pipe == 0) {
adpa |= ADPA_PIPE_A_SELECT; adpa |= ADPA_PIPE_A_SELECT;
if (!IS_IGDNG(dev)) if (!IS_IRONLAKE(dev))
I915_WRITE(BCLRPAT_A, 0); I915_WRITE(BCLRPAT_A, 0);
} else { } else {
adpa |= ADPA_PIPE_B_SELECT; adpa |= ADPA_PIPE_B_SELECT;
if (!IS_IGDNG(dev)) if (!IS_IRONLAKE(dev))
I915_WRITE(BCLRPAT_B, 0); I915_WRITE(BCLRPAT_B, 0);
} }
I915_WRITE(adpa_reg, adpa); I915_WRITE(adpa_reg, adpa);
} }
static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector) static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector)
{ {
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -199,8 +199,8 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector) ...@@ -199,8 +199,8 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)
u32 hotplug_en; u32 hotplug_en;
int i, tries = 0; int i, tries = 0;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return intel_igdng_crt_detect_hotplug(connector); return intel_ironlake_crt_detect_hotplug(connector);
/* /*
* On 4 series desktop, CRT detect sequence need to be done twice * On 4 series desktop, CRT detect sequence need to be done twice
...@@ -521,7 +521,7 @@ void intel_crt_init(struct drm_device *dev) ...@@ -521,7 +521,7 @@ void intel_crt_init(struct drm_device *dev)
&intel_output->enc); &intel_output->enc);
/* Set up the DDC bus. */ /* Set up the DDC bus. */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
i2c_reg = PCH_GPIOA; i2c_reg = PCH_GPIOA;
else { else {
i2c_reg = GPIOA; i2c_reg = GPIOA;
......
...@@ -102,32 +102,32 @@ struct intel_limit { ...@@ -102,32 +102,32 @@ struct intel_limit {
#define I9XX_DOT_MAX 400000 #define I9XX_DOT_MAX 400000
#define I9XX_VCO_MIN 1400000 #define I9XX_VCO_MIN 1400000
#define I9XX_VCO_MAX 2800000 #define I9XX_VCO_MAX 2800000
#define IGD_VCO_MIN 1700000 #define PINEVIEW_VCO_MIN 1700000
#define IGD_VCO_MAX 3500000 #define PINEVIEW_VCO_MAX 3500000
#define I9XX_N_MIN 1 #define I9XX_N_MIN 1
#define I9XX_N_MAX 6 #define I9XX_N_MAX 6
/* IGD's Ncounter is a ring counter */ /* Pineview's Ncounter is a ring counter */
#define IGD_N_MIN 3 #define PINEVIEW_N_MIN 3
#define IGD_N_MAX 6 #define PINEVIEW_N_MAX 6
#define I9XX_M_MIN 70 #define I9XX_M_MIN 70
#define I9XX_M_MAX 120 #define I9XX_M_MAX 120
#define IGD_M_MIN 2 #define PINEVIEW_M_MIN 2
#define IGD_M_MAX 256 #define PINEVIEW_M_MAX 256
#define I9XX_M1_MIN 10 #define I9XX_M1_MIN 10
#define I9XX_M1_MAX 22 #define I9XX_M1_MAX 22
#define I9XX_M2_MIN 5 #define I9XX_M2_MIN 5
#define I9XX_M2_MAX 9 #define I9XX_M2_MAX 9
/* IGD M1 is reserved, and must be 0 */ /* Pineview M1 is reserved, and must be 0 */
#define IGD_M1_MIN 0 #define PINEVIEW_M1_MIN 0
#define IGD_M1_MAX 0 #define PINEVIEW_M1_MAX 0
#define IGD_M2_MIN 0 #define PINEVIEW_M2_MIN 0
#define IGD_M2_MAX 254 #define PINEVIEW_M2_MAX 254
#define I9XX_P_SDVO_DAC_MIN 5 #define I9XX_P_SDVO_DAC_MIN 5
#define I9XX_P_SDVO_DAC_MAX 80 #define I9XX_P_SDVO_DAC_MAX 80
#define I9XX_P_LVDS_MIN 7 #define I9XX_P_LVDS_MIN 7
#define I9XX_P_LVDS_MAX 98 #define I9XX_P_LVDS_MAX 98
#define IGD_P_LVDS_MIN 7 #define PINEVIEW_P_LVDS_MIN 7
#define IGD_P_LVDS_MAX 112 #define PINEVIEW_P_LVDS_MAX 112
#define I9XX_P1_MIN 1 #define I9XX_P1_MIN 1
#define I9XX_P1_MAX 8 #define I9XX_P1_MAX 8
#define I9XX_P2_SDVO_DAC_SLOW 10 #define I9XX_P2_SDVO_DAC_SLOW 10
...@@ -234,33 +234,33 @@ struct intel_limit { ...@@ -234,33 +234,33 @@ struct intel_limit {
#define G4X_P2_DISPLAY_PORT_FAST 10 #define G4X_P2_DISPLAY_PORT_FAST 10
#define G4X_P2_DISPLAY_PORT_LIMIT 0 #define G4X_P2_DISPLAY_PORT_LIMIT 0
/* IGDNG */ /* Ironlake */
/* as we calculate clock using (register_value + 2) for /* as we calculate clock using (register_value + 2) for
N/M1/M2, so here the range value for them is (actual_value-2). N/M1/M2, so here the range value for them is (actual_value-2).
*/ */
#define IGDNG_DOT_MIN 25000 #define IRONLAKE_DOT_MIN 25000
#define IGDNG_DOT_MAX 350000 #define IRONLAKE_DOT_MAX 350000
#define IGDNG_VCO_MIN 1760000 #define IRONLAKE_VCO_MIN 1760000
#define IGDNG_VCO_MAX 3510000 #define IRONLAKE_VCO_MAX 3510000
#define IGDNG_N_MIN 1 #define IRONLAKE_N_MIN 1
#define IGDNG_N_MAX 5 #define IRONLAKE_N_MAX 5
#define IGDNG_M_MIN 79 #define IRONLAKE_M_MIN 79
#define IGDNG_M_MAX 118 #define IRONLAKE_M_MAX 118
#define IGDNG_M1_MIN 12 #define IRONLAKE_M1_MIN 12
#define IGDNG_M1_MAX 23 #define IRONLAKE_M1_MAX 23
#define IGDNG_M2_MIN 5 #define IRONLAKE_M2_MIN 5
#define IGDNG_M2_MAX 9 #define IRONLAKE_M2_MAX 9
#define IGDNG_P_SDVO_DAC_MIN 5 #define IRONLAKE_P_SDVO_DAC_MIN 5
#define IGDNG_P_SDVO_DAC_MAX 80 #define IRONLAKE_P_SDVO_DAC_MAX 80
#define IGDNG_P_LVDS_MIN 28 #define IRONLAKE_P_LVDS_MIN 28
#define IGDNG_P_LVDS_MAX 112 #define IRONLAKE_P_LVDS_MAX 112
#define IGDNG_P1_MIN 1 #define IRONLAKE_P1_MIN 1
#define IGDNG_P1_MAX 8 #define IRONLAKE_P1_MAX 8
#define IGDNG_P2_SDVO_DAC_SLOW 10 #define IRONLAKE_P2_SDVO_DAC_SLOW 10
#define IGDNG_P2_SDVO_DAC_FAST 5 #define IRONLAKE_P2_SDVO_DAC_FAST 5
#define IGDNG_P2_LVDS_SLOW 14 /* single channel */ #define IRONLAKE_P2_LVDS_SLOW 14 /* single channel */
#define IGDNG_P2_LVDS_FAST 7 /* double channel */ #define IRONLAKE_P2_LVDS_FAST 7 /* double channel */
#define IGDNG_P2_DOT_LIMIT 225000 /* 225Mhz */ #define IRONLAKE_P2_DOT_LIMIT 225000 /* 225Mhz */
static bool static bool
intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
...@@ -272,15 +272,15 @@ static bool ...@@ -272,15 +272,15 @@ static bool
intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
int target, int refclk, intel_clock_t *best_clock); int target, int refclk, intel_clock_t *best_clock);
static bool static bool
intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, intel_ironlake_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
int target, int refclk, intel_clock_t *best_clock); int target, int refclk, intel_clock_t *best_clock);
static bool static bool
intel_find_pll_g4x_dp(const intel_limit_t *, struct drm_crtc *crtc, intel_find_pll_g4x_dp(const intel_limit_t *, struct drm_crtc *crtc,
int target, int refclk, intel_clock_t *best_clock); int target, int refclk, intel_clock_t *best_clock);
static bool static bool
intel_find_pll_igdng_dp(const intel_limit_t *, struct drm_crtc *crtc, intel_find_pll_ironlake_dp(const intel_limit_t *, struct drm_crtc *crtc,
int target, int refclk, intel_clock_t *best_clock); int target, int refclk, intel_clock_t *best_clock);
static const intel_limit_t intel_limits_i8xx_dvo = { static const intel_limit_t intel_limits_i8xx_dvo = {
.dot = { .min = I8XX_DOT_MIN, .max = I8XX_DOT_MAX }, .dot = { .min = I8XX_DOT_MIN, .max = I8XX_DOT_MAX },
...@@ -453,13 +453,13 @@ static const intel_limit_t intel_limits_g4x_display_port = { ...@@ -453,13 +453,13 @@ static const intel_limit_t intel_limits_g4x_display_port = {
.find_pll = intel_find_pll_g4x_dp, .find_pll = intel_find_pll_g4x_dp,
}; };
static const intel_limit_t intel_limits_igd_sdvo = { static const intel_limit_t intel_limits_pineview_sdvo = {
.dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX}, .dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX},
.vco = { .min = IGD_VCO_MIN, .max = IGD_VCO_MAX }, .vco = { .min = PINEVIEW_VCO_MIN, .max = PINEVIEW_VCO_MAX },
.n = { .min = IGD_N_MIN, .max = IGD_N_MAX }, .n = { .min = PINEVIEW_N_MIN, .max = PINEVIEW_N_MAX },
.m = { .min = IGD_M_MIN, .max = IGD_M_MAX }, .m = { .min = PINEVIEW_M_MIN, .max = PINEVIEW_M_MAX },
.m1 = { .min = IGD_M1_MIN, .max = IGD_M1_MAX }, .m1 = { .min = PINEVIEW_M1_MIN, .max = PINEVIEW_M1_MAX },
.m2 = { .min = IGD_M2_MIN, .max = IGD_M2_MAX }, .m2 = { .min = PINEVIEW_M2_MIN, .max = PINEVIEW_M2_MAX },
.p = { .min = I9XX_P_SDVO_DAC_MIN, .max = I9XX_P_SDVO_DAC_MAX }, .p = { .min = I9XX_P_SDVO_DAC_MIN, .max = I9XX_P_SDVO_DAC_MAX },
.p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX }, .p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX },
.p2 = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT, .p2 = { .dot_limit = I9XX_P2_SDVO_DAC_SLOW_LIMIT,
...@@ -468,59 +468,59 @@ static const intel_limit_t intel_limits_igd_sdvo = { ...@@ -468,59 +468,59 @@ static const intel_limit_t intel_limits_igd_sdvo = {
.find_reduced_pll = intel_find_best_reduced_PLL, .find_reduced_pll = intel_find_best_reduced_PLL,
}; };
static const intel_limit_t intel_limits_igd_lvds = { static const intel_limit_t intel_limits_pineview_lvds = {
.dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX }, .dot = { .min = I9XX_DOT_MIN, .max = I9XX_DOT_MAX },
.vco = { .min = IGD_VCO_MIN, .max = IGD_VCO_MAX }, .vco = { .min = PINEVIEW_VCO_MIN, .max = PINEVIEW_VCO_MAX },
.n = { .min = IGD_N_MIN, .max = IGD_N_MAX }, .n = { .min = PINEVIEW_N_MIN, .max = PINEVIEW_N_MAX },
.m = { .min = IGD_M_MIN, .max = IGD_M_MAX }, .m = { .min = PINEVIEW_M_MIN, .max = PINEVIEW_M_MAX },
.m1 = { .min = IGD_M1_MIN, .max = IGD_M1_MAX }, .m1 = { .min = PINEVIEW_M1_MIN, .max = PINEVIEW_M1_MAX },
.m2 = { .min = IGD_M2_MIN, .max = IGD_M2_MAX }, .m2 = { .min = PINEVIEW_M2_MIN, .max = PINEVIEW_M2_MAX },
.p = { .min = IGD_P_LVDS_MIN, .max = IGD_P_LVDS_MAX }, .p = { .min = PINEVIEW_P_LVDS_MIN, .max = PINEVIEW_P_LVDS_MAX },
.p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX }, .p1 = { .min = I9XX_P1_MIN, .max = I9XX_P1_MAX },
/* IGD only supports single-channel mode. */ /* Pineview only supports single-channel mode. */
.p2 = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT, .p2 = { .dot_limit = I9XX_P2_LVDS_SLOW_LIMIT,
.p2_slow = I9XX_P2_LVDS_SLOW, .p2_fast = I9XX_P2_LVDS_SLOW }, .p2_slow = I9XX_P2_LVDS_SLOW, .p2_fast = I9XX_P2_LVDS_SLOW },
.find_pll = intel_find_best_PLL, .find_pll = intel_find_best_PLL,
.find_reduced_pll = intel_find_best_reduced_PLL, .find_reduced_pll = intel_find_best_reduced_PLL,
}; };
static const intel_limit_t intel_limits_igdng_sdvo = { static const intel_limit_t intel_limits_ironlake_sdvo = {
.dot = { .min = IGDNG_DOT_MIN, .max = IGDNG_DOT_MAX }, .dot = { .min = IRONLAKE_DOT_MIN, .max = IRONLAKE_DOT_MAX },
.vco = { .min = IGDNG_VCO_MIN, .max = IGDNG_VCO_MAX }, .vco = { .min = IRONLAKE_VCO_MIN, .max = IRONLAKE_VCO_MAX },
.n = { .min = IGDNG_N_MIN, .max = IGDNG_N_MAX }, .n = { .min = IRONLAKE_N_MIN, .max = IRONLAKE_N_MAX },
.m = { .min = IGDNG_M_MIN, .max = IGDNG_M_MAX }, .m = { .min = IRONLAKE_M_MIN, .max = IRONLAKE_M_MAX },
.m1 = { .min = IGDNG_M1_MIN, .max = IGDNG_M1_MAX }, .m1 = { .min = IRONLAKE_M1_MIN, .max = IRONLAKE_M1_MAX },
.m2 = { .min = IGDNG_M2_MIN, .max = IGDNG_M2_MAX }, .m2 = { .min = IRONLAKE_M2_MIN, .max = IRONLAKE_M2_MAX },
.p = { .min = IGDNG_P_SDVO_DAC_MIN, .max = IGDNG_P_SDVO_DAC_MAX }, .p = { .min = IRONLAKE_P_SDVO_DAC_MIN, .max = IRONLAKE_P_SDVO_DAC_MAX },
.p1 = { .min = IGDNG_P1_MIN, .max = IGDNG_P1_MAX }, .p1 = { .min = IRONLAKE_P1_MIN, .max = IRONLAKE_P1_MAX },
.p2 = { .dot_limit = IGDNG_P2_DOT_LIMIT, .p2 = { .dot_limit = IRONLAKE_P2_DOT_LIMIT,
.p2_slow = IGDNG_P2_SDVO_DAC_SLOW, .p2_slow = IRONLAKE_P2_SDVO_DAC_SLOW,
.p2_fast = IGDNG_P2_SDVO_DAC_FAST }, .p2_fast = IRONLAKE_P2_SDVO_DAC_FAST },
.find_pll = intel_igdng_find_best_PLL, .find_pll = intel_ironlake_find_best_PLL,
}; };
static const intel_limit_t intel_limits_igdng_lvds = { static const intel_limit_t intel_limits_ironlake_lvds = {
.dot = { .min = IGDNG_DOT_MIN, .max = IGDNG_DOT_MAX }, .dot = { .min = IRONLAKE_DOT_MIN, .max = IRONLAKE_DOT_MAX },
.vco = { .min = IGDNG_VCO_MIN, .max = IGDNG_VCO_MAX }, .vco = { .min = IRONLAKE_VCO_MIN, .max = IRONLAKE_VCO_MAX },
.n = { .min = IGDNG_N_MIN, .max = IGDNG_N_MAX }, .n = { .min = IRONLAKE_N_MIN, .max = IRONLAKE_N_MAX },
.m = { .min = IGDNG_M_MIN, .max = IGDNG_M_MAX }, .m = { .min = IRONLAKE_M_MIN, .max = IRONLAKE_M_MAX },
.m1 = { .min = IGDNG_M1_MIN, .max = IGDNG_M1_MAX }, .m1 = { .min = IRONLAKE_M1_MIN, .max = IRONLAKE_M1_MAX },
.m2 = { .min = IGDNG_M2_MIN, .max = IGDNG_M2_MAX }, .m2 = { .min = IRONLAKE_M2_MIN, .max = IRONLAKE_M2_MAX },
.p = { .min = IGDNG_P_LVDS_MIN, .max = IGDNG_P_LVDS_MAX }, .p = { .min = IRONLAKE_P_LVDS_MIN, .max = IRONLAKE_P_LVDS_MAX },
.p1 = { .min = IGDNG_P1_MIN, .max = IGDNG_P1_MAX }, .p1 = { .min = IRONLAKE_P1_MIN, .max = IRONLAKE_P1_MAX },
.p2 = { .dot_limit = IGDNG_P2_DOT_LIMIT, .p2 = { .dot_limit = IRONLAKE_P2_DOT_LIMIT,
.p2_slow = IGDNG_P2_LVDS_SLOW, .p2_slow = IRONLAKE_P2_LVDS_SLOW,
.p2_fast = IGDNG_P2_LVDS_FAST }, .p2_fast = IRONLAKE_P2_LVDS_FAST },
.find_pll = intel_igdng_find_best_PLL, .find_pll = intel_ironlake_find_best_PLL,
}; };
static const intel_limit_t *intel_igdng_limit(struct drm_crtc *crtc) static const intel_limit_t *intel_ironlake_limit(struct drm_crtc *crtc)
{ {
const intel_limit_t *limit; const intel_limit_t *limit;
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS))
limit = &intel_limits_igdng_lvds; limit = &intel_limits_ironlake_lvds;
else else
limit = &intel_limits_igdng_sdvo; limit = &intel_limits_ironlake_sdvo;
return limit; return limit;
} }
...@@ -557,20 +557,20 @@ static const intel_limit_t *intel_limit(struct drm_crtc *crtc) ...@@ -557,20 +557,20 @@ static const intel_limit_t *intel_limit(struct drm_crtc *crtc)
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
const intel_limit_t *limit; const intel_limit_t *limit;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
limit = intel_igdng_limit(crtc); limit = intel_ironlake_limit(crtc);
else if (IS_G4X(dev)) { else if (IS_G4X(dev)) {
limit = intel_g4x_limit(crtc); limit = intel_g4x_limit(crtc);
} else if (IS_I9XX(dev) && !IS_IGD(dev)) { } else if (IS_I9XX(dev) && !IS_PINEVIEW(dev)) {
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS))
limit = &intel_limits_i9xx_lvds; limit = &intel_limits_i9xx_lvds;
else else
limit = &intel_limits_i9xx_sdvo; limit = &intel_limits_i9xx_sdvo;
} else if (IS_IGD(dev)) { } else if (IS_PINEVIEW(dev)) {
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS))
limit = &intel_limits_igd_lvds; limit = &intel_limits_pineview_lvds;
else else
limit = &intel_limits_igd_sdvo; limit = &intel_limits_pineview_sdvo;
} else { } else {
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS))
limit = &intel_limits_i8xx_lvds; limit = &intel_limits_i8xx_lvds;
...@@ -580,8 +580,8 @@ static const intel_limit_t *intel_limit(struct drm_crtc *crtc) ...@@ -580,8 +580,8 @@ static const intel_limit_t *intel_limit(struct drm_crtc *crtc)
return limit; return limit;
} }
/* m1 is reserved as 0 in IGD, n is a ring counter */ /* m1 is reserved as 0 in Pineview, n is a ring counter */
static void igd_clock(int refclk, intel_clock_t *clock) static void pineview_clock(int refclk, intel_clock_t *clock)
{ {
clock->m = clock->m2 + 2; clock->m = clock->m2 + 2;
clock->p = clock->p1 * clock->p2; clock->p = clock->p1 * clock->p2;
...@@ -591,8 +591,8 @@ static void igd_clock(int refclk, intel_clock_t *clock) ...@@ -591,8 +591,8 @@ static void igd_clock(int refclk, intel_clock_t *clock)
static void intel_clock(struct drm_device *dev, int refclk, intel_clock_t *clock) static void intel_clock(struct drm_device *dev, int refclk, intel_clock_t *clock)
{ {
if (IS_IGD(dev)) { if (IS_PINEVIEW(dev)) {
igd_clock(refclk, clock); pineview_clock(refclk, clock);
return; return;
} }
clock->m = 5 * (clock->m1 + 2) + (clock->m2 + 2); clock->m = 5 * (clock->m1 + 2) + (clock->m2 + 2);
...@@ -657,7 +657,7 @@ static bool intel_PLL_is_valid(struct drm_crtc *crtc, intel_clock_t *clock) ...@@ -657,7 +657,7 @@ static bool intel_PLL_is_valid(struct drm_crtc *crtc, intel_clock_t *clock)
INTELPllInvalid ("m2 out of range\n"); INTELPllInvalid ("m2 out of range\n");
if (clock->m1 < limit->m1.min || limit->m1.max < clock->m1) if (clock->m1 < limit->m1.min || limit->m1.max < clock->m1)
INTELPllInvalid ("m1 out of range\n"); INTELPllInvalid ("m1 out of range\n");
if (clock->m1 <= clock->m2 && !IS_IGD(dev)) if (clock->m1 <= clock->m2 && !IS_PINEVIEW(dev))
INTELPllInvalid ("m1 <= m2\n"); INTELPllInvalid ("m1 <= m2\n");
if (clock->m < limit->m.min || limit->m.max < clock->m) if (clock->m < limit->m.min || limit->m.max < clock->m)
INTELPllInvalid ("m out of range\n"); INTELPllInvalid ("m out of range\n");
...@@ -710,8 +710,8 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, ...@@ -710,8 +710,8 @@ intel_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
clock.m1++) { clock.m1++) {
for (clock.m2 = limit->m2.min; for (clock.m2 = limit->m2.min;
clock.m2 <= limit->m2.max; clock.m2++) { clock.m2 <= limit->m2.max; clock.m2++) {
/* m1 is always 0 in IGD */ /* m1 is always 0 in Pineview */
if (clock.m2 >= clock.m1 && !IS_IGD(dev)) if (clock.m2 >= clock.m1 && !IS_PINEVIEW(dev))
break; break;
for (clock.n = limit->n.min; for (clock.n = limit->n.min;
clock.n <= limit->n.max; clock.n++) { clock.n <= limit->n.max; clock.n++) {
...@@ -752,8 +752,8 @@ intel_find_best_reduced_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, ...@@ -752,8 +752,8 @@ intel_find_best_reduced_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) { for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) {
for (clock.m2 = limit->m2.min; clock.m2 <= limit->m2.max; clock.m2++) { for (clock.m2 = limit->m2.min; clock.m2 <= limit->m2.max; clock.m2++) {
/* m1 is always 0 in IGD */ /* m1 is always 0 in Pineview */
if (clock.m2 >= clock.m1 && !IS_IGD(dev)) if (clock.m2 >= clock.m1 && !IS_PINEVIEW(dev))
break; break;
for (clock.n = limit->n.min; clock.n <= limit->n.max; for (clock.n = limit->n.min; clock.n <= limit->n.max;
clock.n++) { clock.n++) {
...@@ -834,8 +834,8 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, ...@@ -834,8 +834,8 @@ intel_g4x_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
} }
static bool static bool
intel_find_pll_igdng_dp(const intel_limit_t *limit, struct drm_crtc *crtc, intel_find_pll_ironlake_dp(const intel_limit_t *limit, struct drm_crtc *crtc,
int target, int refclk, intel_clock_t *best_clock) int target, int refclk, intel_clock_t *best_clock)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
intel_clock_t clock; intel_clock_t clock;
...@@ -858,8 +858,8 @@ intel_find_pll_igdng_dp(const intel_limit_t *limit, struct drm_crtc *crtc, ...@@ -858,8 +858,8 @@ intel_find_pll_igdng_dp(const intel_limit_t *limit, struct drm_crtc *crtc,
} }
static bool static bool
intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, intel_ironlake_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
int target, int refclk, intel_clock_t *best_clock) int target, int refclk, intel_clock_t *best_clock)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -872,7 +872,7 @@ intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc, ...@@ -872,7 +872,7 @@ intel_igdng_find_best_PLL(const intel_limit_t *limit, struct drm_crtc *crtc,
return true; return true;
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT)) if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT))
return intel_find_pll_igdng_dp(limit, crtc, target, return intel_find_pll_ironlake_dp(limit, crtc, target,
refclk, best_clock); refclk, best_clock);
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) { if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) {
...@@ -1322,7 +1322,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, ...@@ -1322,7 +1322,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
dspcntr &= ~DISPPLANE_TILED; dspcntr &= ~DISPPLANE_TILED;
} }
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
/* must disable */ /* must disable */
dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE; dspcntr |= DISPPLANE_TRICKLE_FEED_DISABLE;
...@@ -1383,7 +1383,7 @@ static void i915_disable_vga (struct drm_device *dev) ...@@ -1383,7 +1383,7 @@ static void i915_disable_vga (struct drm_device *dev)
u8 sr1; u8 sr1;
u32 vga_reg; u32 vga_reg;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
vga_reg = CPU_VGACNTRL; vga_reg = CPU_VGACNTRL;
else else
vga_reg = VGACNTRL; vga_reg = VGACNTRL;
...@@ -1399,7 +1399,7 @@ static void i915_disable_vga (struct drm_device *dev) ...@@ -1399,7 +1399,7 @@ static void i915_disable_vga (struct drm_device *dev)
I915_WRITE(vga_reg, VGA_DISP_DISABLE); I915_WRITE(vga_reg, VGA_DISP_DISABLE);
} }
static void igdng_disable_pll_edp (struct drm_crtc *crtc) static void ironlake_disable_pll_edp (struct drm_crtc *crtc)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -1411,7 +1411,7 @@ static void igdng_disable_pll_edp (struct drm_crtc *crtc) ...@@ -1411,7 +1411,7 @@ static void igdng_disable_pll_edp (struct drm_crtc *crtc)
I915_WRITE(DP_A, dpa_ctl); I915_WRITE(DP_A, dpa_ctl);
} }
static void igdng_enable_pll_edp (struct drm_crtc *crtc) static void ironlake_enable_pll_edp (struct drm_crtc *crtc)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -1424,7 +1424,7 @@ static void igdng_enable_pll_edp (struct drm_crtc *crtc) ...@@ -1424,7 +1424,7 @@ static void igdng_enable_pll_edp (struct drm_crtc *crtc)
} }
static void igdng_set_pll_edp (struct drm_crtc *crtc, int clock) static void ironlake_set_pll_edp (struct drm_crtc *crtc, int clock)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -1460,7 +1460,7 @@ static void igdng_set_pll_edp (struct drm_crtc *crtc, int clock) ...@@ -1460,7 +1460,7 @@ static void igdng_set_pll_edp (struct drm_crtc *crtc, int clock)
udelay(500); udelay(500);
} }
static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -1513,7 +1513,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) ...@@ -1513,7 +1513,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
if (HAS_eDP) { if (HAS_eDP) {
/* enable eDP PLL */ /* enable eDP PLL */
igdng_enable_pll_edp(crtc); ironlake_enable_pll_edp(crtc);
} else { } else {
/* enable PCH DPLL */ /* enable PCH DPLL */
temp = I915_READ(pch_dpll_reg); temp = I915_READ(pch_dpll_reg);
...@@ -1530,7 +1530,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) ...@@ -1530,7 +1530,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
I915_READ(fdi_rx_reg); I915_READ(fdi_rx_reg);
udelay(200); udelay(200);
/* Enable CPU FDI TX PLL, always on for IGDNG */ /* Enable CPU FDI TX PLL, always on for Ironlake */
temp = I915_READ(fdi_tx_reg); temp = I915_READ(fdi_tx_reg);
if ((temp & FDI_TX_PLL_ENABLE) == 0) { if ((temp & FDI_TX_PLL_ENABLE) == 0) {
I915_WRITE(fdi_tx_reg, temp | FDI_TX_PLL_ENABLE); I915_WRITE(fdi_tx_reg, temp | FDI_TX_PLL_ENABLE);
...@@ -1800,7 +1800,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode) ...@@ -1800,7 +1800,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
} }
if (HAS_eDP) { if (HAS_eDP) {
igdng_disable_pll_edp(crtc); ironlake_disable_pll_edp(crtc);
} }
temp = I915_READ(fdi_rx_reg); temp = I915_READ(fdi_rx_reg);
...@@ -2042,7 +2042,7 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc, ...@@ -2042,7 +2042,7 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc,
struct drm_display_mode *adjusted_mode) struct drm_display_mode *adjusted_mode)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
/* FDI link clock is fixed at 2.7G */ /* FDI link clock is fixed at 2.7G */
if (mode->clock * 3 > 27000 * 4) if (mode->clock * 3 > 27000 * 4)
return MODE_CLOCK_HIGH; return MODE_CLOCK_HIGH;
...@@ -2162,9 +2162,8 @@ fdi_reduce_ratio(u32 *num, u32 *den) ...@@ -2162,9 +2162,8 @@ fdi_reduce_ratio(u32 *num, u32 *den)
#define LINK_N 0x80000 #define LINK_N 0x80000
static void static void
igdng_compute_m_n(int bits_per_pixel, int nlanes, ironlake_compute_m_n(int bits_per_pixel, int nlanes, int pixel_clock,
int pixel_clock, int link_clock, int link_clock, struct fdi_m_n *m_n)
struct fdi_m_n *m_n)
{ {
u64 temp; u64 temp;
...@@ -2192,34 +2191,34 @@ struct intel_watermark_params { ...@@ -2192,34 +2191,34 @@ struct intel_watermark_params {
unsigned long cacheline_size; unsigned long cacheline_size;
}; };
/* IGD has different values for various configs */ /* Pineview has different values for various configs */
static struct intel_watermark_params igd_display_wm = { static struct intel_watermark_params pineview_display_wm = {
IGD_DISPLAY_FIFO, PINEVIEW_DISPLAY_FIFO,
IGD_MAX_WM, PINEVIEW_MAX_WM,
IGD_DFT_WM, PINEVIEW_DFT_WM,
IGD_GUARD_WM, PINEVIEW_GUARD_WM,
IGD_FIFO_LINE_SIZE PINEVIEW_FIFO_LINE_SIZE
}; };
static struct intel_watermark_params igd_display_hplloff_wm = { static struct intel_watermark_params pineview_display_hplloff_wm = {
IGD_DISPLAY_FIFO, PINEVIEW_DISPLAY_FIFO,
IGD_MAX_WM, PINEVIEW_MAX_WM,
IGD_DFT_HPLLOFF_WM, PINEVIEW_DFT_HPLLOFF_WM,
IGD_GUARD_WM, PINEVIEW_GUARD_WM,
IGD_FIFO_LINE_SIZE PINEVIEW_FIFO_LINE_SIZE
}; };
static struct intel_watermark_params igd_cursor_wm = { static struct intel_watermark_params pineview_cursor_wm = {
IGD_CURSOR_FIFO, PINEVIEW_CURSOR_FIFO,
IGD_CURSOR_MAX_WM, PINEVIEW_CURSOR_MAX_WM,
IGD_CURSOR_DFT_WM, PINEVIEW_CURSOR_DFT_WM,
IGD_CURSOR_GUARD_WM, PINEVIEW_CURSOR_GUARD_WM,
IGD_FIFO_LINE_SIZE, PINEVIEW_FIFO_LINE_SIZE,
}; };
static struct intel_watermark_params igd_cursor_hplloff_wm = { static struct intel_watermark_params pineview_cursor_hplloff_wm = {
IGD_CURSOR_FIFO, PINEVIEW_CURSOR_FIFO,
IGD_CURSOR_MAX_WM, PINEVIEW_CURSOR_MAX_WM,
IGD_CURSOR_DFT_WM, PINEVIEW_CURSOR_DFT_WM,
IGD_CURSOR_GUARD_WM, PINEVIEW_CURSOR_GUARD_WM,
IGD_FIFO_LINE_SIZE PINEVIEW_FIFO_LINE_SIZE
}; };
static struct intel_watermark_params g4x_wm_info = { static struct intel_watermark_params g4x_wm_info = {
G4X_FIFO_SIZE, G4X_FIFO_SIZE,
...@@ -2363,36 +2362,36 @@ static struct cxsr_latency *intel_get_cxsr_latency(int is_desktop, int fsb, ...@@ -2363,36 +2362,36 @@ static struct cxsr_latency *intel_get_cxsr_latency(int is_desktop, int fsb,
return NULL; return NULL;
} }
static void igd_disable_cxsr(struct drm_device *dev) static void pineview_disable_cxsr(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg; u32 reg;
/* deactivate cxsr */ /* deactivate cxsr */
reg = I915_READ(DSPFW3); reg = I915_READ(DSPFW3);
reg &= ~(IGD_SELF_REFRESH_EN); reg &= ~(PINEVIEW_SELF_REFRESH_EN);
I915_WRITE(DSPFW3, reg); I915_WRITE(DSPFW3, reg);
DRM_INFO("Big FIFO is disabled\n"); DRM_INFO("Big FIFO is disabled\n");
} }
static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, static void pineview_enable_cxsr(struct drm_device *dev, unsigned long clock,
int pixel_size) int pixel_size)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg; u32 reg;
unsigned long wm; unsigned long wm;
struct cxsr_latency *latency; struct cxsr_latency *latency;
latency = intel_get_cxsr_latency(IS_IGDG(dev), dev_priv->fsb_freq, latency = intel_get_cxsr_latency(IS_PINEVIEW_G(dev), dev_priv->fsb_freq,
dev_priv->mem_freq); dev_priv->mem_freq);
if (!latency) { if (!latency) {
DRM_DEBUG_KMS("Unknown FSB/MEM found, disable CxSR\n"); DRM_DEBUG_KMS("Unknown FSB/MEM found, disable CxSR\n");
igd_disable_cxsr(dev); pineview_disable_cxsr(dev);
return; return;
} }
/* Display SR */ /* Display SR */
wm = intel_calculate_wm(clock, &igd_display_wm, pixel_size, wm = intel_calculate_wm(clock, &pineview_display_wm, pixel_size,
latency->display_sr); latency->display_sr);
reg = I915_READ(DSPFW1); reg = I915_READ(DSPFW1);
reg &= 0x7fffff; reg &= 0x7fffff;
...@@ -2401,7 +2400,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, ...@@ -2401,7 +2400,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock,
DRM_DEBUG_KMS("DSPFW1 register is %x\n", reg); DRM_DEBUG_KMS("DSPFW1 register is %x\n", reg);
/* cursor SR */ /* cursor SR */
wm = intel_calculate_wm(clock, &igd_cursor_wm, pixel_size, wm = intel_calculate_wm(clock, &pineview_cursor_wm, pixel_size,
latency->cursor_sr); latency->cursor_sr);
reg = I915_READ(DSPFW3); reg = I915_READ(DSPFW3);
reg &= ~(0x3f << 24); reg &= ~(0x3f << 24);
...@@ -2409,7 +2408,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, ...@@ -2409,7 +2408,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock,
I915_WRITE(DSPFW3, reg); I915_WRITE(DSPFW3, reg);
/* Display HPLL off SR */ /* Display HPLL off SR */
wm = intel_calculate_wm(clock, &igd_display_hplloff_wm, wm = intel_calculate_wm(clock, &pineview_display_hplloff_wm,
latency->display_hpll_disable, I915_FIFO_LINE_SIZE); latency->display_hpll_disable, I915_FIFO_LINE_SIZE);
reg = I915_READ(DSPFW3); reg = I915_READ(DSPFW3);
reg &= 0xfffffe00; reg &= 0xfffffe00;
...@@ -2417,7 +2416,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, ...@@ -2417,7 +2416,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock,
I915_WRITE(DSPFW3, reg); I915_WRITE(DSPFW3, reg);
/* cursor HPLL off SR */ /* cursor HPLL off SR */
wm = intel_calculate_wm(clock, &igd_cursor_hplloff_wm, pixel_size, wm = intel_calculate_wm(clock, &pineview_cursor_hplloff_wm, pixel_size,
latency->cursor_hpll_disable); latency->cursor_hpll_disable);
reg = I915_READ(DSPFW3); reg = I915_READ(DSPFW3);
reg &= ~(0x3f << 16); reg &= ~(0x3f << 16);
...@@ -2427,7 +2426,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock, ...@@ -2427,7 +2426,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock,
/* activate cxsr */ /* activate cxsr */
reg = I915_READ(DSPFW3); reg = I915_READ(DSPFW3);
reg |= IGD_SELF_REFRESH_EN; reg |= PINEVIEW_SELF_REFRESH_EN;
I915_WRITE(DSPFW3, reg); I915_WRITE(DSPFW3, reg);
DRM_INFO("Big FIFO is enabled\n"); DRM_INFO("Big FIFO is enabled\n");
...@@ -2786,10 +2785,10 @@ static void intel_update_watermarks(struct drm_device *dev) ...@@ -2786,10 +2785,10 @@ static void intel_update_watermarks(struct drm_device *dev)
return; return;
/* Single plane configs can enable self refresh */ /* Single plane configs can enable self refresh */
if (enabled == 1 && IS_IGD(dev)) if (enabled == 1 && IS_PINEVIEW(dev))
igd_enable_cxsr(dev, sr_clock, pixel_size); pineview_enable_cxsr(dev, sr_clock, pixel_size);
else if (IS_IGD(dev)) else if (IS_PINEVIEW(dev))
igd_disable_cxsr(dev); pineview_disable_cxsr(dev);
dev_priv->display.update_wm(dev, planea_clock, planeb_clock, dev_priv->display.update_wm(dev, planea_clock, planeb_clock,
sr_hdisplay, pixel_size); sr_hdisplay, pixel_size);
...@@ -2887,7 +2886,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -2887,7 +2886,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
refclk / 1000); refclk / 1000);
} else if (IS_I9XX(dev)) { } else if (IS_I9XX(dev)) {
refclk = 96000; refclk = 96000;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
refclk = 120000; /* 120Mhz refclk */ refclk = 120000; /* 120Mhz refclk */
} else { } else {
refclk = 48000; refclk = 48000;
...@@ -2947,7 +2946,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -2947,7 +2946,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
} }
/* FDI link */ /* FDI link */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
int lane, link_bw, bpp; int lane, link_bw, bpp;
/* eDP doesn't require FDI link, so just set DP M/N /* eDP doesn't require FDI link, so just set DP M/N
according to current link config */ according to current link config */
...@@ -2989,8 +2988,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -2989,8 +2988,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
bpp = 24; bpp = 24;
} }
igdng_compute_m_n(bpp, lane, target_clock, ironlake_compute_m_n(bpp, lane, target_clock, link_bw, &m_n);
link_bw, &m_n);
} }
/* Ironlake: try to setup display ref clock before DPLL /* Ironlake: try to setup display ref clock before DPLL
...@@ -2998,7 +2996,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -2998,7 +2996,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
* PCH B stepping, previous chipset stepping should be * PCH B stepping, previous chipset stepping should be
* ignoring this setting. * ignoring this setting.
*/ */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
temp = I915_READ(PCH_DREF_CONTROL); temp = I915_READ(PCH_DREF_CONTROL);
/* Always enable nonspread source */ /* Always enable nonspread source */
temp &= ~DREF_NONSPREAD_SOURCE_MASK; temp &= ~DREF_NONSPREAD_SOURCE_MASK;
...@@ -3033,7 +3031,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3033,7 +3031,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
} }
} }
if (IS_IGD(dev)) { if (IS_PINEVIEW(dev)) {
fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2; fp = (1 << clock.n) << 16 | clock.m1 << 8 | clock.m2;
if (has_reduced_clock) if (has_reduced_clock)
fp2 = (1 << reduced_clock.n) << 16 | fp2 = (1 << reduced_clock.n) << 16 |
...@@ -3045,7 +3043,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3045,7 +3043,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
reduced_clock.m2; reduced_clock.m2;
} }
if (!IS_IGDNG(dev)) if (!IS_IRONLAKE(dev))
dpll = DPLL_VGA_MODE_DIS; dpll = DPLL_VGA_MODE_DIS;
if (IS_I9XX(dev)) { if (IS_I9XX(dev)) {
...@@ -3058,19 +3056,19 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3058,19 +3056,19 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
sdvo_pixel_multiply = adjusted_mode->clock / mode->clock; sdvo_pixel_multiply = adjusted_mode->clock / mode->clock;
if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))
dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES; dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES;
else if (IS_IGDNG(dev)) else if (IS_IRONLAKE(dev))
dpll |= (sdvo_pixel_multiply - 1) << PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT; dpll |= (sdvo_pixel_multiply - 1) << PLL_REF_SDVO_HDMI_MULTIPLIER_SHIFT;
} }
if (is_dp) if (is_dp)
dpll |= DPLL_DVO_HIGH_SPEED; dpll |= DPLL_DVO_HIGH_SPEED;
/* compute bitmask from p1 value */ /* compute bitmask from p1 value */
if (IS_IGD(dev)) if (IS_PINEVIEW(dev))
dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT_IGD; dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT_PINEVIEW;
else { else {
dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT; dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT;
/* also FPA1 */ /* also FPA1 */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT; dpll |= (1 << (clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT;
if (IS_G4X(dev) && has_reduced_clock) if (IS_G4X(dev) && has_reduced_clock)
dpll |= (1 << (reduced_clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT; dpll |= (1 << (reduced_clock.p1 - 1)) << DPLL_FPA1_P1_POST_DIV_SHIFT;
...@@ -3089,7 +3087,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3089,7 +3087,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
dpll |= DPLLB_LVDS_P2_CLOCK_DIV_14; dpll |= DPLLB_LVDS_P2_CLOCK_DIV_14;
break; break;
} }
if (IS_I965G(dev) && !IS_IGDNG(dev)) if (IS_I965G(dev) && !IS_IRONLAKE(dev))
dpll |= (6 << PLL_LOAD_PULSE_PHASE_SHIFT); dpll |= (6 << PLL_LOAD_PULSE_PHASE_SHIFT);
} else { } else {
if (is_lvds) { if (is_lvds) {
...@@ -3121,9 +3119,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3121,9 +3119,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
/* Set up the display plane register */ /* Set up the display plane register */
dspcntr = DISPPLANE_GAMMA_ENABLE; dspcntr = DISPPLANE_GAMMA_ENABLE;
/* IGDNG's plane is forced to pipe, bit 24 is to /* Ironlake's plane is forced to pipe, bit 24 is to
enable color space conversion */ enable color space conversion */
if (!IS_IGDNG(dev)) { if (!IS_IRONLAKE(dev)) {
if (pipe == 0) if (pipe == 0)
dspcntr &= ~DISPPLANE_SEL_PIPE_MASK; dspcntr &= ~DISPPLANE_SEL_PIPE_MASK;
else else
...@@ -3150,20 +3148,20 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3150,20 +3148,20 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
/* Disable the panel fitter if it was on our pipe */ /* Disable the panel fitter if it was on our pipe */
if (!IS_IGDNG(dev) && intel_panel_fitter_pipe(dev) == pipe) if (!IS_IRONLAKE(dev) && intel_panel_fitter_pipe(dev) == pipe)
I915_WRITE(PFIT_CONTROL, 0); I915_WRITE(PFIT_CONTROL, 0);
DRM_DEBUG_KMS("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B'); DRM_DEBUG_KMS("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B');
drm_mode_debug_printmodeline(mode); drm_mode_debug_printmodeline(mode);
/* assign to IGDNG registers */ /* assign to Ironlake registers */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
fp_reg = pch_fp_reg; fp_reg = pch_fp_reg;
dpll_reg = pch_dpll_reg; dpll_reg = pch_dpll_reg;
} }
if (is_edp) { if (is_edp) {
igdng_disable_pll_edp(crtc); ironlake_disable_pll_edp(crtc);
} else if ((dpll & DPLL_VCO_ENABLE)) { } else if ((dpll & DPLL_VCO_ENABLE)) {
I915_WRITE(fp_reg, fp); I915_WRITE(fp_reg, fp);
I915_WRITE(dpll_reg, dpll & ~DPLL_VCO_ENABLE); I915_WRITE(dpll_reg, dpll & ~DPLL_VCO_ENABLE);
...@@ -3178,7 +3176,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3178,7 +3176,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
if (is_lvds) { if (is_lvds) {
u32 lvds; u32 lvds;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
lvds_reg = PCH_LVDS; lvds_reg = PCH_LVDS;
lvds = I915_READ(lvds_reg); lvds = I915_READ(lvds_reg);
...@@ -3211,7 +3209,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3211,7 +3209,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
/* Wait for the clocks to stabilize. */ /* Wait for the clocks to stabilize. */
udelay(150); udelay(150);
if (IS_I965G(dev) && !IS_IGDNG(dev)) { if (IS_I965G(dev) && !IS_IRONLAKE(dev)) {
if (is_sdvo) { if (is_sdvo) {
sdvo_pixel_multiply = adjusted_mode->clock / mode->clock; sdvo_pixel_multiply = adjusted_mode->clock / mode->clock;
I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) | I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) |
...@@ -3258,21 +3256,21 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3258,21 +3256,21 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
/* pipesrc and dspsize control the size that is scaled from, which should /* pipesrc and dspsize control the size that is scaled from, which should
* always be the user's requested size. * always be the user's requested size.
*/ */
if (!IS_IGDNG(dev)) { if (!IS_IRONLAKE(dev)) {
I915_WRITE(dspsize_reg, ((mode->vdisplay - 1) << 16) | I915_WRITE(dspsize_reg, ((mode->vdisplay - 1) << 16) |
(mode->hdisplay - 1)); (mode->hdisplay - 1));
I915_WRITE(dsppos_reg, 0); I915_WRITE(dsppos_reg, 0);
} }
I915_WRITE(pipesrc_reg, ((mode->hdisplay - 1) << 16) | (mode->vdisplay - 1)); I915_WRITE(pipesrc_reg, ((mode->hdisplay - 1) << 16) | (mode->vdisplay - 1));
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(data_m1_reg, TU_SIZE(m_n.tu) | m_n.gmch_m); I915_WRITE(data_m1_reg, TU_SIZE(m_n.tu) | m_n.gmch_m);
I915_WRITE(data_n1_reg, TU_SIZE(m_n.tu) | m_n.gmch_n); I915_WRITE(data_n1_reg, TU_SIZE(m_n.tu) | m_n.gmch_n);
I915_WRITE(link_m1_reg, m_n.link_m); I915_WRITE(link_m1_reg, m_n.link_m);
I915_WRITE(link_n1_reg, m_n.link_n); I915_WRITE(link_n1_reg, m_n.link_n);
if (is_edp) { if (is_edp) {
igdng_set_pll_edp(crtc, adjusted_mode->clock); ironlake_set_pll_edp(crtc, adjusted_mode->clock);
} else { } else {
/* enable FDI RX PLL too */ /* enable FDI RX PLL too */
temp = I915_READ(fdi_rx_reg); temp = I915_READ(fdi_rx_reg);
...@@ -3286,7 +3284,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc, ...@@ -3286,7 +3284,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
intel_wait_for_vblank(dev); intel_wait_for_vblank(dev);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
/* enable address swizzle for tiling buffer */ /* enable address swizzle for tiling buffer */
temp = I915_READ(DISP_ARB_CTL); temp = I915_READ(DISP_ARB_CTL);
I915_WRITE(DISP_ARB_CTL, temp | DISP_TILE_SURFACE_SWIZZLING); I915_WRITE(DISP_ARB_CTL, temp | DISP_TILE_SURFACE_SWIZZLING);
...@@ -3320,8 +3318,8 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) ...@@ -3320,8 +3318,8 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)
if (!crtc->enabled) if (!crtc->enabled)
return; return;
/* use legacy palette for IGDNG */ /* use legacy palette for Ironlake */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
palreg = (intel_crtc->pipe == 0) ? LGC_PALETTE_A : palreg = (intel_crtc->pipe == 0) ? LGC_PALETTE_A :
LGC_PALETTE_B; LGC_PALETTE_B;
...@@ -3662,18 +3660,18 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc) ...@@ -3662,18 +3660,18 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc)
fp = I915_READ((pipe == 0) ? FPA1 : FPB1); fp = I915_READ((pipe == 0) ? FPA1 : FPB1);
clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT; clock.m1 = (fp & FP_M1_DIV_MASK) >> FP_M1_DIV_SHIFT;
if (IS_IGD(dev)) { if (IS_PINEVIEW(dev)) {
clock.n = ffs((fp & FP_N_IGD_DIV_MASK) >> FP_N_DIV_SHIFT) - 1; clock.n = ffs((fp & FP_N_PINEVIEW_DIV_MASK) >> FP_N_DIV_SHIFT) - 1;
clock.m2 = (fp & FP_M2_IGD_DIV_MASK) >> FP_M2_DIV_SHIFT; clock.m2 = (fp & FP_M2_PINEVIEW_DIV_MASK) >> FP_M2_DIV_SHIFT;
} else { } else {
clock.n = (fp & FP_N_DIV_MASK) >> FP_N_DIV_SHIFT; clock.n = (fp & FP_N_DIV_MASK) >> FP_N_DIV_SHIFT;
clock.m2 = (fp & FP_M2_DIV_MASK) >> FP_M2_DIV_SHIFT; clock.m2 = (fp & FP_M2_DIV_MASK) >> FP_M2_DIV_SHIFT;
} }
if (IS_I9XX(dev)) { if (IS_I9XX(dev)) {
if (IS_IGD(dev)) if (IS_PINEVIEW(dev))
clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_IGD) >> clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW) >>
DPLL_FPA01_P1_POST_DIV_SHIFT_IGD); DPLL_FPA01_P1_POST_DIV_SHIFT_PINEVIEW);
else else
clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK) >> clock.p1 = ffs((dpll & DPLL_FPA01_P1_POST_DIV_MASK) >>
DPLL_FPA01_P1_POST_DIV_SHIFT); DPLL_FPA01_P1_POST_DIV_SHIFT);
...@@ -3785,7 +3783,7 @@ void intel_increase_renderclock(struct drm_device *dev, bool schedule) ...@@ -3785,7 +3783,7 @@ void intel_increase_renderclock(struct drm_device *dev, bool schedule)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return; return;
if (!dev_priv->render_reclock_avail) { if (!dev_priv->render_reclock_avail) {
...@@ -3810,7 +3808,7 @@ void intel_decrease_renderclock(struct drm_device *dev) ...@@ -3810,7 +3808,7 @@ void intel_decrease_renderclock(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return; return;
if (!dev_priv->render_reclock_avail) { if (!dev_priv->render_reclock_avail) {
...@@ -3882,7 +3880,7 @@ void intel_decrease_renderclock(struct drm_device *dev) ...@@ -3882,7 +3880,7 @@ void intel_decrease_renderclock(struct drm_device *dev)
*/ */
void intel_decrease_displayclock(struct drm_device *dev) void intel_decrease_displayclock(struct drm_device *dev)
{ {
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return; return;
if (IS_I945G(dev) || IS_I945GM(dev) || IS_I915G(dev) || if (IS_I945G(dev) || IS_I945GM(dev) || IS_I915G(dev) ||
...@@ -3924,7 +3922,7 @@ static void intel_increase_pllclock(struct drm_crtc *crtc, bool schedule) ...@@ -3924,7 +3922,7 @@ static void intel_increase_pllclock(struct drm_crtc *crtc, bool schedule)
int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B; int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B;
int dpll = I915_READ(dpll_reg); int dpll = I915_READ(dpll_reg);
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return; return;
if (!dev_priv->lvds_downclock_avail) if (!dev_priv->lvds_downclock_avail)
...@@ -3963,7 +3961,7 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc) ...@@ -3963,7 +3961,7 @@ static void intel_decrease_pllclock(struct drm_crtc *crtc)
int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B; int dpll_reg = (pipe == 0) ? DPLL_A : DPLL_B;
int dpll = I915_READ(dpll_reg); int dpll = I915_READ(dpll_reg);
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return; return;
if (!dev_priv->lvds_downclock_avail) if (!dev_priv->lvds_downclock_avail)
...@@ -4370,7 +4368,7 @@ static void intel_setup_outputs(struct drm_device *dev) ...@@ -4370,7 +4368,7 @@ static void intel_setup_outputs(struct drm_device *dev)
if (IS_MOBILE(dev) && !IS_I830(dev)) if (IS_MOBILE(dev) && !IS_I830(dev))
intel_lvds_init(dev); intel_lvds_init(dev);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
int found; int found;
if (IS_MOBILE(dev) && (I915_READ(DP_A) & DP_DETECTED)) if (IS_MOBILE(dev) && (I915_READ(DP_A) & DP_DETECTED))
...@@ -4537,7 +4535,7 @@ void intel_init_clock_gating(struct drm_device *dev) ...@@ -4537,7 +4535,7 @@ void intel_init_clock_gating(struct drm_device *dev)
* Disable clock gating reported to work incorrectly according to the * Disable clock gating reported to work incorrectly according to the
* specs, but enable as much else as we can. * specs, but enable as much else as we can.
*/ */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
return; return;
} else if (IS_G4X(dev)) { } else if (IS_G4X(dev)) {
uint32_t dspclk_gate; uint32_t dspclk_gate;
...@@ -4620,8 +4618,8 @@ static void intel_init_display(struct drm_device *dev) ...@@ -4620,8 +4618,8 @@ static void intel_init_display(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
/* We always want a DPMS function */ /* We always want a DPMS function */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
dev_priv->display.dpms = igdng_crtc_dpms; dev_priv->display.dpms = ironlake_crtc_dpms;
else else
dev_priv->display.dpms = i9xx_crtc_dpms; dev_priv->display.dpms = i9xx_crtc_dpms;
...@@ -4640,13 +4638,13 @@ static void intel_init_display(struct drm_device *dev) ...@@ -4640,13 +4638,13 @@ static void intel_init_display(struct drm_device *dev)
} }
/* Returns the core display clock speed */ /* Returns the core display clock speed */
if (IS_I945G(dev) || (IS_G33(dev) && ! IS_IGDGM(dev))) if (IS_I945G(dev) || (IS_G33(dev) && ! IS_PINEVIEW_M(dev)))
dev_priv->display.get_display_clock_speed = dev_priv->display.get_display_clock_speed =
i945_get_display_clock_speed; i945_get_display_clock_speed;
else if (IS_I915G(dev)) else if (IS_I915G(dev))
dev_priv->display.get_display_clock_speed = dev_priv->display.get_display_clock_speed =
i915_get_display_clock_speed; i915_get_display_clock_speed;
else if (IS_I945GM(dev) || IS_845G(dev) || IS_IGDGM(dev)) else if (IS_I945GM(dev) || IS_845G(dev) || IS_PINEVIEW_M(dev))
dev_priv->display.get_display_clock_speed = dev_priv->display.get_display_clock_speed =
i9xx_misc_get_display_clock_speed; i9xx_misc_get_display_clock_speed;
else if (IS_I915GM(dev)) else if (IS_I915GM(dev))
...@@ -4663,7 +4661,7 @@ static void intel_init_display(struct drm_device *dev) ...@@ -4663,7 +4661,7 @@ static void intel_init_display(struct drm_device *dev)
i830_get_display_clock_speed; i830_get_display_clock_speed;
/* For FIFO watermark updates */ /* For FIFO watermark updates */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
dev_priv->display.update_wm = NULL; dev_priv->display.update_wm = NULL;
else if (IS_G4X(dev)) else if (IS_G4X(dev))
dev_priv->display.update_wm = g4x_update_wm; dev_priv->display.update_wm = g4x_update_wm;
...@@ -4741,9 +4739,9 @@ void intel_modeset_init(struct drm_device *dev) ...@@ -4741,9 +4739,9 @@ void intel_modeset_init(struct drm_device *dev)
intel_setup_overlay(dev); intel_setup_overlay(dev);
if (IS_IGD(dev) && !intel_get_cxsr_latency(IS_IGDG(dev), if (IS_PINEVIEW(dev) && !intel_get_cxsr_latency(IS_PINEVIEW_G(dev),
dev_priv->fsb_freq, dev_priv->fsb_freq,
dev_priv->mem_freq)) dev_priv->mem_freq))
DRM_INFO("failed to find known CxSR latency " DRM_INFO("failed to find known CxSR latency "
"(found fsb freq %d, mem freq %d), disabling CxSR\n", "(found fsb freq %d, mem freq %d), disabling CxSR\n",
dev_priv->fsb_freq, dev_priv->mem_freq); dev_priv->fsb_freq, dev_priv->mem_freq);
......
...@@ -224,8 +224,8 @@ intel_dp_aux_ch(struct intel_output *intel_output, ...@@ -224,8 +224,8 @@ intel_dp_aux_ch(struct intel_output *intel_output,
*/ */
if (IS_eDP(intel_output)) if (IS_eDP(intel_output))
aux_clock_divider = 225; /* eDP input clock at 450Mhz */ aux_clock_divider = 225; /* eDP input clock at 450Mhz */
else if (IS_IGDNG(dev)) else if (IS_IRONLAKE(dev))
aux_clock_divider = 62; /* IGDNG: input clock fixed at 125Mhz */ aux_clock_divider = 62; /* IRL input clock fixed at 125Mhz */
else else
aux_clock_divider = intel_hrawclk(dev) / 2; aux_clock_divider = intel_hrawclk(dev) / 2;
...@@ -516,7 +516,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode, ...@@ -516,7 +516,7 @@ intel_dp_set_m_n(struct drm_crtc *crtc, struct drm_display_mode *mode,
intel_dp_compute_m_n(3, lane_count, intel_dp_compute_m_n(3, lane_count,
mode->clock, adjusted_mode->clock, &m_n); mode->clock, adjusted_mode->clock, &m_n);
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
if (intel_crtc->pipe == 0) { if (intel_crtc->pipe == 0) {
I915_WRITE(TRANSA_DATA_M1, I915_WRITE(TRANSA_DATA_M1,
((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) | ((m_n.tu - 1) << PIPE_GMCH_DATA_M_TU_SIZE_SHIFT) |
...@@ -608,7 +608,7 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, ...@@ -608,7 +608,7 @@ intel_dp_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode,
} }
} }
static void igdng_edp_backlight_on (struct drm_device *dev) static void ironlake_edp_backlight_on (struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp; u32 pp;
...@@ -619,7 +619,7 @@ static void igdng_edp_backlight_on (struct drm_device *dev) ...@@ -619,7 +619,7 @@ static void igdng_edp_backlight_on (struct drm_device *dev)
I915_WRITE(PCH_PP_CONTROL, pp); I915_WRITE(PCH_PP_CONTROL, pp);
} }
static void igdng_edp_backlight_off (struct drm_device *dev) static void ironlake_edp_backlight_off (struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp; u32 pp;
...@@ -643,13 +643,13 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode) ...@@ -643,13 +643,13 @@ intel_dp_dpms(struct drm_encoder *encoder, int mode)
if (dp_reg & DP_PORT_EN) { if (dp_reg & DP_PORT_EN) {
intel_dp_link_down(intel_output, dp_priv->DP); intel_dp_link_down(intel_output, dp_priv->DP);
if (IS_eDP(intel_output)) if (IS_eDP(intel_output))
igdng_edp_backlight_off(dev); ironlake_edp_backlight_off(dev);
} }
} else { } else {
if (!(dp_reg & DP_PORT_EN)) { if (!(dp_reg & DP_PORT_EN)) {
intel_dp_link_train(intel_output, dp_priv->DP, dp_priv->link_configuration); intel_dp_link_train(intel_output, dp_priv->DP, dp_priv->link_configuration);
if (IS_eDP(intel_output)) if (IS_eDP(intel_output))
igdng_edp_backlight_on(dev); ironlake_edp_backlight_on(dev);
} }
} }
dp_priv->dpms_mode = mode; dp_priv->dpms_mode = mode;
...@@ -1073,7 +1073,7 @@ intel_dp_check_link_status(struct intel_output *intel_output) ...@@ -1073,7 +1073,7 @@ intel_dp_check_link_status(struct intel_output *intel_output)
} }
static enum drm_connector_status static enum drm_connector_status
igdng_dp_detect(struct drm_connector *connector) ironlake_dp_detect(struct drm_connector *connector)
{ {
struct intel_output *intel_output = to_intel_output(connector); struct intel_output *intel_output = to_intel_output(connector);
struct intel_dp_priv *dp_priv = intel_output->dev_priv; struct intel_dp_priv *dp_priv = intel_output->dev_priv;
...@@ -1108,8 +1108,8 @@ intel_dp_detect(struct drm_connector *connector) ...@@ -1108,8 +1108,8 @@ intel_dp_detect(struct drm_connector *connector)
dp_priv->has_audio = false; dp_priv->has_audio = false;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return igdng_dp_detect(connector); return ironlake_dp_detect(connector);
temp = I915_READ(PORT_HOTPLUG_EN); temp = I915_READ(PORT_HOTPLUG_EN);
......
...@@ -82,7 +82,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode) ...@@ -82,7 +82,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode)
/* HW workaround, need to toggle enable bit off and on for 12bpc, but /* HW workaround, need to toggle enable bit off and on for 12bpc, but
* we do this anyway which shows more stable in testing. * we do this anyway which shows more stable in testing.
*/ */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(hdmi_priv->sdvox_reg, temp & ~SDVO_ENABLE); I915_WRITE(hdmi_priv->sdvox_reg, temp & ~SDVO_ENABLE);
POSTING_READ(hdmi_priv->sdvox_reg); POSTING_READ(hdmi_priv->sdvox_reg);
} }
...@@ -99,7 +99,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode) ...@@ -99,7 +99,7 @@ static void intel_hdmi_dpms(struct drm_encoder *encoder, int mode)
/* HW workaround, need to write this twice for issue that may result /* HW workaround, need to write this twice for issue that may result
* in first write getting masked. * in first write getting masked.
*/ */
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(hdmi_priv->sdvox_reg, temp); I915_WRITE(hdmi_priv->sdvox_reg, temp);
POSTING_READ(hdmi_priv->sdvox_reg); POSTING_READ(hdmi_priv->sdvox_reg);
} }
......
...@@ -39,7 +39,7 @@ void intel_i2c_quirk_set(struct drm_device *dev, bool enable) ...@@ -39,7 +39,7 @@ void intel_i2c_quirk_set(struct drm_device *dev, bool enable)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
/* When using bit bashing for I2C, this bit needs to be set to 1 */ /* When using bit bashing for I2C, this bit needs to be set to 1 */
if (!IS_IGD(dev)) if (!IS_PINEVIEW(dev))
return; return;
if (enable) if (enable)
I915_WRITE(DSPCLK_GATE_D, I915_WRITE(DSPCLK_GATE_D,
...@@ -128,7 +128,7 @@ intel_i2c_reset_gmbus(struct drm_device *dev) ...@@ -128,7 +128,7 @@ intel_i2c_reset_gmbus(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
I915_WRITE(PCH_GMBUS0, 0); I915_WRITE(PCH_GMBUS0, 0);
} else { } else {
I915_WRITE(GMBUS0, 0); I915_WRITE(GMBUS0, 0);
......
...@@ -56,7 +56,7 @@ static void intel_lvds_set_backlight(struct drm_device *dev, int level) ...@@ -56,7 +56,7 @@ static void intel_lvds_set_backlight(struct drm_device *dev, int level)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 blc_pwm_ctl, reg; u32 blc_pwm_ctl, reg;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
reg = BLC_PWM_CPU_CTL; reg = BLC_PWM_CPU_CTL;
else else
reg = BLC_PWM_CTL; reg = BLC_PWM_CTL;
...@@ -74,7 +74,7 @@ static u32 intel_lvds_get_max_backlight(struct drm_device *dev) ...@@ -74,7 +74,7 @@ static u32 intel_lvds_get_max_backlight(struct drm_device *dev)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg; u32 reg;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
reg = BLC_PWM_PCH_CTL2; reg = BLC_PWM_PCH_CTL2;
else else
reg = BLC_PWM_CTL; reg = BLC_PWM_CTL;
...@@ -91,7 +91,7 @@ static void intel_lvds_set_power(struct drm_device *dev, bool on) ...@@ -91,7 +91,7 @@ static void intel_lvds_set_power(struct drm_device *dev, bool on)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 pp_status, ctl_reg, status_reg; u32 pp_status, ctl_reg, status_reg;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
ctl_reg = PCH_PP_CONTROL; ctl_reg = PCH_PP_CONTROL;
status_reg = PCH_PP_STATUS; status_reg = PCH_PP_STATUS;
} else { } else {
...@@ -137,7 +137,7 @@ static void intel_lvds_save(struct drm_connector *connector) ...@@ -137,7 +137,7 @@ static void intel_lvds_save(struct drm_connector *connector)
u32 pp_on_reg, pp_off_reg, pp_ctl_reg, pp_div_reg; u32 pp_on_reg, pp_off_reg, pp_ctl_reg, pp_div_reg;
u32 pwm_ctl_reg; u32 pwm_ctl_reg;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
pp_on_reg = PCH_PP_ON_DELAYS; pp_on_reg = PCH_PP_ON_DELAYS;
pp_off_reg = PCH_PP_OFF_DELAYS; pp_off_reg = PCH_PP_OFF_DELAYS;
pp_ctl_reg = PCH_PP_CONTROL; pp_ctl_reg = PCH_PP_CONTROL;
...@@ -174,7 +174,7 @@ static void intel_lvds_restore(struct drm_connector *connector) ...@@ -174,7 +174,7 @@ static void intel_lvds_restore(struct drm_connector *connector)
u32 pp_on_reg, pp_off_reg, pp_ctl_reg, pp_div_reg; u32 pp_on_reg, pp_off_reg, pp_ctl_reg, pp_div_reg;
u32 pwm_ctl_reg; u32 pwm_ctl_reg;
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
pp_on_reg = PCH_PP_ON_DELAYS; pp_on_reg = PCH_PP_ON_DELAYS;
pp_off_reg = PCH_PP_OFF_DELAYS; pp_off_reg = PCH_PP_OFF_DELAYS;
pp_ctl_reg = PCH_PP_CONTROL; pp_ctl_reg = PCH_PP_CONTROL;
...@@ -297,7 +297,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, ...@@ -297,7 +297,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
} }
/* full screen scale for now */ /* full screen scale for now */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
goto out; goto out;
/* 965+ wants fuzzy fitting */ /* 965+ wants fuzzy fitting */
...@@ -327,7 +327,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, ...@@ -327,7 +327,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
* to register description and PRM. * to register description and PRM.
* Change the value here to see the borders for debugging * Change the value here to see the borders for debugging
*/ */
if (!IS_IGDNG(dev)) { if (!IS_IRONLAKE(dev)) {
I915_WRITE(BCLRPAT_A, 0); I915_WRITE(BCLRPAT_A, 0);
I915_WRITE(BCLRPAT_B, 0); I915_WRITE(BCLRPAT_B, 0);
} }
...@@ -548,7 +548,7 @@ static void intel_lvds_prepare(struct drm_encoder *encoder) ...@@ -548,7 +548,7 @@ static void intel_lvds_prepare(struct drm_encoder *encoder)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg; u32 reg;
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
reg = BLC_PWM_CPU_CTL; reg = BLC_PWM_CPU_CTL;
else else
reg = BLC_PWM_CTL; reg = BLC_PWM_CTL;
...@@ -587,7 +587,7 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder, ...@@ -587,7 +587,7 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder,
* settings. * settings.
*/ */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
return; return;
/* /*
...@@ -1040,7 +1040,7 @@ void intel_lvds_init(struct drm_device *dev) ...@@ -1040,7 +1040,7 @@ void intel_lvds_init(struct drm_device *dev)
return; return;
} }
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0) if ((I915_READ(PCH_LVDS) & LVDS_DETECTED) == 0)
return; return;
if (dev_priv->edp_support) { if (dev_priv->edp_support) {
...@@ -1142,8 +1142,8 @@ void intel_lvds_init(struct drm_device *dev) ...@@ -1142,8 +1142,8 @@ void intel_lvds_init(struct drm_device *dev)
* correct mode. * correct mode.
*/ */
/* IGDNG: FIXME if still fail, not try pipe mode now */ /* Ironlake: FIXME if still fail, not try pipe mode now */
if (IS_IGDNG(dev)) if (IS_IRONLAKE(dev))
goto failed; goto failed;
lvds = I915_READ(LVDS); lvds = I915_READ(LVDS);
...@@ -1164,7 +1164,7 @@ void intel_lvds_init(struct drm_device *dev) ...@@ -1164,7 +1164,7 @@ void intel_lvds_init(struct drm_device *dev)
goto failed; goto failed;
out: out:
if (IS_IGDNG(dev)) { if (IS_IRONLAKE(dev)) {
u32 pwm; u32 pwm;
/* make sure PWM is enabled */ /* make sure PWM is enabled */
pwm = I915_READ(BLC_PWM_CPU_CTL2); pwm = I915_READ(BLC_PWM_CPU_CTL2);
......
...@@ -172,7 +172,7 @@ struct overlay_registers { ...@@ -172,7 +172,7 @@ struct overlay_registers {
#define OFC_UPDATE 0x1 #define OFC_UPDATE 0x1
#define OVERLAY_NONPHYSICAL(dev) (IS_G33(dev) || IS_I965G(dev)) #define OVERLAY_NONPHYSICAL(dev) (IS_G33(dev) || IS_I965G(dev))
#define OVERLAY_EXISTS(dev) (!IS_G4X(dev) && !IS_IGDNG(dev)) #define OVERLAY_EXISTS(dev) (!IS_G4X(dev) && !IS_IRONLAKE(dev))
static struct overlay_registers *intel_overlay_map_regs_atomic(struct intel_overlay *overlay) static struct overlay_registers *intel_overlay_map_regs_atomic(struct intel_overlay *overlay)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment