Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ae8c0a5 authored by Keith Packard's avatar Keith Packard Committed by Eric Anholt
Browse files

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: default avatarKeith Packard <keithp@keithp.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 956dba3c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);

+2 −2
Original line number Diff line number Diff line
@@ -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;
	}

+7 −4
Original line number Diff line number Diff line
@@ -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;
+6 −5
Original line number Diff line number Diff line
@@ -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;
}

+9 −9
Original line number Diff line number Diff line
@@ -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,7 +610,7 @@ 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,
	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);
@@ -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,7 +872,7 @@ 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",
		DRM_ERROR("Failed to restore crtc configuration: %d\n",
			  ret);
	}
}
Loading