Lines Matching refs:read_pos
456 unsigned int read_pos, write_pos, available, i, read_bytes = 0; in amdgpu_debugfs_umsch_fwlog_read() local
469 read_pos = plog->rptr; in amdgpu_debugfs_umsch_fwlog_read()
472 if (read_pos > AMDGPU_UMSCHFW_LOG_SIZE || write_pos > AMDGPU_UMSCHFW_LOG_SIZE) in amdgpu_debugfs_umsch_fwlog_read()
475 if (!size || (read_pos == write_pos)) in amdgpu_debugfs_umsch_fwlog_read()
478 if (write_pos > read_pos) { in amdgpu_debugfs_umsch_fwlog_read()
479 available = write_pos - read_pos; in amdgpu_debugfs_umsch_fwlog_read()
482 read_num[0] = AMDGPU_UMSCHFW_LOG_SIZE - read_pos; in amdgpu_debugfs_umsch_fwlog_read()
494 if (read_pos == AMDGPU_UMSCHFW_LOG_SIZE) in amdgpu_debugfs_umsch_fwlog_read()
495 read_pos = plog->header_size; in amdgpu_debugfs_umsch_fwlog_read()
497 (log_buf + read_pos), read_num[i])) in amdgpu_debugfs_umsch_fwlog_read()
501 read_pos += read_num[i]; in amdgpu_debugfs_umsch_fwlog_read()
505 plog->rptr = read_pos; in amdgpu_debugfs_umsch_fwlog_read()