pan/decode: Drop legacy 32-bit job support
[mesa.git] / src / panfrost / lib / 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 #include "midgard_pack.h"
31 #include "pan_pool.h"
32
33 struct pan_scoreboard {
34 /* The first job in the batch */
35 mali_ptr first_job;
36
37 /* The number of jobs in the primary batch, essentially */
38 unsigned job_index;
39
40 /* A CPU-side pointer to the previous job for next_job linking */
41 struct mali_job_descriptor_header *prev_job;
42
43 /* The dependency for tiler jobs (i.e. the index of the last emitted
44 * tiler job, or zero if none have been emitted) */
45 unsigned tiler_dep;
46
47 /* The job index of the WRITE_VALUE job (before it has been created) */
48 unsigned write_value_index;
49 };
50
51 unsigned
52 panfrost_new_job(
53 struct pan_pool *pool,
54 struct pan_scoreboard *scoreboard,
55 enum mali_job_type type,
56 bool barrier,
57 unsigned local_dep,
58 void *payload, size_t payload_size,
59 bool inject);
60
61 void panfrost_scoreboard_initialize_tiler(
62 struct pan_pool *pool,
63 struct pan_scoreboard *scoreboard,
64 mali_ptr polygon_list);
65
66 #endif