diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-11-22 16:05:54 +1000 |
---|---|---|
committer | Francisco Jerez <currojerez@riseup.net> | 2010-12-08 03:00:34 +0100 |
commit | d908175cca901b95ba1628428b216e6e7188e8fb (patch) | |
tree | 720e95c36101ca4fa2d46792c58bd2456c2df8db /drivers/gpu/drm/nouveau/nouveau_channel.c | |
parent | 395a31ec7ed9b02c5412f4405acbd6fceacca0fc (diff) | |
download | kernel_samsung_smdk4412-d908175cca901b95ba1628428b216e6e7188e8fb.zip kernel_samsung_smdk4412-d908175cca901b95ba1628428b216e6e7188e8fb.tar.gz kernel_samsung_smdk4412-d908175cca901b95ba1628428b216e6e7188e8fb.tar.bz2 |
drm/nouveau: make fifo.create_context() responsible for mapping control regs
The regs belong to PFIFO, they're different for pretty much the same
generations we need different PFIFO control for, and NVC0 is going
to be even more different than the rest.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_channel.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_channel.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c index 3e49bab..a3d33a5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_channel.c +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c @@ -113,7 +113,7 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; struct nouveau_channel *chan; unsigned long flags; - int user, ret; + int ret; /* allocate and lock channel structure */ chan = kzalloc(sizeof(*chan), GFP_KERNEL); @@ -160,23 +160,6 @@ nouveau_channel_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret, } nouveau_dma_pre_init(chan); - - /* Locate channel's user control regs */ - if (dev_priv->card_type < NV_40) - user = NV03_USER(chan->id); - else - if (dev_priv->card_type < NV_50) - user = NV40_USER(chan->id); - else - user = NV50_USER(chan->id); - - chan->user = ioremap(pci_resource_start(dev->pdev, 0) + user, - PAGE_SIZE); - if (!chan->user) { - NV_ERROR(dev, "ioremap of regs failed.\n"); - nouveau_channel_put(&chan); - return -ENOMEM; - } chan->user_put = 0x40; chan->user_get = 0x44; @@ -356,9 +339,6 @@ nouveau_channel_del(struct kref *ref) struct nouveau_channel *chan = container_of(ref, struct nouveau_channel, ref); - if (chan->user) - iounmap(chan->user); - kfree(chan); } |