diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-03-01 09:38:29 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-03-07 17:05:16 +1000 |
commit | 5c68d91ee072fcaae8c6c8dfa5a50a4ebf14bc96 (patch) | |
tree | dcedfc5dc69d9cb75566431fc9aff2a2b9504034 /drivers/gpu/drm | |
parent | 1af5c410cc0cae4808fd25e5cd88de303b8975fd (diff) | |
download | op-kernel-dev-5c68d91ee072fcaae8c6c8dfa5a50a4ebf14bc96.zip op-kernel-dev-5c68d91ee072fcaae8c6c8dfa5a50a4ebf14bc96.tar.gz |
drm/nouveau/i2c/g94-: return REPLY_M value on reads
This value represents the actual number of bytes recieved on the AUX
channel as the result of a read transaction.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c index dc96afb..ab8cb19 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c @@ -152,6 +152,7 @@ g94_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry, AUX_TRACE(&aux->base, "rd %08x", xbuf[i / 4]); } memcpy(data, xbuf, *size); + *size = stat & 0x0000001f; } out: diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c index 50e79a9..ee091fa 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c @@ -152,6 +152,7 @@ gm200_i2c_aux_xfer(struct nvkm_i2c_aux *obj, bool retry, AUX_TRACE(&aux->base, "rd %08x", xbuf[i / 4]); } memcpy(data, xbuf, *size); + *size = stat & 0x0000001f; } out: |