diff options
author | attilio <attilio@FreeBSD.org> | 2013-03-09 01:39:42 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-03-09 01:39:42 +0000 |
commit | 7fd2627275ba0d9190dcd45dbac54c31547450e6 (patch) | |
tree | 2f4765736b276f524838d85718824820c05c839c /sys/dev/drm2 | |
parent | bf1dc904466a6994f1b4cd94d2187edfeca7b187 (diff) | |
download | FreeBSD-src-7fd2627275ba0d9190dcd45dbac54c31547450e6.zip FreeBSD-src-7fd2627275ba0d9190dcd45dbac54c31547450e6.tar.gz |
MFC
Diffstat (limited to 'sys/dev/drm2')
-rw-r--r-- | sys/dev/drm2/drm_fb_helper.c | 5 | ||||
-rw-r--r-- | sys/dev/drm2/drm_global.c | 1 | ||||
-rw-r--r-- | sys/dev/drm2/ttm/ttm_bo.c | 1 | ||||
-rw-r--r-- | sys/dev/drm2/ttm/ttm_memory.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/drm2/drm_fb_helper.c b/sys/dev/drm2/drm_fb_helper.c index 2f24ec4..37b50cf 100644 --- a/sys/dev/drm2/drm_fb_helper.c +++ b/sys/dev/drm2/drm_fb_helper.c @@ -555,8 +555,11 @@ static void drm_fb_helper_crtc_free(struct drm_fb_helper *helper) for (i = 0; i < helper->connector_count; i++) free(helper->connector_info[i], DRM_MEM_KMS); free(helper->connector_info, DRM_MEM_KMS); - for (i = 0; i < helper->crtc_count; i++) + for (i = 0; i < helper->crtc_count; i++) { free(helper->crtc_info[i].mode_set.connectors, DRM_MEM_KMS); + if (helper->crtc_info[i].mode_set.mode) + drm_mode_destroy(helper->dev, helper->crtc_info[i].mode_set.mode); + } free(helper->crtc_info, DRM_MEM_KMS); } diff --git a/sys/dev/drm2/drm_global.c b/sys/dev/drm2/drm_global.c index 992d061..6372044 100644 --- a/sys/dev/drm2/drm_global.c +++ b/sys/dev/drm2/drm_global.c @@ -104,6 +104,7 @@ void drm_global_item_unref(struct drm_global_reference *ref) MPASS(ref->object == item->object); if (--item->refcount == 0) { ref->release(ref); + free(item->object, M_DRM_GLOBAL); item->object = NULL; } sx_xunlock(&item->mutex); diff --git a/sys/dev/drm2/ttm/ttm_bo.c b/sys/dev/drm2/ttm/ttm_bo.c index 12e5131..9cb9336 100644 --- a/sys/dev/drm2/ttm/ttm_bo.c +++ b/sys/dev/drm2/ttm/ttm_bo.c @@ -1400,7 +1400,6 @@ static void ttm_bo_global_kobj_release(struct ttm_bo_global *glob) ttm_mem_unregister_shrink(glob->mem_glob, &glob->shrink); vm_page_free(glob->dummy_read_page); - free(glob, M_DRM_GLOBAL); } void ttm_bo_global_release(struct drm_global_reference *ref) diff --git a/sys/dev/drm2/ttm/ttm_memory.c b/sys/dev/drm2/ttm/ttm_memory.c index ee74d94..dc85656 100644 --- a/sys/dev/drm2/ttm/ttm_memory.c +++ b/sys/dev/drm2/ttm/ttm_memory.c @@ -125,8 +125,6 @@ static ssize_t ttm_mem_zone_store(struct ttm_mem_zone *zone, static void ttm_mem_global_kobj_release(struct ttm_mem_global *glob) { - - free(glob, M_TTM_ZONE); } static bool ttm_zones_above_swap_target(struct ttm_mem_global *glob, |