I'm looking at nouveau_bo.c in nouveau_bo_new() and I see some code like:

line 230:

nvbo->bo.mem.num_pages = size >> PAGE_SHIFT;


and

line 236

ret = ttm_bo_init(&drm->ttm.bdev, &nvbo->bo, size,
                          type, &nvbo->placement,
                          align >> PAGE_SHIFT, false, NULL, acc_size, sg,
                          nouveau_bo_del_ttm);


It doesn't seem to handle the case that {value} >> PAGE_SHIFT could
result in 0. I think "size >> PAGE_SHIFT" may be OK, but I'm not so
sure about "align >> PAGE_SHIFT".



Shouldn't these have something like MIN( ... ,1), i.e. it must be at
least one page of memory? Is there something else that is going on
that I'm missing?


Patrick
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to