Displaying 1 result from an estimated 1 matches for "nr_runout".
2015 Mar 29
1
[PATCH] nouveau: synchronize "scratch runout" destruction with the command stream
...;
+};
+
+static void
+unref_bos(void *d)
+{
+ struct bos *b = d;
+ int i;
+
+ for (i = 0; i < b->nr; ++i)
+ nouveau_bo_ref(NULL, &b->arr[i]);
+
+ FREE(b->arr);
+ FREE(b);
+}
+
void
nouveau_scratch_runout_release(struct nouveau_context *nv)
{
if (!nv->scratch.nr_runout)
return;
- do {
- --nv->scratch.nr_runout;
- nouveau_bo_ref(NULL, &nv->scratch.runout[nv->scratch.nr_runout]);
- } while (nv->scratch.nr_runout);
- FREE(nv->scratch.runout);
+ struct bos *b = MALLOC(sizeof(*b));
+ b->arr = nv->scratch.runout;
+...