History log of /linux-master/drivers/gpu/drm/vc4/vc4_qpu_defines.h
Revision Date Author Comments
# 20e48fd6 04-Jul-2016 Eric Anholt <eric@anholt.net>

drm/vc4: Fix definition of QPU_R_MS_REV_FLAGS

We don't use it in shader validation currently, so it had no effect,
but best to fix it anyway in case we do some day.

Signed-off-by: Eric Anholt <eric@anholt.net>


# 6d45c81d2 02-Jul-2016 Eric Anholt <eric@anholt.net>

drm/vc4: Add support for branching in shader validation.

We're already checking that branch instructions are between the start
of the shader and the proper PROG_END sequence. The other thing we
need to make branching safe is to verify that the shader doesn't read
past the end of the uniforms stream.

To do that, we require that at any basic block reading uniforms have
the following instructions:

load_imm temp, <next offset within uniform stream>
add unif_addr, temp, unif

The instructions are generated by userspace, and the kernel verifies
that the load_imm is of the expected offset, and that the add adds it
to a uniform. We track which uniform in the stream that is, and at
draw call time fix up the uniform stream to have the address of the
start of the shader's uniforms at that location.

Signed-off-by: Eric Anholt <eric@anholt.net>


# 93aa9ae3 02-Jul-2016 Eric Anholt <eric@anholt.net>

drm/vc4: Add a bitmap of branch targets during shader validation.

This isn't used yet, it's just a first step toward loop validation.
During the main parsing of instructions, we need to know when we hit a
new basic block so that we can reset validated state.

v2: Fix a stray semicolon after an if block. (caught by kbuild test).

Signed-off-by: Eric Anholt <eric@anholt.net>


# 463873d5 30-Nov-2015 Eric Anholt <eric@anholt.net>

drm/vc4: Add an API for creating GPU shaders in GEM BOs.

Since we have no MMU, the kernel needs to validate that the submitted
shader code won't make any accesses to memory that the user doesn't
control, which involves banning some operations (general purpose DMA
writes), and tracking where we need to write out pointers for other
operations (texture sampling). Once it's validated, we return a GEM
BO containing the shader, which doesn't allow mapping for write or
exporting to other subsystems.

v2: Use __u32-style types.

Signed-off-by: Eric Anholt <eric@anholt.net>