aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2009-10-08 23:39:41 -0400
committerEric Anholt <eric@anholt.net>2009-11-05 17:47:11 -0500
commit28c97730c36e06d5ba0c442156eb2154347cc3fe (patch)
tree3c5dc547eae020bf602c27dc82c83d2e14610e21 /drivers/gpu/drm/i915/intel_display.c
parent44d98a614267c81a04ba9c7a0427c3a628985b7d (diff)
drm/i915: Replace DRM_DEBUG with DRM_DEBUG_KMS
Replace the DRM_DEBUG with DRM_DEBUG_KMS in output device code. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c124
1 files changed, 66 insertions, 58 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 062c1d7cdace..8df81401c149 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -994,7 +994,7 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
994 fbc_ctl |= dev_priv->cfb_fence; 994 fbc_ctl |= dev_priv->cfb_fence;
995 I915_WRITE(FBC_CONTROL, fbc_ctl); 995 I915_WRITE(FBC_CONTROL, fbc_ctl);
996 996
997 DRM_DEBUG("enabled FBC, pitch %ld, yoff %d, plane %d, ", 997 DRM_DEBUG_KMS("enabled FBC, pitch %ld, yoff %d, plane %d, ",
998 dev_priv->cfb_pitch, crtc->y, dev_priv->cfb_plane); 998 dev_priv->cfb_pitch, crtc->y, dev_priv->cfb_plane);
999} 999}
1000 1000
@@ -1017,7 +1017,7 @@ void i8xx_disable_fbc(struct drm_device *dev)
1017 1017
1018 intel_wait_for_vblank(dev); 1018 intel_wait_for_vblank(dev);
1019 1019
1020 DRM_DEBUG("disabled FBC\n"); 1020 DRM_DEBUG_KMS("disabled FBC\n");
1021} 1021}
1022 1022
1023static bool i8xx_fbc_enabled(struct drm_crtc *crtc) 1023static bool i8xx_fbc_enabled(struct drm_crtc *crtc)
@@ -1062,7 +1062,7 @@ static void g4x_enable_fbc(struct drm_crtc *crtc, unsigned long interval)
1062 /* enable it... */ 1062 /* enable it... */
1063 I915_WRITE(DPFC_CONTROL, I915_READ(DPFC_CONTROL) | DPFC_CTL_EN); 1063 I915_WRITE(DPFC_CONTROL, I915_READ(DPFC_CONTROL) | DPFC_CTL_EN);
1064 1064
1065 DRM_DEBUG("enabled fbc on plane %d\n", intel_crtc->plane); 1065 DRM_DEBUG_KMS("enabled fbc on plane %d\n", intel_crtc->plane);
1066} 1066}
1067 1067
1068void g4x_disable_fbc(struct drm_device *dev) 1068void g4x_disable_fbc(struct drm_device *dev)
@@ -1076,7 +1076,7 @@ void g4x_disable_fbc(struct drm_device *dev)
1076 I915_WRITE(DPFC_CONTROL, dpfc_ctl); 1076 I915_WRITE(DPFC_CONTROL, dpfc_ctl);
1077 intel_wait_for_vblank(dev); 1077 intel_wait_for_vblank(dev);
1078 1078
1079 DRM_DEBUG("disabled FBC\n"); 1079 DRM_DEBUG_KMS("disabled FBC\n");
1080} 1080}
1081 1081
1082static bool g4x_fbc_enabled(struct drm_crtc *crtc) 1082static bool g4x_fbc_enabled(struct drm_crtc *crtc)
@@ -1141,25 +1141,27 @@ static void intel_update_fbc(struct drm_crtc *crtc,
1141 * - going to an unsupported config (interlace, pixel multiply, etc.) 1141 * - going to an unsupported config (interlace, pixel multiply, etc.)
1142 */ 1142 */
1143 if (intel_fb->obj->size > dev_priv->cfb_size) { 1143 if (intel_fb->obj->size > dev_priv->cfb_size) {
1144 DRM_DEBUG("framebuffer too large, disabling compression\n"); 1144 DRM_DEBUG_KMS("framebuffer too large, disabling "
1145 "compression\n");
1145 goto out_disable; 1146 goto out_disable;
1146 } 1147 }
1147 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) || 1148 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) ||
1148 (mode->flags & DRM_MODE_FLAG_DBLSCAN)) { 1149 (mode->flags & DRM_MODE_FLAG_DBLSCAN)) {
1149 DRM_DEBUG("mode incompatible with compression, disabling\n"); 1150 DRM_DEBUG_KMS("mode incompatible with compression, "
1151 "disabling\n");
1150 goto out_disable; 1152 goto out_disable;
1151 } 1153 }
1152 if ((mode->hdisplay > 2048) || 1154 if ((mode->hdisplay > 2048) ||
1153 (mode->vdisplay > 1536)) { 1155 (mode->vdisplay > 1536)) {
1154 DRM_DEBUG("mode too large for compression, disabling\n"); 1156 DRM_DEBUG_KMS("mode too large for compression, disabling\n");
1155 goto out_disable; 1157 goto out_disable;
1156 } 1158 }
1157 if ((IS_I915GM(dev) || IS_I945GM(dev)) && plane != 0) { 1159 if ((IS_I915GM(dev) || IS_I945GM(dev)) && plane != 0) {
1158 DRM_DEBUG("plane not 0, disabling compression\n"); 1160 DRM_DEBUG_KMS("plane not 0, disabling compression\n");
1159 goto out_disable; 1161 goto out_disable;
1160 } 1162 }
1161 if (obj_priv->tiling_mode != I915_TILING_X) { 1163 if (obj_priv->tiling_mode != I915_TILING_X) {
1162 DRM_DEBUG("framebuffer not tiled, disabling compression\n"); 1164 DRM_DEBUG_KMS("framebuffer not tiled, disabling compression\n");
1163 goto out_disable; 1165 goto out_disable;
1164 } 1166 }
1165 1167
@@ -1181,7 +1183,7 @@ static void intel_update_fbc(struct drm_crtc *crtc,
1181 return; 1183 return;
1182 1184
1183out_disable: 1185out_disable:
1184 DRM_DEBUG("unsupported config, disabling FBC\n"); 1186 DRM_DEBUG_KMS("unsupported config, disabling FBC\n");
1185 /* Multiple disables should be harmless */ 1187 /* Multiple disables should be harmless */
1186 if (dev_priv->display.fbc_enabled(crtc)) 1188 if (dev_priv->display.fbc_enabled(crtc))
1187 dev_priv->display.disable_fbc(dev); 1189 dev_priv->display.disable_fbc(dev);
@@ -1211,7 +1213,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
1211 1213
1212 /* no fb bound */ 1214 /* no fb bound */
1213 if (!crtc->fb) { 1215 if (!crtc->fb) {
1214 DRM_DEBUG("No FB bound\n"); 1216 DRM_DEBUG_KMS("No FB bound\n");
1215 return 0; 1217 return 0;
1216 } 1218 }
1217 1219
@@ -1311,7 +1313,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
1311 Start = obj_priv->gtt_offset; 1313 Start = obj_priv->gtt_offset;
1312 Offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8); 1314 Offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8);
1313 1315
1314 DRM_DEBUG("Writing base %08lX %08lX %d %d\n", Start, Offset, x, y); 1316 DRM_DEBUG_KMS("Writing base %08lX %08lX %d %d\n", Start, Offset, x, y);
1315 I915_WRITE(dspstride, crtc->fb->pitch); 1317 I915_WRITE(dspstride, crtc->fb->pitch);
1316 if (IS_I965G(dev)) { 1318 if (IS_I965G(dev)) {
1317 I915_WRITE(dspbase, Offset); 1319 I915_WRITE(dspbase, Offset);
@@ -1385,7 +1387,7 @@ static void igdng_disable_pll_edp (struct drm_crtc *crtc)
1385 struct drm_i915_private *dev_priv = dev->dev_private; 1387 struct drm_i915_private *dev_priv = dev->dev_private;
1386 u32 dpa_ctl; 1388 u32 dpa_ctl;
1387 1389
1388 DRM_DEBUG("\n"); 1390 DRM_DEBUG_KMS("\n");
1389 dpa_ctl = I915_READ(DP_A); 1391 dpa_ctl = I915_READ(DP_A);
1390 dpa_ctl &= ~DP_PLL_ENABLE; 1392 dpa_ctl &= ~DP_PLL_ENABLE;
1391 I915_WRITE(DP_A, dpa_ctl); 1393 I915_WRITE(DP_A, dpa_ctl);
@@ -1410,7 +1412,7 @@ static void igdng_set_pll_edp (struct drm_crtc *crtc, int clock)
1410 struct drm_i915_private *dev_priv = dev->dev_private; 1412 struct drm_i915_private *dev_priv = dev->dev_private;
1411 u32 dpa_ctl; 1413 u32 dpa_ctl;
1412 1414
1413 DRM_DEBUG("eDP PLL enable for clock %d\n", clock); 1415 DRM_DEBUG_KMS("eDP PLL enable for clock %d\n", clock);
1414 dpa_ctl = I915_READ(DP_A); 1416 dpa_ctl = I915_READ(DP_A);
1415 dpa_ctl &= ~DP_PLL_FREQ_MASK; 1417 dpa_ctl &= ~DP_PLL_FREQ_MASK;
1416 1418
@@ -1481,7 +1483,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1481 case DRM_MODE_DPMS_ON: 1483 case DRM_MODE_DPMS_ON:
1482 case DRM_MODE_DPMS_STANDBY: 1484 case DRM_MODE_DPMS_STANDBY:
1483 case DRM_MODE_DPMS_SUSPEND: 1485 case DRM_MODE_DPMS_SUSPEND:
1484 DRM_DEBUG("crtc %d dpms on\n", pipe); 1486 DRM_DEBUG_KMS("crtc %d dpms on\n", pipe);
1485 if (HAS_eDP) { 1487 if (HAS_eDP) {
1486 /* enable eDP PLL */ 1488 /* enable eDP PLL */
1487 igdng_enable_pll_edp(crtc); 1489 igdng_enable_pll_edp(crtc);
@@ -1568,12 +1570,13 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1568 udelay(150); 1570 udelay(150);
1569 1571
1570 temp = I915_READ(fdi_rx_iir_reg); 1572 temp = I915_READ(fdi_rx_iir_reg);
1571 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp); 1573 DRM_DEBUG_KMS("FDI_RX_IIR 0x%x\n", temp);
1572 1574
1573 if ((temp & FDI_RX_BIT_LOCK) == 0) { 1575 if ((temp & FDI_RX_BIT_LOCK) == 0) {
1574 for (j = 0; j < tries; j++) { 1576 for (j = 0; j < tries; j++) {
1575 temp = I915_READ(fdi_rx_iir_reg); 1577 temp = I915_READ(fdi_rx_iir_reg);
1576 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp); 1578 DRM_DEBUG_KMS("FDI_RX_IIR 0x%x\n",
1579 temp);
1577 if (temp & FDI_RX_BIT_LOCK) 1580 if (temp & FDI_RX_BIT_LOCK)
1578 break; 1581 break;
1579 udelay(200); 1582 udelay(200);
@@ -1582,11 +1585,11 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1582 I915_WRITE(fdi_rx_iir_reg, 1585 I915_WRITE(fdi_rx_iir_reg,
1583 temp | FDI_RX_BIT_LOCK); 1586 temp | FDI_RX_BIT_LOCK);
1584 else 1587 else
1585 DRM_DEBUG("train 1 fail\n"); 1588 DRM_DEBUG_KMS("train 1 fail\n");
1586 } else { 1589 } else {
1587 I915_WRITE(fdi_rx_iir_reg, 1590 I915_WRITE(fdi_rx_iir_reg,
1588 temp | FDI_RX_BIT_LOCK); 1591 temp | FDI_RX_BIT_LOCK);
1589 DRM_DEBUG("train 1 ok 2!\n"); 1592 DRM_DEBUG_KMS("train 1 ok 2!\n");
1590 } 1593 }
1591 temp = I915_READ(fdi_tx_reg); 1594 temp = I915_READ(fdi_tx_reg);
1592 temp &= ~FDI_LINK_TRAIN_NONE; 1595 temp &= ~FDI_LINK_TRAIN_NONE;
@@ -1601,12 +1604,13 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1601 udelay(150); 1604 udelay(150);
1602 1605
1603 temp = I915_READ(fdi_rx_iir_reg); 1606 temp = I915_READ(fdi_rx_iir_reg);
1604 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp); 1607 DRM_DEBUG_KMS("FDI_RX_IIR 0x%x\n", temp);
1605 1608
1606 if ((temp & FDI_RX_SYMBOL_LOCK) == 0) { 1609 if ((temp & FDI_RX_SYMBOL_LOCK) == 0) {
1607 for (j = 0; j < tries; j++) { 1610 for (j = 0; j < tries; j++) {
1608 temp = I915_READ(fdi_rx_iir_reg); 1611 temp = I915_READ(fdi_rx_iir_reg);
1609 DRM_DEBUG("FDI_RX_IIR 0x%x\n", temp); 1612 DRM_DEBUG_KMS("FDI_RX_IIR 0x%x\n",
1613 temp);
1610 if (temp & FDI_RX_SYMBOL_LOCK) 1614 if (temp & FDI_RX_SYMBOL_LOCK)
1611 break; 1615 break;
1612 udelay(200); 1616 udelay(200);
@@ -1614,15 +1618,15 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1614 if (j != tries) { 1618 if (j != tries) {
1615 I915_WRITE(fdi_rx_iir_reg, 1619 I915_WRITE(fdi_rx_iir_reg,
1616 temp | FDI_RX_SYMBOL_LOCK); 1620 temp | FDI_RX_SYMBOL_LOCK);
1617 DRM_DEBUG("train 2 ok 1!\n"); 1621 DRM_DEBUG_KMS("train 2 ok 1!\n");
1618 } else 1622 } else
1619 DRM_DEBUG("train 2 fail\n"); 1623 DRM_DEBUG_KMS("train 2 fail\n");
1620 } else { 1624 } else {
1621 I915_WRITE(fdi_rx_iir_reg, 1625 I915_WRITE(fdi_rx_iir_reg,
1622 temp | FDI_RX_SYMBOL_LOCK); 1626 temp | FDI_RX_SYMBOL_LOCK);
1623 DRM_DEBUG("train 2 ok 2!\n"); 1627 DRM_DEBUG_KMS("train 2 ok 2!\n");
1624 } 1628 }
1625 DRM_DEBUG("train done\n"); 1629 DRM_DEBUG_KMS("train done\n");
1626 1630
1627 /* set transcoder timing */ 1631 /* set transcoder timing */
1628 I915_WRITE(trans_htot_reg, I915_READ(cpu_htot_reg)); 1632 I915_WRITE(trans_htot_reg, I915_READ(cpu_htot_reg));
@@ -1664,7 +1668,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1664 1668
1665 break; 1669 break;
1666 case DRM_MODE_DPMS_OFF: 1670 case DRM_MODE_DPMS_OFF:
1667 DRM_DEBUG("crtc %d dpms off\n", pipe); 1671 DRM_DEBUG_KMS("crtc %d dpms off\n", pipe);
1668 1672
1669 i915_disable_vga(dev); 1673 i915_disable_vga(dev);
1670 1674
@@ -1690,12 +1694,13 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1690 udelay(500); 1694 udelay(500);
1691 continue; 1695 continue;
1692 } else { 1696 } else {
1693 DRM_DEBUG("pipe %d off delay\n", pipe); 1697 DRM_DEBUG_KMS("pipe %d off delay\n",
1698 pipe);
1694 break; 1699 break;
1695 } 1700 }
1696 } 1701 }
1697 } else 1702 } else
1698 DRM_DEBUG("crtc %d is disabled\n", pipe); 1703 DRM_DEBUG_KMS("crtc %d is disabled\n", pipe);
1699 1704
1700 if (HAS_eDP) { 1705 if (HAS_eDP) {
1701 igdng_disable_pll_edp(crtc); 1706 igdng_disable_pll_edp(crtc);
@@ -1738,7 +1743,8 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
1738 udelay(500); 1743 udelay(500);
1739 continue; 1744 continue;
1740 } else { 1745 } else {
1741 DRM_DEBUG("transcoder %d off delay\n", pipe); 1746 DRM_DEBUG_KMS("transcoder %d off "
1747 "delay\n", pipe);
1742 break; 1748 break;
1743 } 1749 }
1744 } 1750 }
@@ -2245,11 +2251,11 @@ static unsigned long intel_calculate_wm(unsigned long clock_in_khz,
2245 1000; 2251 1000;
2246 entries_required /= wm->cacheline_size; 2252 entries_required /= wm->cacheline_size;
2247 2253
2248 DRM_DEBUG("FIFO entries required for mode: %d\n", entries_required); 2254 DRM_DEBUG_KMS("FIFO entries required for mode: %d\n", entries_required);
2249 2255
2250 wm_size = wm->fifo_size - (entries_required + wm->guard_size); 2256 wm_size = wm->fifo_size - (entries_required + wm->guard_size);
2251 2257
2252 DRM_DEBUG("FIFO watermark level: %d\n", wm_size); 2258 DRM_DEBUG_KMS("FIFO watermark level: %d\n", wm_size);
2253 2259
2254 /* Don't promote wm_size to unsigned... */ 2260 /* Don't promote wm_size to unsigned... */
2255 if (wm_size > (long)wm->max_wm) 2261 if (wm_size > (long)wm->max_wm)
@@ -2311,7 +2317,7 @@ static struct cxsr_latency *intel_get_cxsr_latency(int is_desktop, int fsb,
2311 return latency; 2317 return latency;
2312 } 2318 }
2313 2319
2314 DRM_DEBUG("Unknown FSB/MEM found, disable CxSR\n"); 2320 DRM_DEBUG_KMS("Unknown FSB/MEM found, disable CxSR\n");
2315 2321
2316 return NULL; 2322 return NULL;
2317} 2323}
@@ -2339,7 +2345,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock,
2339 latency = intel_get_cxsr_latency(IS_IGDG(dev), dev_priv->fsb_freq, 2345 latency = intel_get_cxsr_latency(IS_IGDG(dev), dev_priv->fsb_freq,
2340 dev_priv->mem_freq); 2346 dev_priv->mem_freq);
2341 if (!latency) { 2347 if (!latency) {
2342 DRM_DEBUG("Unknown FSB/MEM found, disable CxSR\n"); 2348 DRM_DEBUG_KMS("Unknown FSB/MEM found, disable CxSR\n");
2343 igd_disable_cxsr(dev); 2349 igd_disable_cxsr(dev);
2344 return; 2350 return;
2345 } 2351 }
@@ -2351,7 +2357,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock,
2351 reg &= 0x7fffff; 2357 reg &= 0x7fffff;
2352 reg |= wm << 23; 2358 reg |= wm << 23;
2353 I915_WRITE(DSPFW1, reg); 2359 I915_WRITE(DSPFW1, reg);
2354 DRM_DEBUG("DSPFW1 register is %x\n", reg); 2360 DRM_DEBUG_KMS("DSPFW1 register is %x\n", reg);
2355 2361
2356 /* cursor SR */ 2362 /* cursor SR */
2357 wm = intel_calculate_wm(clock, &igd_cursor_wm, pixel_size, 2363 wm = intel_calculate_wm(clock, &igd_cursor_wm, pixel_size,
@@ -2376,7 +2382,7 @@ static void igd_enable_cxsr(struct drm_device *dev, unsigned long clock,
2376 reg &= ~(0x3f << 16); 2382 reg &= ~(0x3f << 16);
2377 reg |= (wm & 0x3f) << 16; 2383 reg |= (wm & 0x3f) << 16;
2378 I915_WRITE(DSPFW3, reg); 2384 I915_WRITE(DSPFW3, reg);
2379 DRM_DEBUG("DSPFW3 register is %x\n", reg); 2385 DRM_DEBUG_KMS("DSPFW3 register is %x\n", reg);
2380 2386
2381 /* activate cxsr */ 2387 /* activate cxsr */
2382 reg = I915_READ(DSPFW3); 2388 reg = I915_READ(DSPFW3);
@@ -2416,8 +2422,8 @@ static int i9xx_get_fifo_size(struct drm_device *dev, int plane)
2416 size = ((dsparb >> DSPARB_CSTART_SHIFT) & 0x7f) - 2422 size = ((dsparb >> DSPARB_CSTART_SHIFT) & 0x7f) -
2417 (dsparb & 0x7f); 2423 (dsparb & 0x7f);
2418 2424
2419 DRM_DEBUG("FIFO size - (0x%08x) %s: %d\n", dsparb, plane ? "B" : "A", 2425 DRM_DEBUG_KMS("FIFO size - (0x%08x) %s: %d\n", dsparb,
2420 size); 2426 plane ? "B" : "A", size);
2421 2427
2422 return size; 2428 return size;
2423} 2429}
@@ -2435,8 +2441,8 @@ static int i85x_get_fifo_size(struct drm_device *dev, int plane)
2435 (dsparb & 0x1ff); 2441 (dsparb & 0x1ff);
2436 size >>= 1; /* Convert to cachelines */ 2442 size >>= 1; /* Convert to cachelines */
2437 2443
2438 DRM_DEBUG("FIFO size - (0x%08x) %s: %d\n", dsparb, plane ? "B" : "A", 2444 DRM_DEBUG_KMS("FIFO size - (0x%08x) %s: %d\n", dsparb,
2439 size); 2445 plane ? "B" : "A", size);
2440 2446
2441 return size; 2447 return size;
2442} 2448}
@@ -2450,7 +2456,8 @@ static int i845_get_fifo_size(struct drm_device *dev, int plane)
2450 size = dsparb & 0x7f; 2456 size = dsparb & 0x7f;
2451 size >>= 2; /* Convert to cachelines */ 2457 size >>= 2; /* Convert to cachelines */
2452 2458
2453 DRM_DEBUG("FIFO size - (0x%08x) %s: %d\n", dsparb, plane ? "B" : "A", 2459 DRM_DEBUG_KMS("FIFO size - (0x%08x) %s: %d\n", dsparb,
2460 plane ? "B" : "A",
2454 size); 2461 size);
2455 2462
2456 return size; 2463 return size;
@@ -2465,8 +2472,8 @@ static int i830_get_fifo_size(struct drm_device *dev, int plane)
2465 size = dsparb & 0x7f; 2472 size = dsparb & 0x7f;
2466 size >>= 1; /* Convert to cachelines */ 2473 size >>= 1; /* Convert to cachelines */
2467 2474
2468 DRM_DEBUG("FIFO size - (0x%08x) %s: %d\n", dsparb, plane ? "B" : "A", 2475 DRM_DEBUG_KMS("FIFO size - (0x%08x) %s: %d\n", dsparb,
2469 size); 2476 plane ? "B" : "A", size);
2470 2477
2471 return size; 2478 return size;
2472} 2479}
@@ -2546,7 +2553,7 @@ static void i965_update_wm(struct drm_device *dev, int unused, int unused2,
2546{ 2553{
2547 struct drm_i915_private *dev_priv = dev->dev_private; 2554 struct drm_i915_private *dev_priv = dev->dev_private;
2548 2555
2549 DRM_DEBUG("Setting FIFO watermarks - A: 8, B: 8, C: 8, SR 8\n"); 2556 DRM_DEBUG_KMS("Setting FIFO watermarks - A: 8, B: 8, C: 8, SR 8\n");
2550 2557
2551 /* 965 has limitations... */ 2558 /* 965 has limitations... */
2552 I915_WRITE(DSPFW1, (8 << 16) | (8 << 8) | (8 << 0)); 2559 I915_WRITE(DSPFW1, (8 << 16) | (8 << 8) | (8 << 0));
@@ -2585,7 +2592,7 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
2585 pixel_size, latency_ns); 2592 pixel_size, latency_ns);
2586 planeb_wm = intel_calculate_wm(planeb_clock, &planeb_params, 2593 planeb_wm = intel_calculate_wm(planeb_clock, &planeb_params,
2587 pixel_size, latency_ns); 2594 pixel_size, latency_ns);
2588 DRM_DEBUG("FIFO watermarks - A: %d, B: %d\n", planea_wm, planeb_wm); 2595 DRM_DEBUG_KMS("FIFO watermarks - A: %d, B: %d\n", planea_wm, planeb_wm);
2589 2596
2590 /* 2597 /*
2591 * Overlay gets an aggressive default since video jitter is bad. 2598 * Overlay gets an aggressive default since video jitter is bad.
@@ -2605,14 +2612,14 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock,
2605 sr_entries = (((sr_latency_ns / line_time_us) + 1) * 2612 sr_entries = (((sr_latency_ns / line_time_us) + 1) *
2606 pixel_size * sr_hdisplay) / 1000; 2613 pixel_size * sr_hdisplay) / 1000;
2607 sr_entries = roundup(sr_entries / cacheline_size, 1); 2614 sr_entries = roundup(sr_entries / cacheline_size, 1);
2608 DRM_DEBUG("self-refresh entries: %d\n", sr_entries); 2615 DRM_DEBUG_KMS("self-refresh entries: %d\n", sr_entries);
2609 srwm = total_size - sr_entries; 2616 srwm = total_size - sr_entries;
2610 if (srwm < 0) 2617 if (srwm < 0)
2611 srwm = 1; 2618 srwm = 1;
2612 I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN | (srwm & 0x3f)); 2619 I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN | (srwm & 0x3f));
2613 } 2620 }
2614 2621
2615 DRM_DEBUG("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n", 2622 DRM_DEBUG_KMS("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n",
2616 planea_wm, planeb_wm, cwm, srwm); 2623 planea_wm, planeb_wm, cwm, srwm);
2617 2624
2618 fwater_lo = ((planeb_wm & 0x3f) << 16) | (planea_wm & 0x3f); 2625 fwater_lo = ((planeb_wm & 0x3f) << 16) | (planea_wm & 0x3f);
@@ -2639,7 +2646,7 @@ static void i830_update_wm(struct drm_device *dev, int planea_clock, int unused,
2639 pixel_size, latency_ns); 2646 pixel_size, latency_ns);
2640 fwater_lo |= (3<<8) | planea_wm; 2647 fwater_lo |= (3<<8) | planea_wm;
2641 2648
2642 DRM_DEBUG("Setting FIFO watermarks - A: %d\n", planea_wm); 2649 DRM_DEBUG_KMS("Setting FIFO watermarks - A: %d\n", planea_wm);
2643 2650
2644 I915_WRITE(FW_BLC, fwater_lo); 2651 I915_WRITE(FW_BLC, fwater_lo);
2645} 2652}
@@ -2693,11 +2700,11 @@ static void intel_update_watermarks(struct drm_device *dev)
2693 if (crtc->enabled) { 2700 if (crtc->enabled) {
2694 enabled++; 2701 enabled++;
2695 if (intel_crtc->plane == 0) { 2702 if (intel_crtc->plane == 0) {
2696 DRM_DEBUG("plane A (pipe %d) clock: %d\n", 2703 DRM_DEBUG_KMS("plane A (pipe %d) clock: %d\n",
2697 intel_crtc->pipe, crtc->mode.clock); 2704 intel_crtc->pipe, crtc->mode.clock);
2698 planea_clock = crtc->mode.clock; 2705 planea_clock = crtc->mode.clock;
2699 } else { 2706 } else {
2700 DRM_DEBUG("plane B (pipe %d) clock: %d\n", 2707 DRM_DEBUG_KMS("plane B (pipe %d) clock: %d\n",
2701 intel_crtc->pipe, crtc->mode.clock); 2708 intel_crtc->pipe, crtc->mode.clock);
2702 planeb_clock = crtc->mode.clock; 2709 planeb_clock = crtc->mode.clock;
2703 } 2710 }
@@ -2811,7 +2818,8 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
2811 2818
2812 if (is_lvds && dev_priv->lvds_use_ssc && num_outputs < 2) { 2819 if (is_lvds && dev_priv->lvds_use_ssc && num_outputs < 2) {
2813 refclk = dev_priv->lvds_ssc_freq * 1000; 2820 refclk = dev_priv->lvds_ssc_freq * 1000;
2814 DRM_DEBUG("using SSC reference clock of %d MHz\n", refclk / 1000); 2821 DRM_DEBUG_KMS("using SSC reference clock of %d MHz\n",
2822 refclk / 1000);
2815 } else if (IS_I9XX(dev)) { 2823 } else if (IS_I9XX(dev)) {
2816 refclk = 96000; 2824 refclk = 96000;
2817 if (IS_IGDNG(dev)) 2825 if (IS_IGDNG(dev))
@@ -3069,7 +3077,7 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
3069 if (!IS_IGDNG(dev) && intel_panel_fitter_pipe(dev) == pipe) 3077 if (!IS_IGDNG(dev) && intel_panel_fitter_pipe(dev) == pipe)
3070 I915_WRITE(PFIT_CONTROL, 0); 3078 I915_WRITE(PFIT_CONTROL, 0);
3071 3079
3072 DRM_DEBUG("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B'); 3080 DRM_DEBUG_KMS("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B');
3073 drm_mode_debug_printmodeline(mode); 3081 drm_mode_debug_printmodeline(mode);
3074 3082
3075 /* assign to IGDNG registers */ 3083 /* assign to IGDNG registers */
@@ -3147,14 +3155,14 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
3147 I915_WRITE(fp_reg + 4, fp2); 3155 I915_WRITE(fp_reg + 4, fp2);
3148 intel_crtc->lowfreq_avail = true; 3156 intel_crtc->lowfreq_avail = true;
3149 if (HAS_PIPE_CXSR(dev)) { 3157 if (HAS_PIPE_CXSR(dev)) {
3150 DRM_DEBUG("enabling CxSR downclocking\n"); 3158 DRM_DEBUG_KMS("enabling CxSR downclocking\n");
3151 pipeconf |= PIPECONF_CXSR_DOWNCLOCK; 3159 pipeconf |= PIPECONF_CXSR_DOWNCLOCK;
3152 } 3160 }
3153 } else { 3161 } else {
3154 I915_WRITE(fp_reg + 4, fp); 3162 I915_WRITE(fp_reg + 4, fp);
3155 intel_crtc->lowfreq_avail = false; 3163 intel_crtc->lowfreq_avail = false;
3156 if (HAS_PIPE_CXSR(dev)) { 3164 if (HAS_PIPE_CXSR(dev)) {
3157 DRM_DEBUG("disabling CxSR downclocking\n"); 3165 DRM_DEBUG_KMS("disabling CxSR downclocking\n");
3158 pipeconf &= ~PIPECONF_CXSR_DOWNCLOCK; 3166 pipeconf &= ~PIPECONF_CXSR_DOWNCLOCK;
3159 } 3167 }
3160 } 3168 }
@@ -3266,11 +3274,11 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
3266 size_t addr; 3274 size_t addr;
3267 int ret; 3275 int ret;
3268 3276
3269 DRM_DEBUG("\n"); 3277 DRM_DEBUG_KMS("\n");
3270 3278
3271 /* if we want to turn off the cursor ignore width and height */ 3279 /* if we want to turn off the cursor ignore width and height */
3272 if (!handle) { 3280 if (!handle) {
3273 DRM_DEBUG("cursor off\n"); 3281 DRM_DEBUG_KMS("cursor off\n");
3274 if (IS_MOBILE(dev) || IS_I9XX(dev)) { 3282 if (IS_MOBILE(dev) || IS_I9XX(dev)) {
3275 temp &= ~(CURSOR_MODE | MCURSOR_GAMMA_ENABLE); 3283 temp &= ~(CURSOR_MODE | MCURSOR_GAMMA_ENABLE);
3276 temp |= CURSOR_MODE_DISABLE; 3284 temp |= CURSOR_MODE_DISABLE;
@@ -3604,7 +3612,7 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc)
3604 7 : 14; 3612 7 : 14;
3605 break; 3613 break;
3606 default: 3614 default:
3607 DRM_DEBUG("Unknown DPLL mode %08x in programmed " 3615 DRM_DEBUG_KMS("Unknown DPLL mode %08x in programmed "
3608 "mode\n", (int)(dpll & DPLL_MODE_MASK)); 3616 "mode\n", (int)(dpll & DPLL_MODE_MASK));
3609 return 0; 3617 return 0;
3610 } 3618 }
@@ -4042,7 +4050,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
4042 intel_crtc->pipe = pipe; 4050 intel_crtc->pipe = pipe;
4043 intel_crtc->plane = pipe; 4051 intel_crtc->plane = pipe;
4044 if (IS_MOBILE(dev) && (IS_I9XX(dev) && !IS_I965G(dev))) { 4052 if (IS_MOBILE(dev) && (IS_I9XX(dev) && !IS_I965G(dev))) {
4045 DRM_DEBUG("swapping pipes & planes for FBC\n"); 4053 DRM_DEBUG_KMS("swapping pipes & planes for FBC\n");
4046 intel_crtc->plane = ((pipe == 0) ? 1 : 0); 4054 intel_crtc->plane = ((pipe == 0) ? 1 : 0);
4047 } 4055 }
4048 4056
@@ -4471,7 +4479,7 @@ void intel_modeset_init(struct drm_device *dev)
4471 num_pipe = 2; 4479 num_pipe = 2;
4472 else 4480 else
4473 num_pipe = 1; 4481 num_pipe = 1;
4474 DRM_DEBUG("%d display pipe%s available.\n", 4482 DRM_DEBUG_KMS("%d display pipe%s available.\n",
4475 num_pipe, num_pipe > 1 ? "s" : ""); 4483 num_pipe, num_pipe > 1 ? "s" : "");
4476 4484
4477 if (IS_I85X(dev)) 4485 if (IS_I85X(dev))