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