drm/nouveau/i2c/g94-: return REPLY_M value on reads
authorBen Skeggs <bskeggs@redhat.com>
Tue, 28 Feb 2017 23:38:29 +0000 (09:38 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 7 Mar 2017 07:05:16 +0000 (17:05 +1000)
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>
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxg94.c
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/auxgm200.c

index dc96afb7793c034e468610d42029cd006e404664..ab8cb196c34e73202c288c7dc24a14a88a18b78f 100644 (file)
@@ -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:
index 50e79a9106a07e782c9144878c986883f7577365..ee091fa79628e1da1864d230731d4dd8e94e5cfa 100644 (file)
@@ -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: