Lines Matching refs:reader
293 static bool lima_read_block(struct lima_block_reader *reader, in lima_read_block() argument
296 size_t max_off = reader->base + src_size; in lima_read_block()
298 if (reader->off < max_off) { in lima_read_block()
299 size_t size = min_t(size_t, max_off - reader->off, in lima_read_block()
300 reader->count); in lima_read_block()
302 memcpy(reader->dst, src + (reader->off - reader->base), size); in lima_read_block()
304 reader->dst += size; in lima_read_block()
305 reader->off += size; in lima_read_block()
306 reader->read += size; in lima_read_block()
307 reader->count -= size; in lima_read_block()
310 reader->base = max_off; in lima_read_block()
312 return !!reader->count; in lima_read_block()
322 struct lima_block_reader reader = { in lima_error_state_read() local
330 if (lima_read_block(&reader, &ldev->dump, sizeof(ldev->dump))) { in lima_error_state_read()
332 if (!lima_read_block(&reader, et->data, et->size)) in lima_error_state_read()
338 return reader.read; in lima_error_state_read()