From 0cb703984e68c426a173df1e0c951591dca17fb8 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 14 Apr 2020 16:31:34 -0400 Subject: [PATCH] pan/bi: Structify FMA_MSCALE Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bifrost.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/panfrost/bifrost/bifrost.h b/src/panfrost/bifrost/bifrost.h index 7cdc39b7771..e3f822c321e 100644 --- a/src/panfrost/bifrost/bifrost.h +++ b/src/panfrost/bifrost/bifrost.h @@ -111,6 +111,25 @@ struct bifrost_fma_2src { unsigned op : 17; } __attribute__((packed)); +#define BIFROST_FMA_OP_MSCALE (0x50 >> 3) + +struct bifrost_fma_mscale { + unsigned src0 : 3; + unsigned src1 : 3; + unsigned src2 : 3; + unsigned src3 : 3; + + /* If mscale_mode is set - an MSCALE specific mode. If it is not set, a + * regular outmod */ + unsigned mode : 2; + unsigned mscale_mode : 1; + + unsigned src0_abs : 1; + unsigned src1_neg : 1; + unsigned src2_neg : 1; + unsigned op : 5; +} __attribute__((packed)); + #define BIFROST_ADD_OP_BLEND (0x1952c) #define BIFROST_ADD_OP_FRCP_FAST_F32 (0x0cc00) #define BIFROST_ADD_OP_FRCP_FAST_F16_X (0x0ce10) -- 2.30.2