panfrost: Drop batch from scoreboard routines
[mesa.git] / src / gallium / drivers / panfrost / pan_scoreboard.h
1 /*
2 * Copyright (C) 2019-2020 Collabora Ltd.
3 * Copyright (C) 2019 Alyssa Rosenzweig
4 * Copyright (C) 2014-2017 Broadcom
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice (including the next
14 * paragraph) shall be included in all copies or substantial portions of the
15 * Software.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 * SOFTWARE.
24 *
25 */
26
27 #ifndef __PAN_SCOREBOARD_H__
28 #define __PAN_SCOREBOARD_H__
29
30 struct pan_scoreboard {
31 /* The first job in the batch */
32 mali_ptr first_job;
33
34 /* The number of jobs in the primary batch, essentially */
35 unsigned job_index;
36
37 /* A CPU-side pointer to the previous job for next_job linking */
38 struct mali_job_descriptor_header *prev_job;
39
40 /* The dependency for tiler jobs (i.e. the index of the last emitted
41 * tiler job, or zero if none have been emitted) */
42 unsigned tiler_dep;
43
44 /* The job index of the WRITE_VALUE job (before it has been created) */
45 unsigned write_value_index;
46 };
47
48 unsigned
49 panfrost_new_job(
50 struct pan_pool *pool,
51 struct pan_scoreboard *scoreboard,
52 enum mali_job_type type,
53 bool barrier,
54 unsigned local_dep,
55 void *payload, size_t payload_size,
56 bool inject);
57
58 void panfrost_scoreboard_initialize_tiler(
59 struct pan_pool *pool,
60 struct pan_scoreboard *scoreboard,
61 mali_ptr polygon_list);
62
63 #endif