diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-02-03 05:46:14 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-02-24 20:45:02 (GMT) |
commit | 60f60bf1bc45bef38568244f5c4e0d0f105c5032 (patch) | |
tree | 8c636475240cdafb762254877dd4c00fa53fd41c /drivers/gpu/drm/nouveau/nv50_evo.c | |
parent | f13e435c59573aa0ac398210777cc0406c476593 (diff) | |
download | linux-60f60bf1bc45bef38568244f5c4e0d0f105c5032.tar.xz |
drm/nv50-nvc0: request and wait on notification of modeset completion
This should prevent a number of races from occuring, the most obvious of
which will be exposed when we start making use of the "display sync" evo
channel for page flipping. The DS channel will reject any command stream
that doesn't completely agree with the current "master" state.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_evo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_evo.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c index 9703f75..eea9620 100644 --- a/drivers/gpu/drm/nouveau/nv50_evo.c +++ b/drivers/gpu/drm/nouveau/nv50_evo.c @@ -203,6 +203,7 @@ nv50_evo_destroy(struct drm_device *dev) { struct nv50_display *disp = nv50_display(dev); + nouveau_gpuobj_ref(NULL, &disp->ntfy); nv50_evo_channel_del(&disp->master); } @@ -251,6 +252,25 @@ nv50_evo_create(struct drm_device *dev) if (ret) goto err; + /* not sure exactly what this is.. + * + * the first dword of the structure is used by nvidia to wait on + * full completion of an EVO "update" command. + * + * method 0x8c on the master evo channel will fill a lot more of + * this structure with some undefined info + */ + ret = nouveau_gpuobj_new(dev, disp->master, 0x1000, 0, + NVOBJ_FLAG_ZERO_ALLOC, &disp->ntfy); + if (ret) + goto err; + + ret = nv50_evo_dmaobj_new(disp->master, 0x3d, NvEvoSync, 0, 0x19, + disp->ntfy->vinst, disp->ntfy->vinst + + disp->ntfy->size, 0x00010000); + if (ret) + goto err; + /* create some default objects for the scanout memtypes we support */ if (dev_priv->card_type >= NV_C0) { ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB32, 0xfe, 0x19, |