diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
| -rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 083bec2e50f9..dba5147f4064 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
| @@ -36,8 +36,6 @@ | |||
| 36 | #include "i915_drv.h" | 36 | #include "i915_drv.h" |
| 37 | #include "intel_sdvo_regs.h" | 37 | #include "intel_sdvo_regs.h" |
| 38 | 38 | ||
| 39 | #undef SDVO_DEBUG | ||
| 40 | |||
| 41 | static char *tv_format_names[] = { | 39 | static char *tv_format_names[] = { |
| 42 | "NTSC_M" , "NTSC_J" , "NTSC_443", | 40 | "NTSC_M" , "NTSC_J" , "NTSC_443", |
| 43 | "PAL_B" , "PAL_D" , "PAL_G" , | 41 | "PAL_B" , "PAL_D" , "PAL_G" , |
| @@ -356,7 +354,6 @@ static const struct _sdvo_cmd_name { | |||
| 356 | #define SDVO_NAME(dev_priv) ((dev_priv)->output_device == SDVOB ? "SDVOB" : "SDVOC") | 354 | #define SDVO_NAME(dev_priv) ((dev_priv)->output_device == SDVOB ? "SDVOB" : "SDVOC") |
| 357 | #define SDVO_PRIV(output) ((struct intel_sdvo_priv *) (output)->dev_priv) | 355 | #define SDVO_PRIV(output) ((struct intel_sdvo_priv *) (output)->dev_priv) |
| 358 | 356 | ||
| 359 | #ifdef SDVO_DEBUG | ||
| 360 | static void intel_sdvo_debug_write(struct intel_output *intel_output, u8 cmd, | 357 | static void intel_sdvo_debug_write(struct intel_output *intel_output, u8 cmd, |
| 361 | void *args, int args_len) | 358 | void *args, int args_len) |
| 362 | { | 359 | { |
| @@ -379,9 +376,6 @@ static void intel_sdvo_debug_write(struct intel_output *intel_output, u8 cmd, | |||
| 379 | DRM_LOG_KMS("(%02X)", cmd); | 376 | DRM_LOG_KMS("(%02X)", cmd); |
| 380 | DRM_LOG_KMS("\n"); | 377 | DRM_LOG_KMS("\n"); |
| 381 | } | 378 | } |
| 382 | #else | ||
| 383 | #define intel_sdvo_debug_write(o, c, a, l) | ||
| 384 | #endif | ||
| 385 | 379 | ||
| 386 | static void intel_sdvo_write_cmd(struct intel_output *intel_output, u8 cmd, | 380 | static void intel_sdvo_write_cmd(struct intel_output *intel_output, u8 cmd, |
| 387 | void *args, int args_len) | 381 | void *args, int args_len) |
| @@ -398,7 +392,6 @@ static void intel_sdvo_write_cmd(struct intel_output *intel_output, u8 cmd, | |||
| 398 | intel_sdvo_write_byte(intel_output, SDVO_I2C_OPCODE, cmd); | 392 | intel_sdvo_write_byte(intel_output, SDVO_I2C_OPCODE, cmd); |
| 399 | } | 393 | } |
| 400 | 394 | ||
| 401 | #ifdef SDVO_DEBUG | ||
| 402 | static const char *cmd_status_names[] = { | 395 | static const char *cmd_status_names[] = { |
| 403 | "Power on", | 396 | "Power on", |
| 404 | "Success", | 397 | "Success", |
| @@ -427,9 +420,6 @@ static void intel_sdvo_debug_response(struct intel_output *intel_output, | |||
| 427 | DRM_LOG_KMS("(??? %d)", status); | 420 | DRM_LOG_KMS("(??? %d)", status); |
| 428 | DRM_LOG_KMS("\n"); | 421 | DRM_LOG_KMS("\n"); |
| 429 | } | 422 | } |
| 430 | #else | ||
| 431 | #define intel_sdvo_debug_response(o, r, l, s) | ||
| 432 | #endif | ||
| 433 | 423 | ||
| 434 | static u8 intel_sdvo_read_response(struct intel_output *intel_output, | 424 | static u8 intel_sdvo_read_response(struct intel_output *intel_output, |
| 435 | void *response, int response_len) | 425 | void *response, int response_len) |
| @@ -1627,6 +1617,10 @@ static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connect | |||
| 1627 | 1617 | ||
| 1628 | intel_sdvo_write_cmd(intel_output, | 1618 | intel_sdvo_write_cmd(intel_output, |
| 1629 | SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0); | 1619 | SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0); |
| 1620 | if (sdvo_priv->is_tv) { | ||
| 1621 | /* add 30ms delay when the output type is SDVO-TV */ | ||
| 1622 | mdelay(30); | ||
| 1623 | } | ||
| 1630 | status = intel_sdvo_read_response(intel_output, &response, 2); | 1624 | status = intel_sdvo_read_response(intel_output, &response, 2); |
| 1631 | 1625 | ||
| 1632 | DRM_DEBUG_KMS("SDVO response %d %d\n", response & 0xff, response >> 8); | 1626 | DRM_DEBUG_KMS("SDVO response %d %d\n", response & 0xff, response >> 8); |
