Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Mar 2016 11:57:32 +0000 (UTC)
From:      =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r296721 - head/sys/dev/drm2/i915
Message-ID:  <201603121157.u2CBvWDd034174@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Sat Mar 12 11:57:32 2016
New Revision: 296721
URL: https://svnweb.freebsd.org/changeset/base/296721

Log:
  drm/i915: Call i915_gem_gtt_fini() when the device is detached
  
  This fixes several memory leaks. Apparently, this problem exists in
  Linux 3.8 but the code changed in Linux 3.9 so it may be fixed upstream
  already. Still, this is something we need to pay attention to.

Modified:
  head/sys/dev/drm2/i915/i915_dma.c

Modified: head/sys/dev/drm2/i915/i915_dma.c
==============================================================================
--- head/sys/dev/drm2/i915/i915_dma.c	Sat Mar 12 11:54:58 2016	(r296720)
+++ head/sys/dev/drm2/i915/i915_dma.c	Sat Mar 12 11:57:32 2016	(r296721)
@@ -1810,6 +1810,12 @@ int i915_driver_unload(struct drm_device
 	if (dev_priv->mmio_map != NULL)
 		drm_rmmap(dev, dev_priv->mmio_map);
 
+	/*
+	 * NOTE Linux<->FreeBSD: Linux forgots to call
+	 * i915_gem_gtt_fini(), causing memory leaks.
+	 */
+	i915_gem_gtt_fini(dev);
+
 	if (dev_priv->wq != NULL)
 		taskqueue_free(dev_priv->wq);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603121157.u2CBvWDd034174>