1 1.1 riastrad /* $NetBSD: fifo.h,v 1.2 2021/12/18 23:45:33 riastradh Exp $ */ 2 1.1 riastrad 3 1.1 riastrad #ifndef __NVIF_FIFO_H__ 4 1.1 riastrad #define __NVIF_FIFO_H__ 5 1.1 riastrad #include <nvif/device.h> 6 1.1 riastrad 7 1.1 riastrad /* Returns mask of runlists that support a NV_DEVICE_INFO_ENGINE_* type. */ 8 1.1 riastrad u64 nvif_fifo_runlist(struct nvif_device *, u64 engine); 9 1.1 riastrad 10 1.1 riastrad /* CE-supporting runlists (excluding GRCE, if others exist). */ 11 1.1 riastrad static inline u64 12 1.1 riastrad nvif_fifo_runlist_ce(struct nvif_device *device) 13 1.1 riastrad { 14 1.1 riastrad u64 runmgr = nvif_fifo_runlist(device, NV_DEVICE_INFO_ENGINE_GR); 15 1.1 riastrad u64 runmce = nvif_fifo_runlist(device, NV_DEVICE_INFO_ENGINE_CE); 16 1.1 riastrad if (runmce && !(runmce &= ~runmgr)) 17 1.1 riastrad runmce = runmgr; 18 1.1 riastrad return runmce; 19 1.1 riastrad } 20 1.1 riastrad #endif 21