summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDavid Airlie <airlied@asimov.stargames.com.au>2007-04-10 16:49:36 +1000
committerDavid Airlie <airlied@asimov.stargames.com.au>2007-04-10 16:49:36 +1000
commit50672adb3142abca743535a8e60c360ef47b2a08 (patch)
tree334b863077f39fae95830f843328dfdbd76d9c1d /linux-core
parentb9c7fa55e2c6685c4c533613ab14f305f033c353 (diff)
add sdvo debugging output
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/intel_sdvo.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/linux-core/intel_sdvo.c b/linux-core/intel_sdvo.c
index 4a954f9e..1b45afdb 100644
--- a/linux-core/intel_sdvo.c
+++ b/linux-core/intel_sdvo.c
@@ -209,11 +209,30 @@ static void intel_sdvo_write_cmd(struct drm_output *output, u8 cmd,
void *args, int args_len)
{
struct intel_output *intel_output = output->driver_private;
+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
int i;
+ if (1) {
+ printk("%s: W: %02X ", SDVO_NAME(sdvo_priv), cmd);
+ for (i = 0; i < args_len; i++)
+ printk("%02X ", ((u8 *)args)[i]);
+ for (; i < 8; i++)
+ printk(" ");
+ for (i = 0; i < sizeof(sdvo_cmd_names) / sizeof(sdvo_cmd_names[0]); i++) {
+ if (cmd == sdvo_cmd_names[i].cmd) {
+ printk("(%s)", sdvo_cmd_names[i].name);
+ break;
+ }
+ }
+ if (i == sizeof(sdvo_cmd_names)/ sizeof(sdvo_cmd_names[0]))
+ printk("(%02X)",cmd);
+ printk("\n");
+ }
+
for (i = 0; i < args_len; i++) {
intel_sdvo_write_byte(output, SDVO_I2C_ARG_0 - i, ((u8*)args)[i]);
}
+
intel_sdvo_write_byte(output, SDVO_I2C_OPCODE, cmd);
}
@@ -230,6 +249,8 @@ static const char *cmd_status_names[] = {
static u8 intel_sdvo_read_response(struct drm_output *output, void *response,
int response_len)
{
+ struct intel_output *intel_output = output->driver_private;
+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
int i;
u8 status;
@@ -242,6 +263,18 @@ static u8 intel_sdvo_read_response(struct drm_output *output, void *response,
/* read the return status */
intel_sdvo_read_byte(output, SDVO_I2C_CMD_STATUS, &status);
+ if (1) {
+ printk("%s: R: ", SDVO_NAME(sdvo_priv));
+ for (i = 0; i < response_len; i++)
+ printk("%02X ", ((u8 *)response)[i]);
+ for (; i < 8; i++)
+ printk(" ");
+ if (status <= SDVO_CMD_STATUS_SCALING_NOT_SUPP)
+ printk("(%s)", cmd_status_names[status]);
+ else
+ printk("(??? %d)", status);
+ printk("\n");
+ }
return status;
}