diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-02-01 10:39:45 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-02-25 06:44:45 +1000 |
commit | 30d81817a2a7eefcf4aa8b703d5f8330451c2648 (patch) | |
tree | 4edea626e3e05ae4df3c4989e170fdba79624315 /drivers/gpu/drm/nouveau/nv50_evo.c | |
parent | 59c0f5780f21ef10428bdaccd9999879f38225bc (diff) | |
download | talos-obmc-linux-30d81817a2a7eefcf4aa8b703d5f8330451c2648.tar.gz talos-obmc-linux-30d81817a2a7eefcf4aa8b703d5f8330451c2648.zip |
drm/nv50-nvc0: disp channels have fixed purposes, don't "allocate" them
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 | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c index d837168b5aa5..d9c77d84f0fe 100644 --- a/drivers/gpu/drm/nouveau/nv50_evo.c +++ b/drivers/gpu/drm/nouveau/nv50_evo.c @@ -33,15 +33,11 @@ static void nv50_evo_channel_del(struct nouveau_channel **pevo) { struct nouveau_channel *evo = *pevo; - struct nv50_display *disp; if (!evo) return; *pevo = NULL; - disp = nv50_display(evo->dev); - disp->evo_alloc &= ~(1 << evo->id); - nouveau_gpuobj_channel_takedown(evo); nouveau_bo_unmap(evo->pushbuf_bo); nouveau_bo_ref(NULL, &evo->pushbuf_bo); @@ -85,7 +81,8 @@ nv50_evo_dmaobj_new(struct nouveau_channel *evo, u32 class, u32 name, } static int -nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pevo) +nv50_evo_channel_new(struct drm_device *dev, int chid, + struct nouveau_channel **pevo) { struct nv50_display *disp = nv50_display(dev); struct nouveau_channel *evo; @@ -96,19 +93,7 @@ nv50_evo_channel_new(struct drm_device *dev, struct nouveau_channel **pevo) return -ENOMEM; *pevo = evo; - for (evo->id = 0; evo->id < 5; evo->id++) { - if (disp->evo_alloc & (1 << evo->id)) - continue; - - disp->evo_alloc |= (1 << evo->id); - break; - } - - if (evo->id == 5) { - kfree(evo); - return -ENODEV; - } - + evo->id = chid; evo->dev = dev; evo->user_get = 4; evo->user_put = 0; @@ -225,7 +210,7 @@ nv50_evo_create(struct drm_device *dev) /* create primary evo channel, the one we use for modesetting * purporses */ - ret = nv50_evo_channel_new(dev, &disp->master); + ret = nv50_evo_channel_new(dev, 0, &disp->master); if (ret) return ret; evo = disp->master; |