Lines Matching refs:chunks
296 chunk_array_ptr = (uint64_t *)(unsigned long)(cs->chunks); in radeon_cs_parser_init()
303 p->chunks = kcalloc(p->nchunks, sizeof(struct radeon_cs_chunk), GFP_KERNEL); in radeon_cs_parser_init()
304 if (p->chunks == NULL) { in radeon_cs_parser_init()
317 p->chunks[i].length_dw = user_chunk.length_dw; in radeon_cs_parser_init()
319 p->chunk_relocs = &p->chunks[i]; in radeon_cs_parser_init()
322 p->chunk_ib = &p->chunks[i]; in radeon_cs_parser_init()
324 if (p->chunks[i].length_dw == 0) in radeon_cs_parser_init()
328 p->chunk_const_ib = &p->chunks[i]; in radeon_cs_parser_init()
330 if (p->chunks[i].length_dw == 0) in radeon_cs_parser_init()
334 p->chunk_flags = &p->chunks[i]; in radeon_cs_parser_init()
336 if (p->chunks[i].length_dw == 0) in radeon_cs_parser_init()
340 size = p->chunks[i].length_dw; in radeon_cs_parser_init()
342 p->chunks[i].user_ptr = cdata; in radeon_cs_parser_init()
351 p->chunks[i].kdata = kvmalloc_array(size, sizeof(uint32_t), GFP_KERNEL); in radeon_cs_parser_init()
353 if (p->chunks[i].kdata == NULL) { in radeon_cs_parser_init()
356 if (copy_from_user(p->chunks[i].kdata, cdata, size)) { in radeon_cs_parser_init()
360 p->cs_flags = p->chunks[i].kdata[0]; in radeon_cs_parser_init()
361 if (p->chunks[i].length_dw > 1) in radeon_cs_parser_init()
362 ring = p->chunks[i].kdata[1]; in radeon_cs_parser_init()
363 if (p->chunks[i].length_dw > 2) in radeon_cs_parser_init()
364 priority = (s32)p->chunks[i].kdata[2]; in radeon_cs_parser_init()
453 kvfree(parser->chunks[i].kdata); in radeon_cs_parser_fini()
454 kfree(parser->chunks); in radeon_cs_parser_fini()