[Intel-gfx] [RFC] [Patch 2/5] [DRM/I915] :Replace DRM_DEBUG with DRM_DEBUG_KMS in intel_lvds

yakui_zhao yakui.zhao at intel.com
Tue Jun 2 08:10:49 CEST 2009


Use the DRM_DEBUG_KMS macro definition to print the debug info for
the LVDS.

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
---
 drivers/gpu/drm/i915/intel_lvds.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Index: linux-2.6/drivers/gpu/drm/i915/intel_lvds.c
===================================================================
--- linux-2.6.orig/drivers/gpu/drm/i915/intel_lvds.c	2009-06-02 13:14:19.000000000 +0800
+++ linux-2.6/drivers/gpu/drm/i915/intel_lvds.c	2009-06-02 13:26:37.000000000 +0800
@@ -42,6 +42,7 @@
  *
  * \param level backlight level, from 0 to intel_lvds_get_max_backlight().
  */
+#define I915_LVDS	"i915_lvds"
 static void intel_lvds_set_backlight(struct drm_device *dev, int level)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
@@ -386,7 +387,8 @@
 
 static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
 {
-	DRM_DEBUG("Skipping LVDS initialization for %s\n", id->ident);
+	DRM_DEBUG_KMS(I915_LVDS, "Skipping LVDS initialization for %s\n",
+			id->ident);
 	return 1;
 }
 
@@ -497,6 +499,7 @@
 	 * Attempt to get the fixed panel mode from DDC.  Assume that the
 	 * preferred mode is the right one.
 	 */
+	DRM_DEBUG_KMS(I915_LVDS, "Attempting to get the fixed panel mode\n");
 	intel_ddc_get_modes(intel_output);
 
 	list_for_each_entry(scan, &connector->probed_modes, head) {
@@ -509,6 +512,7 @@
 		}
 		mutex_unlock(&dev->mode_config.mutex);
 	}
+	DRM_DEBUG_KMS(I915_LVDS, "Failure in EDID, fall back to VBT\n");
 	/* Failed to get EDID, what about VBT? */
 	if (dev_priv->lfp_lvds_vbt_mode) {
 		mutex_lock(&dev->mode_config.mutex);
@@ -527,6 +531,8 @@
 	 * on.  If so, assume that whatever is currently programmed is the
 	 * correct mode.
 	 */
+	DRM_DEBUG_KMS(I915_LVDS, "Fall back to check if the panel is "
+				"turned on\n");
 	lvds = I915_READ(LVDS);
 	pipe = (lvds & LVDS_PIPEB_SELECT) ? 1 : 0;
 	crtc = intel_get_crtc_from_pipe(dev, pipe);
@@ -549,7 +555,7 @@
 	return;
 
 failed:
-	DRM_DEBUG("No LVDS modes found, disabling.\n");
+	DRM_DEBUG_KMS(I915_LVDS, "No LVDS modes found, disabling.\n");
 	if (intel_output->ddc_bus)
 		intel_i2c_destroy(intel_output->ddc_bus);
 	drm_connector_cleanup(connector);





More information about the Intel-gfx mailing list