diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-05-08 11:22:27 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-07-26 10:28:16 +1000 |
commit | 0ade74b6c6843892b52e6c2a4ac02183242eec27 (patch) | |
tree | 6457434a0d81236d102dd4453b2ee66240f173a8 /drivers/gpu/drm/nouveau/nouveau_software.h | |
parent | 2a259a3d84c4409918c5d094f0969da58283a947 (diff) | |
download | op-kernel-dev-0ade74b6c6843892b52e6c2a4ac02183242eec27.zip op-kernel-dev-0ade74b6c6843892b52e6c2a4ac02183242eec27.tar.gz |
drm/nv50: extend vblank semaphore to generic dmaobj + offset pair
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_software.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_software.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_software.h b/drivers/gpu/drm/nouveau/nouveau_software.h index e60bc6c..9914cf1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_software.h +++ b/drivers/gpu/drm/nouveau/nouveau_software.h @@ -4,13 +4,15 @@ struct nouveau_software_priv { struct nouveau_exec_engine base; struct list_head vblank; + spinlock_t peephole_lock; }; struct nouveau_software_chan { struct list_head flip; struct { struct list_head list; - struct nouveau_bo *bo; + u32 channel; + u32 ctxdma; u32 offset; u32 value; u32 head; @@ -18,23 +20,6 @@ struct nouveau_software_chan { }; static inline void -nouveau_software_vblank(struct drm_device *dev, int crtc) -{ - struct nouveau_software_priv *psw = nv_engine(dev, NVOBJ_ENGINE_SW); - struct nouveau_software_chan *pch, *tmp; - - list_for_each_entry_safe(pch, tmp, &psw->vblank, vblank.list) { - if (pch->vblank.head != crtc) - continue; - - nouveau_bo_wr32(pch->vblank.bo, pch->vblank.offset, - pch->vblank.value); - list_del(&pch->vblank.list); - drm_vblank_put(dev, crtc); - } -} - -static inline void nouveau_software_context_new(struct nouveau_software_chan *pch) { INIT_LIST_HEAD(&pch->flip); @@ -44,6 +29,7 @@ static inline void nouveau_software_create(struct nouveau_software_priv *psw) { INIT_LIST_HEAD(&psw->vblank); + spin_lock_init(&psw->peephole_lock); } static inline u16 |