diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-02-22 10:59:22 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-02-22 11:39:43 +1000 |
commit | 569d3f8281086af47066a9097261664977b1b06d (patch) | |
tree | 5c39c1a308eaf8091c34e20a41c0f2d219a6273c /shared-core | |
parent | afac6a4ddc96fc3135c9b18fcc2514393984d536 (diff) |
nv50: do instmem flush magic on finish_access() after writes
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/nv50_instmem.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shared-core/nv50_instmem.c b/shared-core/nv50_instmem.c index 661c9346..17f2763c 100644 --- a/shared-core/nv50_instmem.c +++ b/shared-core/nv50_instmem.c @@ -34,6 +34,8 @@ typedef struct { struct nouveau_gpuobj_ref *pramin_pt; struct nouveau_gpuobj_ref *pramin_bar; + + bool last_access_wr; } nv50_instmem_priv; #define NV50_INSTMEM_PAGE_SHIFT 12 @@ -341,17 +343,27 @@ void nv50_instmem_prepare_access(struct drm_device *dev, bool write) { struct drm_nouveau_private *dev_priv = dev->dev_private; + nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; BUG_ON(dev_priv->ramin_map != NULL); dev_priv->ramin_map = dev_priv->ramin; + + priv->last_access_wr = write; } void nv50_instmem_finish_access(struct drm_device *dev) { struct drm_nouveau_private *dev_priv = dev->dev_private; + nv50_instmem_priv *priv = dev_priv->engine.instmem.priv; BUG_ON(dev_priv->ramin_map == NULL); dev_priv->ramin_map = NULL; + + if (priv->last_access_wr) { + nv_wr32(0x070000, 0x00000001); + if (!nv_wait(0x070000, 0x00000001, 0x00000000)) + DRM_ERROR("PRAMIN flush timeout\n"); + } } |