Lines Matching full:count

58 	weight = bitmap_weight(dbm->bitmap, dbm->count);
63 weight, dbm->count);
69 dbm->count = 0;
77 * @count: number of doorbells to manage
79 * The bare-metal or PF driver can pass ~0 as &count to indicate that all
87 int xe_guc_db_mgr_init(struct xe_guc_db_mgr *dbm, unsigned int count)
91 if (count == ~0)
92 count = GUC_NUM_DOORBELLS;
95 dbm_assert(dbm, count <= GUC_NUM_DOORBELLS);
97 if (!count)
100 dbm->bitmap = bitmap_zalloc(count, GFP_KERNEL);
103 dbm->count = count;
110 dbm->count, str_plural(dbm->count));
115 unsigned int count, unsigned int spare)
120 dbm_assert(dbm, count);
121 dbm_assert(dbm, count <= GUC_NUM_DOORBELLS);
122 dbm_assert(dbm, dbm->count <= GUC_NUM_DOORBELLS);
125 if (!dbm->count)
129 used = bitmap_weight(dbm->bitmap, dbm->count);
130 if (used + count + spare > dbm->count)
134 index = bitmap_find_next_zero_area(dbm->bitmap, dbm->count, 0, count, 0);
135 if (index >= dbm->count)
138 bitmap_set(dbm->bitmap, index, count);
144 unsigned int start, unsigned int count)
146 dbm_assert(dbm, count);
147 dbm_assert(dbm, count <= GUC_NUM_DOORBELLS);
148 dbm_assert(dbm, dbm->count);
149 dbm_assert(dbm, dbm->count <= GUC_NUM_DOORBELLS);
155 for (n = 0; n < count; n++)
158 bitmap_clear(dbm->bitmap, start, count);
189 * @count: number of GuC doorbell IDs to reserve
200 unsigned int count, unsigned int spare)
205 ret = dbm_reserve_chunk_locked(dbm, count, spare);
215 * @count: number of GuC doorbell IDs to release
218 unsigned int start, unsigned int count)
221 dbm_release_chunk_locked(dbm, start, count);
230 drm_printf_indent(p, indent, "count: %u\n", dbm->count);
235 for_each_clear_bitrange(rs, re, dbm->bitmap, dbm->count) {
243 for_each_set_bitrange(rs, re, dbm->bitmap, dbm->count) {