diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-10-25 12:00:41 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2011-12-21 18:33:21 -0500 |
commit | 6de8a748881f1cd9d795454da2b6db616d5ca3d7 (patch) | |
tree | 55bedac6fab93c90461167039024eafdab72395f /drivers/gpu/drm/sis/sis_drv.c | |
parent | 77ee8f3825054f23b17e9c8f728f061defd86cdc (diff) |
drm/sis: track user->memblock mapping with idr
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/sis/sis_drv.c')
-rw-r--r-- | drivers/gpu/drm/sis/sis_drv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c index 6ad0b857ba2e..64d329f7d9b6 100644 --- a/drivers/gpu/drm/sis/sis_drv.c +++ b/drivers/gpu/drm/sis/sis_drv.c | |||
@@ -48,6 +48,7 @@ static int sis_driver_load(struct drm_device *dev, unsigned long chipset) | |||
48 | 48 | ||
49 | dev->dev_private = (void *)dev_priv; | 49 | dev->dev_private = (void *)dev_priv; |
50 | dev_priv->chipset = chipset; | 50 | dev_priv->chipset = chipset; |
51 | idr_init(&dev->object_name_idr); | ||
51 | ret = drm_sman_init(&dev_priv->sman, 2, 12, 8); | 52 | ret = drm_sman_init(&dev_priv->sman, 2, 12, 8); |
52 | if (ret) | 53 | if (ret) |
53 | kfree(dev_priv); | 54 | kfree(dev_priv); |
@@ -60,6 +61,9 @@ static int sis_driver_unload(struct drm_device *dev) | |||
60 | drm_sis_private_t *dev_priv = dev->dev_private; | 61 | drm_sis_private_t *dev_priv = dev->dev_private; |
61 | 62 | ||
62 | drm_sman_takedown(&dev_priv->sman); | 63 | drm_sman_takedown(&dev_priv->sman); |
64 | idr_remove_all(&dev_priv->object_idr); | ||
65 | idr_destroy(&dev_priv->object_idr); | ||
66 | |||
63 | kfree(dev_priv); | 67 | kfree(dev_priv); |
64 | 68 | ||
65 | return 0; | 69 | return 0; |