diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-02-09 01:08:34 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-02-09 03:50:43 +0100 |
commit | 1ee7698fc3ec3d7949fa55e5154c8f5de8f1c3d9 (patch) | |
tree | a75f98cc8ec56ae9ed0f238622a699f65059cf3e /drivers/gpu/drm | |
parent | drm/nv40: make INIT_COMPUTE_MEM a NOP, just like nv50 (diff) | |
download | linux-1ee7698fc3ec3d7949fa55e5154c8f5de8f1c3d9.tar.xz linux-1ee7698fc3ec3d7949fa55e5154c8f5de8f1c3d9.zip |
drm/nouveau: make dp auxch xfer len check for reads only
Writes don't return a count, and adding the check broke native DP.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index dd4937224220..f954ad93e81f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dp.c +++ b/drivers/gpu/drm/nouveau/nouveau_dp.c @@ -502,12 +502,12 @@ nouveau_dp_auxch(struct nouveau_i2c_chan *auxch, int cmd, int addr, break; } - if ((stat & NV50_AUXCH_STAT_COUNT) != data_nr) { - ret = -EREMOTEIO; - goto out; - } - if (cmd & 1) { + if ((stat & NV50_AUXCH_STAT_COUNT) != data_nr) { + ret = -EREMOTEIO; + goto out; + } + for (i = 0; i < 4; i++) { data32[i] = nv_rd32(dev, NV50_AUXCH_DATA_IN(index, i)); NV_DEBUG_KMS(dev, "rd %d: 0x%08x\n", i, data32[i]); |