blob: 5335fe3fdff0516c9bacfb3ba2a2ecb9fe8cc922 [file] [log] [blame]
Katarzyna Dec081f7712018-04-11 10:14:58 +02001/*
2 * Copyright © 2018 Intel Corporation
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 * IN THE SOFTWARE.
22 *
23 */
24
25#ifndef GPU_FILL_H
26#define GPU_FILL_H
27
28#include <intel_bufmgr.h>
29#include <i915_drm.h>
30
31#include "media_fill.h"
32#include "gen7_media.h"
33#include "gen8_media.h"
34#include "intel_reg.h"
35#include "drmtest.h"
36#include "intel_batchbuffer.h"
37#include "intel_chipset.h"
38#include <assert.h>
39
Katarzyna Dec081f7712018-04-11 10:14:58 +020040void
41gen7_render_flush(struct intel_batchbuffer *batch, uint32_t batch_end);
42
43uint32_t
44gen7_fill_curbe_buffer_data(struct intel_batchbuffer *batch,
45 uint8_t color);
46
47uint32_t
48gen7_fill_surface_state(struct intel_batchbuffer *batch,
49 struct igt_buf *buf,
50 uint32_t format,
51 int is_dst);
52
53uint32_t
54gen7_fill_binding_table(struct intel_batchbuffer *batch,
55 struct igt_buf *dst);
56
57uint32_t
Katarzyna Dec80996142018-04-11 10:14:59 +020058gen7_fill_kernel(struct intel_batchbuffer *batch,
Katarzyna Dec081f7712018-04-11 10:14:58 +020059 const uint32_t kernel[][4],
60 size_t size);
61
62uint32_t
63gen7_fill_interface_descriptor(struct intel_batchbuffer *batch, struct igt_buf *dst,
64 const uint32_t kernel[][4], size_t size);
65
66void
67gen7_emit_state_base_address(struct intel_batchbuffer *batch);
68
69void
70gen7_emit_vfe_state(struct intel_batchbuffer *batch);
71
72void
73gen7_emit_vfe_state_gpgpu(struct intel_batchbuffer *batch);
74
75void
76gen7_emit_curbe_load(struct intel_batchbuffer *batch, uint32_t curbe_buffer);
77
78void
79gen7_emit_interface_descriptor_load(struct intel_batchbuffer *batch, uint32_t interface_descriptor);
80
81void
82gen7_emit_media_objects(struct intel_batchbuffer *batch,
83 unsigned x, unsigned y,
84 unsigned width, unsigned height);
85
86void
87gen7_emit_gpgpu_walk(struct intel_batchbuffer *batch,
88 unsigned x, unsigned y,
89 unsigned width, unsigned height);
90
Katarzyna Dec081f7712018-04-11 10:14:58 +020091uint32_t
Katarzyna Dec92e89da2018-05-04 15:02:14 +020092gen8_spin_curbe_buffer_data(struct intel_batchbuffer *batch,
93 uint32_t iters);
94
95uint32_t
Katarzyna Dec081f7712018-04-11 10:14:58 +020096gen8_fill_surface_state(struct intel_batchbuffer *batch,
97 struct igt_buf *buf,
98 uint32_t format,
99 int is_dst);
100
101uint32_t
Katarzyna Dec081f7712018-04-11 10:14:58 +0200102gen8_fill_interface_descriptor(struct intel_batchbuffer *batch, struct igt_buf *dst, const uint32_t kernel[][4], size_t size);
103
104void
105gen8_emit_state_base_address(struct intel_batchbuffer *batch);
106
107void
Katarzyna Dec80996142018-04-11 10:14:59 +0200108gen8_emit_media_state_flush(struct intel_batchbuffer *batch);
109
110void
Katarzyna Dec081f7712018-04-11 10:14:58 +0200111gen8_emit_vfe_state(struct intel_batchbuffer *batch);
112
113void
114gen8_emit_vfe_state_gpgpu(struct intel_batchbuffer *batch);
115
116void
Katarzyna Dec92e89da2018-05-04 15:02:14 +0200117gen8_emit_vfe_state_spin(struct intel_batchbuffer *batch);
118
119void
Katarzyna Dec081f7712018-04-11 10:14:58 +0200120gen8_emit_gpgpu_walk(struct intel_batchbuffer *batch,
121 unsigned x, unsigned y,
122 unsigned width, unsigned height);
123
124void
Katarzyna Dec92e89da2018-05-04 15:02:14 +0200125gen8_emit_media_objects_spin(struct intel_batchbuffer *batch);
126
127void
128gen8lp_emit_media_objects_spin(struct intel_batchbuffer *batch);
129
130void
Katarzyna Dec081f7712018-04-11 10:14:58 +0200131gen9_emit_state_base_address(struct intel_batchbuffer *batch);
132
133#endif /* GPU_FILL_H */