aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_object.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-04-01 13:56:05 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-05-16 10:48:45 +1000
commita82dd49f14742e2529f79feb6360e0993277e788 (patch)
tree96f6f7ee4a792850ccf13c9a75e57f2a5ec920cb /drivers/gpu/drm/nouveau/nouveau_object.c
parent92abe7499239f7b570194b34c50e3772783e2640 (diff)
downloadkernel_samsung_smdk4412-a82dd49f14742e2529f79feb6360e0993277e788.zip
kernel_samsung_smdk4412-a82dd49f14742e2529f79feb6360e0993277e788.tar.gz
kernel_samsung_smdk4412-a82dd49f14742e2529f79feb6360e0993277e788.tar.bz2
drm/nouveau: remove remnants of nouveau_pgraph_engine
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_object.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_object.c38
1 files changed, 11 insertions, 27 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_object.c b/drivers/gpu/drm/nouveau/nouveau_object.c
index 9ea3ab9..8f97016 100644
--- a/drivers/gpu/drm/nouveau/nouveau_object.c
+++ b/drivers/gpu/drm/nouveau/nouveau_object.c
@@ -620,7 +620,6 @@ int
nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
{
struct drm_nouveau_private *dev_priv = chan->dev->dev_private;
- struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
struct drm_device *dev = chan->dev;
struct nouveau_gpuobj_class *oc;
int ret;
@@ -628,37 +627,25 @@ nouveau_gpuobj_gr_new(struct nouveau_channel *chan, u32 handle, int class)
NV_DEBUG(dev, "ch%d class=0x%04x\n", chan->id, class);
list_for_each_entry(oc, &dev_priv->classes, head) {
- if (oc->id == class)
- goto found;
- }
+ struct nouveau_exec_engine *eng = dev_priv->eng[oc->engine];
- NV_ERROR(dev, "illegal object class: 0x%x\n", class);
- return -EINVAL;
+ if (oc->id != class)
+ continue;
-found:
- if (!dev_priv->eng[oc->engine]) {
- switch (oc->engine) {
- case NVOBJ_ENGINE_SW:
+ if (oc->engine == NVOBJ_ENGINE_SW)
return nouveau_gpuobj_sw_new(chan, handle, class);
- case NVOBJ_ENGINE_GR:
- if ((dev_priv->card_type >= NV_20 && !chan->ramin_grctx) ||
- (dev_priv->card_type < NV_20 && !chan->pgraph_ctx)) {
- ret = pgraph->create_context(chan);
- if (ret)
- return ret;
- }
- return pgraph->object_new(chan, handle, class);
+ if (!chan->engctx[oc->engine]) {
+ ret = eng->context_new(chan, oc->engine);
+ if (ret)
+ return ret;
}
- }
- if (!chan->engctx[oc->engine]) {
- ret = dev_priv->eng[oc->engine]->context_new(chan, oc->engine);
- if (ret)
- return ret;
+ return eng->object_new(chan, oc->engine, handle, class);
}
- return dev_priv->eng[oc->engine]->object_new(chan, oc->engine, handle, class);
+ NV_ERROR(dev, "illegal object class: 0x%x\n", class);
+ return -EINVAL;
}
static int
@@ -676,9 +663,6 @@ nouveau_gpuobj_channel_init_pramin(struct nouveau_channel *chan)
size = 0x2000;
base = 0;
- /* PGRAPH context */
- size += dev_priv->engine.graph.grctx_size;
-
if (dev_priv->card_type == NV_50) {
/* Various fixed table thingos */
size += 0x1400; /* mostly unknown stuff */