drm/i915: Make driver less chatty
Convert many printk calls to DRM_DEBUG calls to reduce kernel log noise for normal activities. Switch other printk calls to DRM_ERROR or DRM_INFO. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
committed by
Eric Anholt
parent
956dba3caa
commit
1ae8c0a56e
@@ -846,7 +846,7 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
printk(KERN_DEBUG "set status page addr 0x%08x\n", (u32)hws->addr);
|
DRM_DEBUG("set status page addr 0x%08x\n", (u32)hws->addr);
|
||||||
|
|
||||||
dev_priv->status_gfx_addr = hws->addr & (0x1ffff<<12);
|
dev_priv->status_gfx_addr = hws->addr & (0x1ffff<<12);
|
||||||
|
|
||||||
|
@@ -57,8 +57,8 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
|
|||||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||||
|
|
||||||
if (!dev || !dev_priv) {
|
if (!dev || !dev_priv) {
|
||||||
printk(KERN_ERR "dev: %p, dev_priv: %p\n", dev, dev_priv);
|
DRM_ERROR("dev: %p, dev_priv: %p\n", dev, dev_priv);
|
||||||
printk(KERN_ERR "DRM not initialized, aborting suspend.\n");
|
DRM_ERROR("DRM not initialized, aborting suspend.\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -246,7 +246,7 @@ intel_dp_aux_ch(struct intel_output *intel_output,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((status & DP_AUX_CH_CTL_DONE) == 0) {
|
if ((status & DP_AUX_CH_CTL_DONE) == 0) {
|
||||||
printk(KERN_ERR "dp_aux_ch not done status 0x%08x\n", status);
|
DRM_ERROR("dp_aux_ch not done status 0x%08x\n", status);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,11 +254,14 @@ intel_dp_aux_ch(struct intel_output *intel_output,
|
|||||||
* Timeouts occur when the sink is not connected
|
* Timeouts occur when the sink is not connected
|
||||||
*/
|
*/
|
||||||
if (status & DP_AUX_CH_CTL_RECEIVE_ERROR) {
|
if (status & DP_AUX_CH_CTL_RECEIVE_ERROR) {
|
||||||
printk(KERN_ERR "dp_aux_ch receive error status 0x%08x\n", status);
|
DRM_ERROR("dp_aux_ch receive error status 0x%08x\n", status);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Timeouts occur when the device isn't connected, so they're
|
||||||
|
* "normal" -- don't fill the kernel log with these */
|
||||||
if (status & DP_AUX_CH_CTL_TIME_OUT_ERROR) {
|
if (status & DP_AUX_CH_CTL_TIME_OUT_ERROR) {
|
||||||
printk(KERN_ERR "dp_aux_ch timeout status 0x%08x\n", status);
|
DRM_DEBUG("dp_aux_ch timeout status 0x%08x\n", status);
|
||||||
return -ETIMEDOUT;
|
return -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -411,7 +414,7 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode,
|
|||||||
dp_priv->link_bw = bws[clock];
|
dp_priv->link_bw = bws[clock];
|
||||||
dp_priv->lane_count = lane_count;
|
dp_priv->lane_count = lane_count;
|
||||||
adjusted_mode->clock = intel_dp_link_clock(dp_priv->link_bw);
|
adjusted_mode->clock = intel_dp_link_clock(dp_priv->link_bw);
|
||||||
printk(KERN_ERR "link bw %02x lane count %d clock %d\n",
|
DRM_DEBUG("Display port link bw %02x lane count %d clock %d\n",
|
||||||
dp_priv->link_bw, dp_priv->lane_count,
|
dp_priv->link_bw, dp_priv->lane_count,
|
||||||
adjusted_mode->clock);
|
adjusted_mode->clock);
|
||||||
return true;
|
return true;
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/i2c.h>
|
#include <linux/i2c.h>
|
||||||
#include "intel_dp.h"
|
#include "intel_dp.h"
|
||||||
|
#include "drmP.h"
|
||||||
|
|
||||||
/* Run a single AUX_CH I2C transaction, writing/reading data as necessary */
|
/* Run a single AUX_CH I2C transaction, writing/reading data as necessary */
|
||||||
|
|
||||||
@@ -84,7 +85,7 @@ i2c_algo_dp_aux_transaction(struct i2c_adapter *adapter, int mode,
|
|||||||
msg, msg_bytes,
|
msg, msg_bytes,
|
||||||
reply, reply_bytes);
|
reply, reply_bytes);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
printk(KERN_ERR "aux_ch failed %d\n", ret);
|
DRM_DEBUG("aux_ch failed %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
switch (reply[0] & AUX_I2C_REPLY_MASK) {
|
switch (reply[0] & AUX_I2C_REPLY_MASK) {
|
||||||
@@ -94,14 +95,14 @@ i2c_algo_dp_aux_transaction(struct i2c_adapter *adapter, int mode,
|
|||||||
}
|
}
|
||||||
return reply_bytes - 1;
|
return reply_bytes - 1;
|
||||||
case AUX_I2C_REPLY_NACK:
|
case AUX_I2C_REPLY_NACK:
|
||||||
printk(KERN_ERR "aux_ch nack\n");
|
DRM_DEBUG("aux_ch nack\n");
|
||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
case AUX_I2C_REPLY_DEFER:
|
case AUX_I2C_REPLY_DEFER:
|
||||||
printk(KERN_ERR "aux_ch defer\n");
|
DRM_DEBUG("aux_ch defer\n");
|
||||||
udelay(100);
|
udelay(100);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printk(KERN_ERR "aux_ch invalid reply 0x%02x\n", reply[0]);
|
DRM_ERROR("aux_ch invalid reply 0x%02x\n", reply[0]);
|
||||||
return -EREMOTEIO;
|
return -EREMOTEIO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -223,7 +224,7 @@ i2c_algo_dp_aux_xfer(struct i2c_adapter *adapter,
|
|||||||
if (ret >= 0)
|
if (ret >= 0)
|
||||||
ret = num;
|
ret = num;
|
||||||
i2c_algo_dp_aux_stop(adapter, reading);
|
i2c_algo_dp_aux_stop(adapter, reading);
|
||||||
printk(KERN_ERR "dp_aux_xfer return %d\n", ret);
|
DRM_DEBUG("dp_aux_xfer return %d\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -453,7 +453,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
|
|||||||
size = ALIGN(size, PAGE_SIZE);
|
size = ALIGN(size, PAGE_SIZE);
|
||||||
fbo = drm_gem_object_alloc(dev, size);
|
fbo = drm_gem_object_alloc(dev, size);
|
||||||
if (!fbo) {
|
if (!fbo) {
|
||||||
printk(KERN_ERR "failed to allocate framebuffer\n");
|
DRM_ERROR("failed to allocate framebuffer\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@@ -610,8 +610,8 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
|
|||||||
par->dev = dev;
|
par->dev = dev;
|
||||||
|
|
||||||
/* To allow resizeing without swapping buffers */
|
/* To allow resizeing without swapping buffers */
|
||||||
printk("allocated %dx%d fb: 0x%08x, bo %p\n", intel_fb->base.width,
|
DRM_DEBUG("allocated %dx%d fb: 0x%08x, bo %p\n", intel_fb->base.width,
|
||||||
intel_fb->base.height, obj_priv->gtt_offset, fbo);
|
intel_fb->base.height, obj_priv->gtt_offset, fbo);
|
||||||
|
|
||||||
mutex_unlock(&dev->struct_mutex);
|
mutex_unlock(&dev->struct_mutex);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -698,13 +698,13 @@ static int intelfb_multi_fb_probe_crtc(struct drm_device *dev, struct drm_crtc *
|
|||||||
} else
|
} else
|
||||||
intelfb_set_par(info);
|
intelfb_set_par(info);
|
||||||
|
|
||||||
printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node,
|
DRM_INFO("fb%d: %s frame buffer device\n", info->node,
|
||||||
info->fix.id);
|
info->fix.id);
|
||||||
|
|
||||||
/* Switch back to kernel console on panic */
|
/* Switch back to kernel console on panic */
|
||||||
kernelfb_mode = *modeset;
|
kernelfb_mode = *modeset;
|
||||||
atomic_notifier_chain_register(&panic_notifier_list, &paniced);
|
atomic_notifier_chain_register(&panic_notifier_list, &paniced);
|
||||||
printk(KERN_INFO "registered panic notifier\n");
|
DRM_DEBUG("registered panic notifier\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -852,13 +852,13 @@ static int intelfb_single_fb_probe(struct drm_device *dev)
|
|||||||
} else
|
} else
|
||||||
intelfb_set_par(info);
|
intelfb_set_par(info);
|
||||||
|
|
||||||
printk(KERN_INFO "fb%d: %s frame buffer device\n", info->node,
|
DRM_INFO("fb%d: %s frame buffer device\n", info->node,
|
||||||
info->fix.id);
|
info->fix.id);
|
||||||
|
|
||||||
/* Switch back to kernel console on panic */
|
/* Switch back to kernel console on panic */
|
||||||
kernelfb_mode = *modeset;
|
kernelfb_mode = *modeset;
|
||||||
atomic_notifier_chain_register(&panic_notifier_list, &paniced);
|
atomic_notifier_chain_register(&panic_notifier_list, &paniced);
|
||||||
printk(KERN_INFO "registered panic notifier\n");
|
DRM_DEBUG("registered panic notifier\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -872,8 +872,8 @@ void intelfb_restore(void)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
if ((ret = drm_crtc_helper_set_config(&kernelfb_mode)) != 0) {
|
if ((ret = drm_crtc_helper_set_config(&kernelfb_mode)) != 0) {
|
||||||
printk(KERN_ERR "Failed to restore crtc configuration: %d\n",
|
DRM_ERROR("Failed to restore crtc configuration: %d\n",
|
||||||
ret);
|
ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -252,14 +252,14 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
|
|||||||
|
|
||||||
/* Should never happen!! */
|
/* Should never happen!! */
|
||||||
if (!IS_I965G(dev) && intel_crtc->pipe == 0) {
|
if (!IS_I965G(dev) && intel_crtc->pipe == 0) {
|
||||||
printk(KERN_ERR "Can't support LVDS on pipe A\n");
|
DRM_ERROR("Can't support LVDS on pipe A\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Should never happen!! */
|
/* Should never happen!! */
|
||||||
list_for_each_entry(tmp_encoder, &dev->mode_config.encoder_list, head) {
|
list_for_each_entry(tmp_encoder, &dev->mode_config.encoder_list, head) {
|
||||||
if (tmp_encoder != encoder && tmp_encoder->crtc == encoder->crtc) {
|
if (tmp_encoder != encoder && tmp_encoder->crtc == encoder->crtc) {
|
||||||
printk(KERN_ERR "Can't enable LVDS and another "
|
DRM_ERROR("Can't enable LVDS and another "
|
||||||
"encoder on the same pipe\n");
|
"encoder on the same pipe\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user