Loading...
1/*
2 * Tegra host1x Job
3 *
4 * Copyright (c) 2011-2013, NVIDIA Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __HOST1X_JOB_H
20#define __HOST1X_JOB_H
21
22struct host1x_job_gather {
23 u32 words;
24 dma_addr_t base;
25 struct host1x_bo *bo;
26 u32 offset;
27 bool handled;
28};
29
30struct host1x_cmdbuf {
31 u32 handle;
32 u32 offset;
33 u32 words;
34 u32 pad;
35};
36
37struct host1x_waitchk {
38 struct host1x_bo *bo;
39 u32 offset;
40 u32 syncpt_id;
41 u32 thresh;
42};
43
44struct host1x_job_unpin_data {
45 struct host1x_bo *bo;
46 struct sg_table *sgt;
47};
48
49/*
50 * Dump contents of job to debug output.
51 */
52void host1x_job_dump(struct device *dev, struct host1x_job *job);
53
54#endif
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Tegra host1x Job
4 *
5 * Copyright (c) 2011-2013, NVIDIA Corporation.
6 */
7
8#ifndef __HOST1X_JOB_H
9#define __HOST1X_JOB_H
10
11#include <linux/dma-direction.h>
12
13struct host1x_job_gather {
14 unsigned int words;
15 dma_addr_t base;
16 struct host1x_bo *bo;
17 unsigned int offset;
18 bool handled;
19};
20
21struct host1x_job_wait {
22 u32 id;
23 u32 threshold;
24 u32 next_class;
25 bool relative;
26};
27
28struct host1x_job_cmd {
29 bool is_wait;
30
31 union {
32 struct host1x_job_gather gather;
33 struct host1x_job_wait wait;
34 };
35};
36
37struct host1x_job_unpin_data {
38 struct host1x_bo_mapping *map;
39};
40
41/*
42 * Dump contents of job to debug output.
43 */
44void host1x_job_dump(struct device *dev, struct host1x_job *job);
45
46#endif