summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-03-18 19:26:51 +1000
committerBen Skeggs <bskeggs@redhat.com>2009-03-18 19:30:42 +1000
commit7e0ed73e0cf952f3378abae854dd39dcf3787292 (patch)
treea283b450d8a87fb76a66737a59af76c9c888c466
parentec5abde7b330ce944a9639dbbc039cdb331755ad (diff)
nouveau: use nouveau_fence_channel() to get chan for m2mf move
-rw-r--r--linux-core/nouveau_bo.c3
-rw-r--r--linux-core/nouveau_fence.c2
-rw-r--r--shared-core/nouveau_drv.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/linux-core/nouveau_bo.c b/linux-core/nouveau_bo.c
index 1d4d1be4..09328e9e 100644
--- a/linux-core/nouveau_bo.c
+++ b/linux-core/nouveau_bo.c
@@ -161,9 +161,10 @@ nouveau_bo_move_m2mf(struct drm_buffer_object *bo, int evict, int no_wait,
{
struct drm_device *dev = bo->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
- struct nouveau_channel *chan = dev_priv->fifos[bo->new_fence_class];
+ struct nouveau_channel *chan;
uint32_t page_count;
+ chan = nouveau_fence_channel(dev, bo->new_fence_class);
if (!chan) {
DRM_ERROR("channel %d non-existant, using kchan\n",
bo->fence_class);
diff --git a/linux-core/nouveau_fence.c b/linux-core/nouveau_fence.c
index 26f98c08..6ba3c049 100644
--- a/linux-core/nouveau_fence.c
+++ b/linux-core/nouveau_fence.c
@@ -29,7 +29,7 @@
#include "nouveau_drv.h"
#include "nouveau_dma.h"
-static struct nouveau_channel *
+struct nouveau_channel *
nouveau_fence_channel(struct drm_device *dev, uint32_t class)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
diff --git a/shared-core/nouveau_drv.h b/shared-core/nouveau_drv.h
index eb99ce54..a13f377e 100644
--- a/shared-core/nouveau_drv.h
+++ b/shared-core/nouveau_drv.h
@@ -681,6 +681,8 @@ extern struct drm_bo_driver nouveau_bo_driver;
/* nouveau_fence.c */
extern struct drm_fence_driver nouveau_fence_driver;
extern void nouveau_fence_handler(struct drm_device *dev, int channel);
+extern struct nouveau_channel *
+nouveau_fence_channel(struct drm_device *, uint32_t fence_class);
/* nouveau_gem.c */
extern int nouveau_gem_object_new(struct drm_gem_object *);