From: Alyssa Rosenzweig Date: Tue, 14 Apr 2020 20:31:34 +0000 (-0400) Subject: pan/bi: Structify FMA_MSCALE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0cb703984e68c426a173df1e0c951591dca17fb8;p=mesa.git pan/bi: Structify FMA_MSCALE Signed-off-by: Alyssa Rosenzweig Part-of: --- 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)