diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2009-07-20 01:48:04 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-08-04 00:02:31 -0400 |
commit | 8a4c47f346cc7a12d0897c05eb3cc1add26b487f (patch) | |
tree | 3beb08565466a2aa5649debd9dad411388afa53a /drivers/gpu/drm/i915/intel_sdvo.c | |
parent | 5c61259e6c7290082108e93815f7f72f27da14f4 (diff) |
drm: Remove the unused prefix in DRM_DEBUG_KMS/DRIVER/MODE
We will have to add a prefix when using the macro defintion of DRM_DEBUG_KMS
/DRM_DEBUG_DRIVER/MODE. It is not convenient. We should use the DRM_NAME
as default prefix.
So remove the prefix in the macro definition of DRM_DEBUG_KMS/DRIVER/MODE.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 4f0c30948bc4..abef69c8a49a 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include "intel_sdvo_regs.h" | 36 | #include "intel_sdvo_regs.h" |
37 | 37 | ||
38 | #undef SDVO_DEBUG | 38 | #undef SDVO_DEBUG |
39 | #define I915_SDVO "i915_sdvo" | ||
40 | struct intel_sdvo_priv { | 39 | struct intel_sdvo_priv { |
41 | u8 slave_addr; | 40 | u8 slave_addr; |
42 | 41 | ||
@@ -178,7 +177,7 @@ static bool intel_sdvo_read_byte(struct intel_output *intel_output, u8 addr, | |||
178 | return true; | 177 | return true; |
179 | } | 178 | } |
180 | 179 | ||
181 | DRM_DEBUG("i2c transfer returned %d\n", ret); | 180 | DRM_DEBUG_KMS("i2c transfer returned %d\n", ret); |
182 | return false; | 181 | return false; |
183 | } | 182 | } |
184 | 183 | ||
@@ -288,7 +287,7 @@ static void intel_sdvo_debug_write(struct intel_output *intel_output, u8 cmd, | |||
288 | struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; | 287 | struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; |
289 | int i; | 288 | int i; |
290 | 289 | ||
291 | DRM_DEBUG_KMS(I915_SDVO, "%s: W: %02X ", | 290 | DRM_DEBUG_KMS("%s: W: %02X ", |
292 | SDVO_NAME(sdvo_priv), cmd); | 291 | SDVO_NAME(sdvo_priv), cmd); |
293 | for (i = 0; i < args_len; i++) | 292 | for (i = 0; i < args_len; i++) |
294 | DRM_LOG_KMS("%02X ", ((u8 *)args)[i]); | 293 | DRM_LOG_KMS("%02X ", ((u8 *)args)[i]); |
@@ -341,7 +340,7 @@ static void intel_sdvo_debug_response(struct intel_output *intel_output, | |||
341 | struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; | 340 | struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; |
342 | int i; | 341 | int i; |
343 | 342 | ||
344 | DRM_DEBUG_KMS(I915_SDVO, "%s: R: ", SDVO_NAME(sdvo_priv)); | 343 | DRM_DEBUG_KMS("%s: R: ", SDVO_NAME(sdvo_priv)); |
345 | for (i = 0; i < response_len; i++) | 344 | for (i = 0; i < response_len; i++) |
346 | DRM_LOG_KMS("%02X ", ((u8 *)response)[i]); | 345 | DRM_LOG_KMS("%02X ", ((u8 *)response)[i]); |
347 | for (; i < 8; i++) | 346 | for (; i < 8; i++) |
@@ -658,10 +657,10 @@ static int intel_sdvo_get_clock_rate_mult(struct intel_output *intel_output) | |||
658 | status = intel_sdvo_read_response(intel_output, &response, 1); | 657 | status = intel_sdvo_read_response(intel_output, &response, 1); |
659 | 658 | ||
660 | if (status != SDVO_CMD_STATUS_SUCCESS) { | 659 | if (status != SDVO_CMD_STATUS_SUCCESS) { |
661 | DRM_DEBUG("Couldn't get SDVO clock rate multiplier\n"); | 660 | DRM_DEBUG_KMS("Couldn't get SDVO clock rate multiplier\n"); |
662 | return SDVO_CLOCK_RATE_MULT_1X; | 661 | return SDVO_CLOCK_RATE_MULT_1X; |
663 | } else { | 662 | } else { |
664 | DRM_DEBUG("Current clock rate multiplier: %d\n", response); | 663 | DRM_DEBUG_KMS("Current clock rate multiplier: %d\n", response); |
665 | } | 664 | } |
666 | 665 | ||
667 | return response; | 666 | return response; |
@@ -942,14 +941,14 @@ static void intel_sdvo_set_tv_format(struct intel_output *output) | |||
942 | format = &sdvo_priv->tv_format; | 941 | format = &sdvo_priv->tv_format; |
943 | memset(&unset, 0, sizeof(unset)); | 942 | memset(&unset, 0, sizeof(unset)); |
944 | if (memcmp(format, &unset, sizeof(*format))) { | 943 | if (memcmp(format, &unset, sizeof(*format))) { |
945 | DRM_DEBUG("%s: Choosing default TV format of NTSC-M\n", | 944 | DRM_DEBUG_KMS("%s: Choosing default TV format of NTSC-M\n", |
946 | SDVO_NAME(sdvo_priv)); | 945 | SDVO_NAME(sdvo_priv)); |
947 | format->ntsc_m = 1; | 946 | format->ntsc_m = 1; |
948 | intel_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, format, | 947 | intel_sdvo_write_cmd(output, SDVO_CMD_SET_TV_FORMAT, format, |
949 | sizeof(*format)); | 948 | sizeof(*format)); |
950 | status = intel_sdvo_read_response(output, NULL, 0); | 949 | status = intel_sdvo_read_response(output, NULL, 0); |
951 | if (status != SDVO_CMD_STATUS_SUCCESS) | 950 | if (status != SDVO_CMD_STATUS_SUCCESS) |
952 | DRM_DEBUG("%s: Failed to set TV format\n", | 951 | DRM_DEBUG_KMS("%s: Failed to set TV format\n", |
953 | SDVO_NAME(sdvo_priv)); | 952 | SDVO_NAME(sdvo_priv)); |
954 | } | 953 | } |
955 | } | 954 | } |
@@ -1220,8 +1219,8 @@ static void intel_sdvo_dpms(struct drm_encoder *encoder, int mode) | |||
1220 | * a given it the status is a success, we succeeded. | 1219 | * a given it the status is a success, we succeeded. |
1221 | */ | 1220 | */ |
1222 | if (status == SDVO_CMD_STATUS_SUCCESS && !input1) { | 1221 | if (status == SDVO_CMD_STATUS_SUCCESS && !input1) { |
1223 | DRM_DEBUG("First %s output reported failure to sync\n", | 1222 | DRM_DEBUG_KMS("First %s output reported failure to " |
1224 | SDVO_NAME(sdvo_priv)); | 1223 | "sync\n", SDVO_NAME(sdvo_priv)); |
1225 | } | 1224 | } |
1226 | 1225 | ||
1227 | if (0) | 1226 | if (0) |
@@ -1316,8 +1315,8 @@ static void intel_sdvo_restore(struct drm_connector *connector) | |||
1316 | intel_wait_for_vblank(dev); | 1315 | intel_wait_for_vblank(dev); |
1317 | status = intel_sdvo_get_trained_inputs(intel_output, &input1, &input2); | 1316 | status = intel_sdvo_get_trained_inputs(intel_output, &input1, &input2); |
1318 | if (status == SDVO_CMD_STATUS_SUCCESS && !input1) | 1317 | if (status == SDVO_CMD_STATUS_SUCCESS && !input1) |
1319 | DRM_DEBUG("First %s output reported failure to sync\n", | 1318 | DRM_DEBUG_KMS("First %s output reported failure to " |
1320 | SDVO_NAME(sdvo_priv)); | 1319 | "sync\n", SDVO_NAME(sdvo_priv)); |
1321 | } | 1320 | } |
1322 | 1321 | ||
1323 | intel_sdvo_set_active_outputs(intel_output, sdvo_priv->save_active_outputs); | 1322 | intel_sdvo_set_active_outputs(intel_output, sdvo_priv->save_active_outputs); |
@@ -1395,7 +1394,7 @@ int intel_sdvo_supports_hotplug(struct drm_connector *connector) | |||
1395 | u8 response[2]; | 1394 | u8 response[2]; |
1396 | u8 status; | 1395 | u8 status; |
1397 | struct intel_output *intel_output; | 1396 | struct intel_output *intel_output; |
1398 | DRM_DEBUG("\n"); | 1397 | DRM_DEBUG_KMS("\n"); |
1399 | 1398 | ||
1400 | if (!connector) | 1399 | if (!connector) |
1401 | return 0; | 1400 | return 0; |
@@ -1460,7 +1459,7 @@ static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connect | |||
1460 | intel_sdvo_write_cmd(intel_output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0); | 1459 | intel_sdvo_write_cmd(intel_output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0); |
1461 | status = intel_sdvo_read_response(intel_output, &response, 2); | 1460 | status = intel_sdvo_read_response(intel_output, &response, 2); |
1462 | 1461 | ||
1463 | DRM_DEBUG("SDVO response %d %d\n", response[0], response[1]); | 1462 | DRM_DEBUG_KMS("SDVO response %d %d\n", response[0], response[1]); |
1464 | 1463 | ||
1465 | if (status != SDVO_CMD_STATUS_SUCCESS) | 1464 | if (status != SDVO_CMD_STATUS_SUCCESS) |
1466 | return connector_status_unknown; | 1465 | return connector_status_unknown; |
@@ -1905,8 +1904,7 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device) | |||
1905 | /* Read the regs to test if we can talk to the device */ | 1904 | /* Read the regs to test if we can talk to the device */ |
1906 | for (i = 0; i < 0x40; i++) { | 1905 | for (i = 0; i < 0x40; i++) { |
1907 | if (!intel_sdvo_read_byte(intel_output, i, &ch[i])) { | 1906 | if (!intel_sdvo_read_byte(intel_output, i, &ch[i])) { |
1908 | DRM_DEBUG_KMS(I915_SDVO, | 1907 | DRM_DEBUG_KMS("No SDVO device found on SDVO%c\n", |
1909 | "No SDVO device found on SDVO%c\n", | ||
1910 | output_device == SDVOB ? 'B' : 'C'); | 1908 | output_device == SDVOB ? 'B' : 'C'); |
1911 | goto err_i2c; | 1909 | goto err_i2c; |
1912 | } | 1910 | } |
@@ -1989,8 +1987,7 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device) | |||
1989 | 1987 | ||
1990 | sdvo_priv->controlled_output = 0; | 1988 | sdvo_priv->controlled_output = 0; |
1991 | memcpy (bytes, &sdvo_priv->caps.output_flags, 2); | 1989 | memcpy (bytes, &sdvo_priv->caps.output_flags, 2); |
1992 | DRM_DEBUG_KMS(I915_SDVO, | 1990 | DRM_DEBUG_KMS("%s: Unknown SDVO output type (0x%02x%02x)\n", |
1993 | "%s: Unknown SDVO output type (0x%02x%02x)\n", | ||
1994 | SDVO_NAME(sdvo_priv), | 1991 | SDVO_NAME(sdvo_priv), |
1995 | bytes[0], bytes[1]); | 1992 | bytes[0], bytes[1]); |
1996 | encoder_type = DRM_MODE_ENCODER_NONE; | 1993 | encoder_type = DRM_MODE_ENCODER_NONE; |
@@ -2022,7 +2019,7 @@ bool intel_sdvo_init(struct drm_device *dev, int output_device) | |||
2022 | &sdvo_priv->pixel_clock_max); | 2019 | &sdvo_priv->pixel_clock_max); |
2023 | 2020 | ||
2024 | 2021 | ||
2025 | DRM_DEBUG_KMS(I915_SDVO, "%s device VID/DID: %02X:%02X.%02X, " | 2022 | DRM_DEBUG_KMS("%s device VID/DID: %02X:%02X.%02X, " |
2026 | "clock range %dMHz - %dMHz, " | 2023 | "clock range %dMHz - %dMHz, " |
2027 | "input 1: %c, input 2: %c, " | 2024 | "input 1: %c, input 2: %c, " |
2028 | "output 1: %c, output 2: %c\n", | 2025 | "output 1: %c, output 2: %c\n", |