aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorZhenyu Wang <zhenyuw@linux.intel.com>2009-07-23 13:00:30 -0400
committerEric Anholt <eric@anholt.net>2009-07-29 18:16:06 -0400
commiteebc863e469cd91d96c4e3636450596ae29f0502 (patch)
tree2d61c5d289b81c233a81382bb2e757bb016bdab9 /drivers/gpu/drm/i915/intel_dp.c
parent249c0e64c24bf455a4e4815f72750f2b16cedd94 (diff)
drm/i915: Fix channel ending action for DP aux transaction
We should use current channel 'status' bits to clear DP aux channel's done and error bits, instead of using the channel setting bits, that will set send/busy bit again to initiate new transaction. This also includes also some minor cleanup. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 6770ae88370d..afec65c5ad8a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -236,7 +236,7 @@ intel_dp_aux_ch(struct intel_output *intel_output,
236 } 236 }
237 237
238 /* Clear done status and any errors */ 238 /* Clear done status and any errors */
239 I915_WRITE(ch_ctl, (ctl | 239 I915_WRITE(ch_ctl, (status |
240 DP_AUX_CH_CTL_DONE | 240 DP_AUX_CH_CTL_DONE |
241 DP_AUX_CH_CTL_TIME_OUT_ERROR | 241 DP_AUX_CH_CTL_TIME_OUT_ERROR |
242 DP_AUX_CH_CTL_RECEIVE_ERROR)); 242 DP_AUX_CH_CTL_RECEIVE_ERROR));
@@ -295,7 +295,7 @@ intel_dp_aux_native_write(struct intel_output *intel_output,
295 return -1; 295 return -1;
296 msg[0] = AUX_NATIVE_WRITE << 4; 296 msg[0] = AUX_NATIVE_WRITE << 4;
297 msg[1] = address >> 8; 297 msg[1] = address >> 8;
298 msg[2] = address; 298 msg[2] = address & 0xff;
299 msg[3] = send_bytes - 1; 299 msg[3] = send_bytes - 1;
300 memcpy(&msg[4], send, send_bytes); 300 memcpy(&msg[4], send, send_bytes);
301 msg_bytes = send_bytes + 4; 301 msg_bytes = send_bytes + 4;
@@ -387,8 +387,8 @@ intel_dp_i2c_init(struct intel_output *intel_output, const char *name)
387 memset(&dp_priv->adapter, '\0', sizeof (dp_priv->adapter)); 387 memset(&dp_priv->adapter, '\0', sizeof (dp_priv->adapter));
388 dp_priv->adapter.owner = THIS_MODULE; 388 dp_priv->adapter.owner = THIS_MODULE;
389 dp_priv->adapter.class = I2C_CLASS_DDC; 389 dp_priv->adapter.class = I2C_CLASS_DDC;
390 strncpy (dp_priv->adapter.name, name, sizeof dp_priv->adapter.name - 1); 390 strncpy (dp_priv->adapter.name, name, sizeof(dp_priv->adapter.name) - 1);
391 dp_priv->adapter.name[sizeof dp_priv->adapter.name - 1] = '\0'; 391 dp_priv->adapter.name[sizeof(dp_priv->adapter.name) - 1] = '\0';
392 dp_priv->adapter.algo_data = &dp_priv->algo; 392 dp_priv->adapter.algo_data = &dp_priv->algo;
393 dp_priv->adapter.dev.parent = &intel_output->base.kdev; 393 dp_priv->adapter.dev.parent = &intel_output->base.kdev;
394 394