18c2ecf20Sopenharmony_ci#ifndef __NVIF_FIFO_H__ 28c2ecf20Sopenharmony_ci#define __NVIF_FIFO_H__ 38c2ecf20Sopenharmony_ci#include <nvif/device.h> 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci/* Returns mask of runlists that support a NV_DEVICE_INFO_ENGINE_* type. */ 68c2ecf20Sopenharmony_ciu64 nvif_fifo_runlist(struct nvif_device *, u64 engine); 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci/* CE-supporting runlists (excluding GRCE, if others exist). */ 98c2ecf20Sopenharmony_cistatic inline u64 108c2ecf20Sopenharmony_cinvif_fifo_runlist_ce(struct nvif_device *device) 118c2ecf20Sopenharmony_ci{ 128c2ecf20Sopenharmony_ci u64 runmgr = nvif_fifo_runlist(device, NV_DEVICE_INFO_ENGINE_GR); 138c2ecf20Sopenharmony_ci u64 runmce = nvif_fifo_runlist(device, NV_DEVICE_INFO_ENGINE_CE); 148c2ecf20Sopenharmony_ci if (runmce && !(runmce &= ~runmgr)) 158c2ecf20Sopenharmony_ci runmce = runmgr; 168c2ecf20Sopenharmony_ci return runmce; 178c2ecf20Sopenharmony_ci} 188c2ecf20Sopenharmony_ci#endif 19