aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authoryakui_zhao <yakui.zhao@intel.com>2009-06-02 02:12:00 -0400
committerDave Airlie <airlied@redhat.com>2009-06-11 04:40:44 -0400
commit342dc382c451f75ea202a65e6f529bdff6d184cd (patch)
tree9d776a21e2df65165b04fd620a0e9d86b06ab4ad /drivers/gpu/drm/i915
parent7fb85bfb54a64e9dd82ee4a79022c38ab58f21a0 (diff)
drm/i915: Replace DRM_DEBUG with DRM_DEBUG_KMS in intel_sdvo
Use the DRM_DEBUG_KMS/DEBUG_LOG_KMS to print the debug info for SDVO device. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c67
1 files changed, 35 insertions, 32 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index d8fb88d335cd..7cb9ddf1161e 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -36,7 +36,7 @@
36#include "intel_sdvo_regs.h" 36#include "intel_sdvo_regs.h"
37 37
38#undef SDVO_DEBUG 38#undef SDVO_DEBUG
39 39#define I915_SDVO "i915_sdvo"
40struct intel_sdvo_priv { 40struct intel_sdvo_priv {
41 struct intel_i2c_chan *i2c_bus; 41 struct intel_i2c_chan *i2c_bus;
42 int slaveaddr; 42 int slaveaddr;
@@ -277,20 +277,21 @@ static void intel_sdvo_debug_write(struct intel_output *intel_output, u8 cmd,
277 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; 277 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
278 int i; 278 int i;
279 279
280 printk(KERN_DEBUG "%s: W: %02X ", SDVO_NAME(sdvo_priv), cmd); 280 DRM_DEBUG_KMS(I915_SDVO, "%s: W: %02X ",
281 SDVO_NAME(sdvo_priv), cmd);
281 for (i = 0; i < args_len; i++) 282 for (i = 0; i < args_len; i++)
282 printk(KERN_DEBUG "%02X ", ((u8 *)args)[i]); 283 DRM_LOG_KMS("%02X ", ((u8 *)args)[i]);
283 for (; i < 8; i++) 284 for (; i < 8; i++)
284 printk(KERN_DEBUG " "); 285 DRM_LOG_KMS(" ");
285 for (i = 0; i < sizeof(sdvo_cmd_names) / sizeof(sdvo_cmd_names[0]); i++) { 286 for (i = 0; i < sizeof(sdvo_cmd_names) / sizeof(sdvo_cmd_names[0]); i++) {
286 if (cmd == sdvo_cmd_names[i].cmd) { 287 if (cmd == sdvo_cmd_names[i].cmd) {
287 printk(KERN_DEBUG "(%s)", sdvo_cmd_names[i].name); 288 DRM_LOG_KMS("(%s)", sdvo_cmd_names[i].name);
288 break; 289 break;
289 } 290 }
290 } 291 }
291 if (i == sizeof(sdvo_cmd_names)/ sizeof(sdvo_cmd_names[0])) 292 if (i == sizeof(sdvo_cmd_names)/ sizeof(sdvo_cmd_names[0]))
292 printk(KERN_DEBUG "(%02X)", cmd); 293 DRM_LOG_KMS("(%02X)", cmd);
293 printk(KERN_DEBUG "\n"); 294 DRM_LOG_KMS("\n");
294} 295}
295#else 296#else
296#define intel_sdvo_debug_write(o, c, a, l) 297#define intel_sdvo_debug_write(o, c, a, l)
@@ -329,16 +330,16 @@ static void intel_sdvo_debug_response(struct intel_output *intel_output,
329 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; 330 struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
330 int i; 331 int i;
331 332
332 printk(KERN_DEBUG "%s: R: ", SDVO_NAME(sdvo_priv)); 333 DRM_DEBUG_KMS(I915_SDVO, "%s: R: ", SDVO_NAME(sdvo_priv));
333 for (i = 0; i < response_len; i++) 334 for (i = 0; i < response_len; i++)
334 printk(KERN_DEBUG "%02X ", ((u8 *)response)[i]); 335 DRM_LOG_KMS("%02X ", ((u8 *)response)[i]);
335 for (; i < 8; i++) 336 for (; i < 8; i++)
336 printk(KERN_DEBUG " "); 337 DRM_LOG_KMS(" ");
337 if (status <= SDVO_CMD_STATUS_SCALING_NOT_SUPP) 338 if (status <= SDVO_CMD_STATUS_SCALING_NOT_SUPP)
338 printk(KERN_DEBUG "(%s)", cmd_status_names[status]); 339 DRM_LOG_KMS("(%s)", cmd_status_names[status]);
339 else 340 else
340 printk(KERN_DEBUG "(??? %d)", status); 341 DRM_LOG_KMS("(??? %d)", status);
341 printk(KERN_DEBUG "\n"); 342 DRM_LOG_KMS("\n");
342} 343}
343#else 344#else
344#define intel_sdvo_debug_response(o, r, l, s) 345#define intel_sdvo_debug_response(o, r, l, s)
@@ -1824,8 +1825,9 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
1824 /* Read the regs to test if we can talk to the device */ 1825 /* Read the regs to test if we can talk to the device */
1825 for (i = 0; i < 0x40; i++) { 1826 for (i = 0; i < 0x40; i++) {
1826 if (!intel_sdvo_read_byte(intel_output, i, &ch[i])) { 1827 if (!intel_sdvo_read_byte(intel_output, i, &ch[i])) {
1827 DRM_DEBUG("No SDVO device found on SDVO%c\n", 1828 DRM_DEBUG_KMS(I915_SDVO,
1828 output_device == SDVOB ? 'B' : 'C'); 1829 "No SDVO device found on SDVO%c\n",
1830 output_device == SDVOB ? 'B' : 'C');
1829 goto err_i2c; 1831 goto err_i2c;
1830 } 1832 }
1831 } 1833 }
@@ -1909,9 +1911,10 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
1909 1911
1910 sdvo_priv->controlled_output = 0; 1912 sdvo_priv->controlled_output = 0;
1911 memcpy (bytes, &sdvo_priv->caps.output_flags, 2); 1913 memcpy (bytes, &sdvo_priv->caps.output_flags, 2);
1912 DRM_DEBUG("%s: Unknown SDVO output type (0x%02x%02x)\n", 1914 DRM_DEBUG_KMS(I915_SDVO,
1913 SDVO_NAME(sdvo_priv), 1915 "%s: Unknown SDVO output type (0x%02x%02x)\n",
1914 bytes[0], bytes[1]); 1916 SDVO_NAME(sdvo_priv),
1917 bytes[0], bytes[1]);
1915 encoder_type = DRM_MODE_ENCODER_NONE; 1918 encoder_type = DRM_MODE_ENCODER_NONE;
1916 connector_type = DRM_MODE_CONNECTOR_Unknown; 1919 connector_type = DRM_MODE_CONNECTOR_Unknown;
1917 goto err_i2c; 1920 goto err_i2c;
@@ -1941,21 +1944,21 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device)
1941 &sdvo_priv->pixel_clock_max); 1944 &sdvo_priv->pixel_clock_max);
1942 1945
1943 1946
1944 DRM_DEBUG("%s device VID/DID: %02X:%02X.%02X, " 1947 DRM_DEBUG_KMS(I915_SDVO, "%s device VID/DID: %02X:%02X.%02X, "
1945 "clock range %dMHz - %dMHz, " 1948 "clock range %dMHz - %dMHz, "
1946 "input 1: %c, input 2: %c, " 1949 "input 1: %c, input 2: %c, "
1947 "output 1: %c, output 2: %c\n", 1950 "output 1: %c, output 2: %c\n",
1948 SDVO_NAME(sdvo_priv), 1951 SDVO_NAME(sdvo_priv),
1949 sdvo_priv->caps.vendor_id, sdvo_priv->caps.device_id, 1952 sdvo_priv->caps.vendor_id, sdvo_priv->caps.device_id,
1950 sdvo_priv->caps.device_rev_id, 1953 sdvo_priv->caps.device_rev_id,
1951 sdvo_priv->pixel_clock_min / 1000, 1954 sdvo_priv->pixel_clock_min / 1000,
1952 sdvo_priv->pixel_clock_max / 1000, 1955 sdvo_priv->pixel_clock_max / 1000,
1953 (sdvo_priv->caps.sdvo_inputs_mask & 0x1) ? 'Y' : 'N', 1956 (sdvo_priv->caps.sdvo_inputs_mask & 0x1) ? 'Y' : 'N',
1954 (sdvo_priv->caps.sdvo_inputs_mask & 0x2) ? 'Y' : 'N', 1957 (sdvo_priv->caps.sdvo_inputs_mask & 0x2) ? 'Y' : 'N',
1955 /* check currently supported outputs */ 1958 /* check currently supported outputs */
1956 sdvo_priv->caps.output_flags & 1959 sdvo_priv->caps.output_flags &
1957 (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_RGB0) ? 'Y' : 'N', 1960 (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_RGB0) ? 'Y' : 'N',
1958 sdvo_priv->caps.output_flags & 1961 sdvo_priv->caps.output_flags &
1959 (SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N'); 1962 (SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N');
1960 1963
1961 return true; 1964 return true;