diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-11-09 09:21:27 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-01-11 11:17:40 +1000 |
commit | f01c4e682c941ba70e0ebec44db754844a1b9b82 (patch) | |
tree | 4b79c3e1b8afeaaae0143565a8ad0320fa9751dc /drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c | |
parent | 13db6d6ea7190a377af31246016af66803766588 (diff) |
drm/nouveau/nvif: modify nvif_unvers/nvif_unpack macros to be more obvious
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c index d73f1c6e3254..f535f43231e2 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/rootnv04.c @@ -46,10 +46,10 @@ nv04_disp_scanoutpos(struct nv04_disp_root *root, struct nv04_disp_scanoutpos_v0 v0; } *args = data; u32 line; - int ret; + int ret = -ENOSYS; nvif_ioctl(object, "disp scanoutpos size %d\n", size); - if (nvif_unpack(args->v0, 0, 0, false)) { + if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, false))) { nvif_ioctl(object, "disp scanoutpos vers %d\n", args->v0.version); args->v0.vblanks = nvkm_rd32(device, 0x680800 + hoff) & 0xffff; @@ -86,10 +86,10 @@ nv04_disp_mthd(struct nvkm_object *object, u32 mthd, void *data, u32 size) union { struct nv04_disp_mthd_v0 v0; } *args = data; - int head, ret; + int head, ret = -ENOSYS; nvif_ioctl(object, "disp mthd size %d\n", size); - if (nvif_unpack(args->v0, 0, 0, true)) { + if (!(ret = nvif_unpack(ret, &data, &size, args->v0, 0, 0, true))) { nvif_ioctl(object, "disp mthd vers %d mthd %02x head %d\n", args->v0.version, args->v0.method, args->v0.head); mthd = args->v0.method; |