mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 10:14:23 +08:00
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:
parent
956dba3caa
commit
1ae8c0a56e
@ -846,7 +846,7 @@ static int i915_set_status_page(struct drm_device *dev, void *data,
|
||||
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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
if (!dev || !dev_priv) {
|
||||
printk(KERN_ERR "dev: %p, dev_priv: %p\n", dev, dev_priv);
|
||||
printk(KERN_ERR "DRM not initialized, aborting suspend.\n");
|
||||
DRM_ERROR("dev: %p, dev_priv: %p\n", dev, dev_priv);
|
||||
DRM_ERROR("DRM not initialized, aborting suspend.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ intel_dp_aux_ch(struct intel_output *intel_output,
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@ -254,11 +254,14 @@ intel_dp_aux_ch(struct intel_output *intel_output,
|
||||
* Timeouts occur when the sink is not connected
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
/* 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) {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -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->lane_count = lane_count;
|
||||
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,
|
||||
adjusted_mode->clock);
|
||||
return true;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/i2c.h>
|
||||
#include "intel_dp.h"
|
||||
#include "drmP.h"
|
||||
|
||||
/* 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,
|
||||
reply, reply_bytes);
|
||||
if (ret < 0) {
|
||||
printk(KERN_ERR "aux_ch failed %d\n", ret);
|
||||
DRM_DEBUG("aux_ch failed %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
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;
|
||||
case AUX_I2C_REPLY_NACK:
|
||||
printk(KERN_ERR "aux_ch nack\n");
|
||||
DRM_DEBUG("aux_ch nack\n");
|
||||
return -EREMOTEIO;
|
||||
case AUX_I2C_REPLY_DEFER:
|
||||
printk(KERN_ERR "aux_ch defer\n");
|
||||
DRM_DEBUG("aux_ch defer\n");
|
||||
udelay(100);
|
||||
break;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -223,7 +224,7 @@ i2c_algo_dp_aux_xfer(struct i2c_adapter *adapter,
|
||||
if (ret >= 0)
|
||||
ret = num;
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -453,7 +453,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
|
||||
size = ALIGN(size, PAGE_SIZE);
|
||||
fbo = drm_gem_object_alloc(dev, size);
|
||||
if (!fbo) {
|
||||
printk(KERN_ERR "failed to allocate framebuffer\n");
|
||||
DRM_ERROR("failed to allocate framebuffer\n");
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
@ -610,8 +610,8 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
|
||||
par->dev = dev;
|
||||
|
||||
/* To allow resizeing without swapping buffers */
|
||||
printk("allocated %dx%d fb: 0x%08x, bo %p\n", intel_fb->base.width,
|
||||
intel_fb->base.height, obj_priv->gtt_offset, fbo);
|
||||
DRM_DEBUG("allocated %dx%d fb: 0x%08x, bo %p\n", intel_fb->base.width,
|
||||
intel_fb->base.height, obj_priv->gtt_offset, fbo);
|
||||
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
return 0;
|
||||
@ -698,13 +698,13 @@ static int intelfb_multi_fb_probe_crtc(struct drm_device *dev, struct drm_crtc *
|
||||
} else
|
||||
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);
|
||||
|
||||
/* Switch back to kernel console on panic */
|
||||
kernelfb_mode = *modeset;
|
||||
atomic_notifier_chain_register(&panic_notifier_list, &paniced);
|
||||
printk(KERN_INFO "registered panic notifier\n");
|
||||
DRM_DEBUG("registered panic notifier\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -852,13 +852,13 @@ static int intelfb_single_fb_probe(struct drm_device *dev)
|
||||
} else
|
||||
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);
|
||||
|
||||
/* Switch back to kernel console on panic */
|
||||
kernelfb_mode = *modeset;
|
||||
atomic_notifier_chain_register(&panic_notifier_list, &paniced);
|
||||
printk(KERN_INFO "registered panic notifier\n");
|
||||
DRM_DEBUG("registered panic notifier\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -872,8 +872,8 @@ void intelfb_restore(void)
|
||||
{
|
||||
int ret;
|
||||
if ((ret = drm_crtc_helper_set_config(&kernelfb_mode)) != 0) {
|
||||
printk(KERN_ERR "Failed to restore crtc configuration: %d\n",
|
||||
ret);
|
||||
DRM_ERROR("Failed to restore crtc configuration: %d\n",
|
||||
ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -252,14 +252,14 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
|
||||
|
||||
/* Should never happen!! */
|
||||
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;
|
||||
}
|
||||
|
||||
/* Should never happen!! */
|
||||
list_for_each_entry(tmp_encoder, &dev->mode_config.encoder_list, head) {
|
||||
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");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user