aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvif
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 14:54:16 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 12:40:32 +1000
commit315a8b2edf51711857795ba6e02b843d7792b59c (patch)
treececd9681f6de04ee9ef80bdf23f76ae1861abd33 /drivers/gpu/drm/nouveau/nvif
parentdrm/nouveau/nvif: return success from sclass even for objects without children (diff)
downloadlinux-dev-315a8b2edf51711857795ba6e02b843d7792b59c.tar.xz
linux-dev-315a8b2edf51711857795ba6e02b843d7792b59c.zip
drm/nouveau/nvif: use negative oclass identifier for internal classes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvif')
-rw-r--r--drivers/gpu/drm/nouveau/nvif/device.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvif/object.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvif/device.c b/drivers/gpu/drm/nouveau/nvif/device.c
index f15d51a69df2..561fb9d7b155 100644
--- a/drivers/gpu/drm/nouveau/nvif/device.c
+++ b/drivers/gpu/drm/nouveau/nvif/device.c
@@ -37,7 +37,7 @@ nvif_device_fini(struct nvif_device *device)
}
int
-nvif_device_init(struct nvif_object *parent, u32 handle, u32 oclass,
+nvif_device_init(struct nvif_object *parent, u32 handle, s32 oclass,
void *data, u32 size, struct nvif_device *device)
{
int ret = nvif_object_init(parent, handle, oclass, data, size,
diff --git a/drivers/gpu/drm/nouveau/nvif/object.c b/drivers/gpu/drm/nouveau/nvif/object.c
index b914e34a43c3..0c09e6433fbb 100644
--- a/drivers/gpu/drm/nouveau/nvif/object.c
+++ b/drivers/gpu/drm/nouveau/nvif/object.c
@@ -49,7 +49,7 @@ nvif_object_ioctl(struct nvif_object *object, void *data, u32 size, void **hack)
}
int
-nvif_object_sclass(struct nvif_object *object, u32 *oclass, int count)
+nvif_object_sclass(struct nvif_object *object, s32 *oclass, int count)
{
struct {
struct nvif_ioctl_v0 ioctl;
@@ -65,7 +65,6 @@ nvif_object_sclass(struct nvif_object *object, u32 *oclass, int count)
args->sclass.version = 0;
args->sclass.count = count;
- memcpy(args->sclass.oclass, oclass, size);
ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL);
ret = ret ? ret : args->sclass.count;
memcpy(oclass, args->sclass.oclass, size);
@@ -203,7 +202,7 @@ nvif_object_fini(struct nvif_object *object)
}
int
-nvif_object_init(struct nvif_object *parent, u32 handle, u32 oclass,
+nvif_object_init(struct nvif_object *parent, u32 handle, s32 oclass,
void *data, u32 size, struct nvif_object *object)
{
struct {