Commit 40c34d04 authored by Daniel Vetter's avatar Daniel Vetter

drm/i810: don't acces hw regs in lastclose

i810 uses a userspace provided mmio map using the drm core map
infrastructure. By the time we reach lastclose, this is all gone
and our mmio_map pointer points at freed memory. Depending upon
luck that still works, most often it just oopses.

Aside: drm maps aren't refcounted, so userspace can essentially oops
the kernel any time it wants to. Who cares.
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 87499ffd
...@@ -222,8 +222,6 @@ static int i810_dma_cleanup(struct drm_device *dev) ...@@ -222,8 +222,6 @@ static int i810_dma_cleanup(struct drm_device *dev)
pci_free_consistent(dev->pdev, PAGE_SIZE, pci_free_consistent(dev->pdev, PAGE_SIZE,
dev_priv->hw_status_page, dev_priv->hw_status_page,
dev_priv->dma_status_page); dev_priv->dma_status_page);
/* Need to rewrite hardware status page */
I810_WRITE(0x02080, 0x1ffff000);
} }
kfree(dev->dev_private); kfree(dev->dev_private);
dev->dev_private = NULL; dev->dev_private = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment