summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-11-11 17:57:54 +0100
committerLucas Stach <l.stach@pengutronix.de>2016-12-02 19:30:22 +0100
commit557800532ebdec4fc460876af4e3c216d23a184d (patch)
tree0a7cca668ed759810538eb8389015ad6ca5c1a8c /drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c
parent5688e57eb50c08922d0ff88bb30fe65b508917a0 (diff)
drm/etnaviv: Allow DRAW_INSTANCED commands
Vivante GPUs with HALTI0 feature support a DRAW_INSTANCED command in the command stream to draw a number of instances of the same geometry. The information that has been figured out about the command can be found here: https://github.com/etnaviv/etna_viv/blob/master/rnndb/cmdstream.xml#L270 This command is not allowed currently by the DRM driver because it was not known before. This patch enables parsing it in command streams and allows using it by userspace drivers. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c b/drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c
index dcfd565c88d1..2a2e5e366ab7 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_cmd_parser.c
@@ -143,6 +143,7 @@ static bool etnaviv_validate_load_state(struct etna_validation_state *state,
static uint8_t cmd_length[32] = {
[FE_OPCODE_DRAW_PRIMITIVES] = 4,
[FE_OPCODE_DRAW_INDEXED_PRIMITIVES] = 6,
+ [FE_OPCODE_DRAW_INSTANCED] = 4,
[FE_OPCODE_NOP] = 2,
[FE_OPCODE_STALL] = 2,
};