| .. | .. |
|---|
| 1 | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
|---|
| 2 | 2 | /* |
|---|
| 3 | 3 | * |
|---|
| 4 | | - * (C) COPYRIGHT 2019-2021 ARM Limited. All rights reserved. |
|---|
| 4 | + * (C) COPYRIGHT 2019-2022 ARM Limited. All rights reserved. |
|---|
| 5 | 5 | * |
|---|
| 6 | 6 | * This program is free software and is provided to you under the terms of the |
|---|
| 7 | 7 | * GNU General Public License version 2 as published by the Free Software |
|---|
| .. | .. |
|---|
| 51 | 51 | * @event_queue: Timeline stream event queue |
|---|
| 52 | 52 | * @bytes_collected: Number of bytes read by user |
|---|
| 53 | 53 | * @timeline_flags: Zero, if timeline is disabled. Timeline stream flags |
|---|
| 54 | | - * otherwise. See kbase_timeline_io_acquire(). |
|---|
| 54 | + * otherwise. See kbase_timeline_acquire(). |
|---|
| 55 | 55 | * @obj_header_btc: Remaining bytes to copy for the object stream header |
|---|
| 56 | 56 | * @aux_header_btc: Remaining bytes to copy for the aux stream header |
|---|
| 57 | 57 | * @last_acquire_time: The time at which timeline was last acquired. |
|---|
| .. | .. |
|---|
| 77 | 77 | #endif |
|---|
| 78 | 78 | }; |
|---|
| 79 | 79 | |
|---|
| 80 | | -extern const struct file_operations kbasep_tlstream_fops; |
|---|
| 81 | | - |
|---|
| 82 | 80 | void kbase_create_timeline_objects(struct kbase_device *kbdev); |
|---|
| 83 | 81 | |
|---|
| 82 | +/** |
|---|
| 83 | + * kbase_timeline_acquire - acquire timeline for a userspace client. |
|---|
| 84 | + * @kbdev: An instance of the GPU platform device, allocated from the probe |
|---|
| 85 | + * method of the driver. |
|---|
| 86 | + * @flags: Timeline stream flags |
|---|
| 87 | + * |
|---|
| 88 | + * Each timeline instance can be acquired by only one userspace client at a time. |
|---|
| 89 | + * |
|---|
| 90 | + * Return: Zero on success, error number on failure (e.g. if already acquired). |
|---|
| 91 | + */ |
|---|
| 92 | +int kbase_timeline_acquire(struct kbase_device *kbdev, u32 flags); |
|---|
| 93 | + |
|---|
| 94 | +/** |
|---|
| 95 | + * kbase_timeline_release - release timeline for a userspace client. |
|---|
| 96 | + * @timeline: Timeline instance to be stopped. It must be previously acquired |
|---|
| 97 | + * with kbase_timeline_acquire(). |
|---|
| 98 | + * |
|---|
| 99 | + * Releasing the timeline instance allows it to be acquired by another userspace client. |
|---|
| 100 | + */ |
|---|
| 101 | +void kbase_timeline_release(struct kbase_timeline *timeline); |
|---|
| 102 | + |
|---|
| 84 | 103 | #endif /* _KBASE_TIMELINE_PRIV_H */ |
|---|