1 #ifndef __NOUVEAU_SOFTWARE_H__
2 #define __NOUVEAU_SOFTWARE_H__
4 struct nouveau_software_priv {
5 struct nouveau_exec_engine base;
6 struct list_head vblank;
9 struct nouveau_software_chan {
10 struct list_head flip;
12 struct list_head list;
13 struct nouveau_bo *bo;
21 nouveau_software_vblank(struct drm_device *dev, int crtc)
23 struct nouveau_software_priv *psw = nv_engine(dev, NVOBJ_ENGINE_SW);
24 struct nouveau_software_chan *pch, *tmp;
26 list_for_each_entry_safe(pch, tmp, &psw->vblank, vblank.list) {
27 if (pch->vblank.head != crtc)
30 nouveau_bo_wr32(pch->vblank.bo, pch->vblank.offset,
32 list_del(&pch->vblank.list);
33 drm_vblank_put(dev, crtc);
38 nouveau_software_context_new(struct nouveau_software_chan *pch)
40 INIT_LIST_HEAD(&pch->flip);
44 nouveau_software_create(struct nouveau_software_priv *psw)
46 INIT_LIST_HEAD(&psw->vblank);
50 nouveau_software_class(struct drm_device *dev)
52 struct drm_nouveau_private *dev_priv = dev->dev_private;
53 if (dev_priv->card_type <= NV_04)
55 if (dev_priv->card_type <= NV_40)
57 if (dev_priv->card_type <= NV_50)
59 if (dev_priv->card_type <= NV_E0)
64 int nv04_software_create(struct drm_device *);
65 int nv50_software_create(struct drm_device *);
66 int nvc0_software_create(struct drm_device *);
67 u64 nvc0_software_crtc(struct nouveau_channel *, int crtc);