summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-08-15 13:36:54 +1000
committerBen Skeggs <skeggsb@gmail.com>2007-08-15 13:36:54 +1000
commitc3faa589b09616acdfd827be1719f6c2706c49ab (patch)
tree1d8fdd99684bcade341074765ad85573cc645cff /linux-core
parentee01d3755ac03f2c47e3b4d9bf084d68e6ee95bc (diff)
nouveau: Allow GART notifiers when using sgdma code.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/nouveau_sgdma.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/linux-core/nouveau_sgdma.c b/linux-core/nouveau_sgdma.c
index df970d11..97d5330b 100644
--- a/linux-core/nouveau_sgdma.c
+++ b/linux-core/nouveau_sgdma.c
@@ -316,3 +316,20 @@ nouveau_sgdma_nottm_hack_takedown(struct drm_device *dev)
{
}
+int
+nouveau_sgdma_get_page(struct drm_device *dev, uint32_t offset, uint32_t *page)
+{
+ struct drm_nouveau_private *dev_priv = dev->dev_private;
+ struct nouveau_gpuobj *gpuobj = dev_priv->gart_info.sg_ctxdma;
+ int pte;
+
+ pte = (offset >> NV_CTXDMA_PAGE_SHIFT);
+ if (dev_priv->card_type < NV_50) {
+ *page = INSTANCE_RD(gpuobj, (pte + 2)) & ~NV_CTXDMA_PAGE_MASK;
+ return 0;
+ }
+
+ DRM_ERROR("Unimplemented on NV50\n");
+ return -EINVAL;
+}
+