From patchwork Wed Dec 12 13:07:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 1867141 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 5389E3FC81 for ; Wed, 12 Dec 2012 14:38:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 37A73E6645 for ; Wed, 12 Dec 2012 06:38:02 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 0CD1BE613D for ; Wed, 12 Dec 2012 05:15:43 -0800 (PST) Received: by mail-ee0-f49.google.com with SMTP id c4so430858eek.36 for ; Wed, 12 Dec 2012 05:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=qGkwhIbRW0hAyY1MIzNbPFA1lQya6NrL+7SgJEMBfmY=; b=TrJvdnnyOBW4OcNEztYUTOkwKkGOl8l9/RX3KeJkhKUv3Zm8DS4GpsZBaVFdJO/f0n tJTq+0sNIHqv0eajckLb96paV8zbKmko9cEA0WFnO6Wo57Or3zBXTGUK1qUrs5h7bTTJ bzWSPA3qx1d8+H/aUzV/0YtBvnxO6jC7EuKeE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=qGkwhIbRW0hAyY1MIzNbPFA1lQya6NrL+7SgJEMBfmY=; b=EFJTjERQtaGD0kgo/1RFKToscUcCAAd5Dry48LrMb3pMk3h5yC6gzzOOhxQvt+3vEj umAYOOt26YHEm5LPxacHByciYt+6W96evmxBV0leut5qVGiAV6P6YeQPXLkNKErsx6eo NqsHJXZF3FlnkutgI0ututW+Zqo91Kzp6DaqPlouHg4nidcKuGnaUi7f7qcdzJoqUhWR h/DeK7KqNsE7Zj07tyYphCz13+LtZ9bZ1jnEQ9nlK5884zgu7zjDaxpc2+xERbGz6yHO 5CZqy3DYjFpBnvyl7VPzXyoW78xBB7ppEEoNpl8O6rC3tVOxPm/PyOL2KQJlv/dBrn9C YbjQ== Received: by 10.14.221.5 with SMTP id q5mr2698117eep.33.1355317666590; Wed, 12 Dec 2012 05:07:46 -0800 (PST) Received: from biers.ffwll.local (178-83-130-250.dynamic.hispeed.ch. [178.83.130.250]) by mx.google.com with ESMTPS id r1sm55868541eeo.2.2012.12.12.05.07.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Dec 2012 05:07:46 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 23/37] drm/i915: fixup overlay stolen memory leak Date: Wed, 12 Dec 2012 14:07:03 +0100 Message-Id: <1355317637-16742-24-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1355317637-16742-1-git-send-email-daniel.vetter@ffwll.ch> References: <1355317637-16742-1-git-send-email-daniel.vetter@ffwll.ch> X-Gm-Message-State: ALoCoQnTBxQ7EHidmXwAcWLlP8ZxTSKetY2J71Rq/TF63IimKkUYXdSza2CcSlsxx/sXTV/Z9Qlm Cc: Nouveau Dev , Intel Graphics Development , Radeon Dev , Daniel Vetter X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org We need to clean up the overlay first, before taking down the stolen memory allocator. This regression has been introducec in commit 8040513870399f1cb032cb8bc805df5042fedcdf Author: Chris Wilson Date: Thu Nov 15 11:32:29 2012 +0000 drm/i915: Allocate overlay registers from stolen memory Note: This is just a quick hack to shut up a warning in the module unload code, so that I can check again whether we don't leak any framebuffers. Cc: Chris Wilson Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index ad488f6..532ad39 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c @@ -1720,9 +1720,9 @@ int i915_driver_unload(struct drm_device *dev) mutex_unlock(&dev->struct_mutex); i915_gem_cleanup_aliasing_ppgtt(dev); i915_gem_cleanup_stolen(dev); - drm_mm_takedown(&dev_priv->mm.stolen); intel_cleanup_overlay(dev); + drm_mm_takedown(&dev_priv->mm.stolen); if (!I915_NEED_GFX_HWS(dev)) i915_free_hws(dev);