mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-03 19:38:03 +02:00
drm/nouveau: implement NVOBJ_FLAG_ZERO_FREE
Not really necessary it seems as we've been dealing without it for a while now. But, it's useful to be sure that we don't end up with stale bits of state laying around.
This commit is contained in:
parent
6f76c1480c
commit
54a66c3b44
1 changed files with 8 additions and 0 deletions
|
|
@ -349,6 +349,7 @@ nouveau_gpuobj_del(struct drm_device *dev, struct nouveau_gpuobj **pgpuobj)
|
|||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
struct nouveau_engine *engine = &dev_priv->engine;
|
||||
struct nouveau_gpuobj *gpuobj;
|
||||
int i;
|
||||
|
||||
DRM_DEBUG("gpuobj %p\n", pgpuobj ? *pgpuobj : NULL);
|
||||
|
||||
|
|
@ -361,6 +362,13 @@ nouveau_gpuobj_del(struct drm_device *dev, struct nouveau_gpuobj **pgpuobj)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (gpuobj->flags & NVOBJ_FLAG_ZERO_FREE) {
|
||||
engine->instmem.prepare_access(dev, true);
|
||||
for (i = 0; i < gpuobj->im_pramin->size; i += 4)
|
||||
INSTANCE_WR(gpuobj, i/4, 0);
|
||||
engine->instmem.finish_access(dev);
|
||||
}
|
||||
|
||||
if (gpuobj->dtor)
|
||||
gpuobj->dtor(dev, gpuobj);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue