Commit b554b12a authored by Thierry Reding's avatar Thierry Reding Committed by Ben Skeggs

drm/nouveau/drm/nouveau: Pass the proper arguments to nvif_object_map_handle()

This is obviously wrong in the current code. Make sure to record the
correct size of the arguments and pass the actual arguments to the
nvif_object_map_handle() function.
Suggested-by: default avatarBen Skeggs <>
Signed-off-by: default avatarThierry Reding <>
Signed-off-by: default avatarBen Skeggs <>
parent 1b5c7ef3
......@@ -1447,11 +1447,13 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *reg) = 0;
args.nv50.kind = mem->kind;
args.nv50.comp = mem->comp;
argc = sizeof(args.nv50);
args.gf100.version = 0; = 0;
args.gf100.kind = mem->kind;
argc = sizeof(args.gf100);
......@@ -1459,7 +1461,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *reg)
ret = nvif_object_map_handle(&mem->mem.object,
&argc, argc,
&args, argc,
&handle, &length);
if (ret != 1)
return ret ? ret : -EINVAL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment