Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154341
b: refs/heads/master
c: a5b3da5
h: refs/heads/master
i:
  154339: 48488a0
v: v3
  • Loading branch information
Keith Packard committed Jun 18, 2009
1 parent a5bcd2e commit 7b08152
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b11248df4c0decb1e473d5025f237be32c0f67bb
refs/heads/master: a5b3da543d4882d57a2f3e05d37ad8e1e1453489
20 changes: 13 additions & 7 deletions trunk/drivers/gpu/drm/i915/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,19 @@ intel_dp_aux_ch(struct intel_output *intel_output,

if ((status & DP_AUX_CH_CTL_DONE) == 0) {
printk(KERN_ERR "dp_aux_ch not done status 0x%08x\n", status);
return -1;
return -EBUSY;
}

/* Check for timeout or receive error.
* Timeouts occur when the sink is not connected
*/
if (status & (DP_AUX_CH_CTL_TIME_OUT_ERROR | DP_AUX_CH_CTL_RECEIVE_ERROR)) {
printk(KERN_ERR "dp_aux_ch error status 0x%08x\n", status);
return -1;
if (status & DP_AUX_CH_CTL_RECEIVE_ERROR) {
printk(KERN_ERR "dp_aux_ch receive error status 0x%08x\n", status);
return -EIO;
}
if (status & DP_AUX_CH_CTL_TIME_OUT_ERROR) {
printk(KERN_ERR "dp_aux_ch timeout status 0x%08x\n", status);
return -ETIMEDOUT;
}

/* Unload any bytes sent back from the other side */
Expand Down Expand Up @@ -263,7 +267,7 @@ intel_dp_aux_native_write(struct intel_output *intel_output,
else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
udelay(100);
else
return -1;
return -EIO;
}
return send_bytes;
}
Expand Down Expand Up @@ -299,7 +303,9 @@ intel_dp_aux_native_read(struct intel_output *intel_output,
for (;;) {
ret = intel_dp_aux_ch(intel_output, msg, msg_bytes,
reply, reply_bytes);
if (ret <= 0)
if (ret == 0)
return -EPROTO;
if (ret < 0)
return ret;
ack = reply[0];
if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) {
Expand All @@ -309,7 +315,7 @@ intel_dp_aux_native_read(struct intel_output *intel_output,
else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER)
udelay(100);
else
return -1;
return -EIO;
}
}

Expand Down

0 comments on commit 7b08152

Please sign in to comment.