Lines Matching +full:- +full:- +full:bins
52 struct nouveau_bufbin_priv bins[]; member
62 nouveau_bufctx_new(struct nouveau_client *client, int bins, in nouveau_bufctx_new() argument
67 priv = calloc(1, sizeof(*priv) + sizeof(priv->bins[0]) * bins); in nouveau_bufctx_new()
69 DRMINITLISTHEAD(&priv->base.head); in nouveau_bufctx_new()
70 DRMINITLISTHEAD(&priv->base.pending); in nouveau_bufctx_new()
71 DRMINITLISTHEAD(&priv->base.current); in nouveau_bufctx_new()
72 priv->base.client = client; in nouveau_bufctx_new()
73 priv->nr_bins = bins; in nouveau_bufctx_new()
74 *pbctx = &priv->base; in nouveau_bufctx_new()
78 return -ENOMEM; in nouveau_bufctx_new()
87 while (pctx->nr_bins--) in nouveau_bufctx_del()
88 nouveau_bufctx_reset(&pctx->base, pctx->nr_bins); in nouveau_bufctx_del()
89 while ((pref = pctx->free)) { in nouveau_bufctx_del()
90 pctx->free = pref->next; in nouveau_bufctx_del()
102 struct nouveau_bufbin_priv *pbin = &pctx->bins[bin]; in nouveau_bufctx_reset()
105 while ((pref = pbin->list)) { in nouveau_bufctx_reset()
106 DRMLISTDELINIT(&pref->base.thead); in nouveau_bufctx_reset()
107 pbin->list = pref->next; in nouveau_bufctx_reset()
108 pref->next = pctx->free; in nouveau_bufctx_reset()
109 pctx->free = pref; in nouveau_bufctx_reset()
112 bctx->relocs -= pbin->relocs; in nouveau_bufctx_reset()
113 pbin->relocs = 0; in nouveau_bufctx_reset()
121 struct nouveau_bufbin_priv *pbin = &pctx->bins[bin]; in nouveau_bufctx_refn()
122 struct nouveau_bufref_priv *pref = pctx->free; in nouveau_bufctx_refn()
127 pctx->free = pref->next; in nouveau_bufctx_refn()
130 pref->base.bo = bo; in nouveau_bufctx_refn()
131 pref->base.flags = flags; in nouveau_bufctx_refn()
132 pref->base.packet = 0; in nouveau_bufctx_refn()
134 DRMLISTADDTAIL(&pref->base.thead, &bctx->pending); in nouveau_bufctx_refn()
135 pref->bufctx = bctx; in nouveau_bufctx_refn()
136 pref->next = pbin->list; in nouveau_bufctx_refn()
137 pbin->list = pref; in nouveau_bufctx_refn()
140 return &pref->base; in nouveau_bufctx_refn()
149 struct nouveau_bufbin_priv *pbin = &pctx->bins[bin]; in nouveau_bufctx_mthd()
152 bref->packet = packet; in nouveau_bufctx_mthd()
153 bref->data = data; in nouveau_bufctx_mthd()
154 bref->vor = vor; in nouveau_bufctx_mthd()
155 bref->tor = tor; in nouveau_bufctx_mthd()
156 pbin->relocs++; in nouveau_bufctx_mthd()
157 bctx->relocs++; in nouveau_bufctx_mthd()