From patchwork Tue Jun 17 14:17:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_Mart=C3=ADnez?= X-Patchwork-Id: 4366341 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A03289F26E for ; Tue, 17 Jun 2014 14:16:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AFB19201BC for ; Tue, 17 Jun 2014 14:16:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4ABEB20304 for ; Tue, 17 Jun 2014 14:16:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932903AbaFQOQW (ORCPT ); Tue, 17 Jun 2014 10:16:22 -0400 Received: from mail-yk0-f173.google.com ([209.85.160.173]:33660 "EHLO mail-yk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932696AbaFQOQV (ORCPT ); Tue, 17 Jun 2014 10:16:21 -0400 Received: by mail-yk0-f173.google.com with SMTP id q200so5277359ykb.18 for ; Tue, 17 Jun 2014 07:16:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=58XhYTzuMMzlHk6d1xbL8XzvhOHYHSinUrXW6i4qCt4=; b=hncx0FOiBGZurYU1RQwR57EAxu6Vz0Q4B1wlXJ7wBzOeRNffIBlUFHKrooneYcWYuE cmxH7EcO7pWnQtaQXhGYvzaiZ95yj2VYr0aw2S3PyqlrejMVVNYjuUmIO2ks1SPQaqZj V6/2s1Gfc0EPevgO6ex3EOuZFhEGDf0KuaDrE241NhHcjnk7NXDCpIjncvDKEO/2EH5W xKmRfMY9EXRB+F77V66Z4KFAtOgx1tFOFMnhNqBpEptxyzLVv0pGjzJvFDqmIA8bgP/j oY2sUiW5XREKw4o2J/0thR5iGSFg19TypwyWX4WT5hUmSYEfV0u/AIKZ+L+ppHLB6ILg Vn9A== X-Gm-Message-State: ALoCoQnIsIBj2JrvToJYVouuV+ZgDo78bjNssy/qGNM1JOvfSCJkIt08sxPIeZ8mAzswuAwEgt8n X-Received: by 10.236.147.74 with SMTP id s50mr44786287yhj.108.1403014580945; Tue, 17 Jun 2014 07:16:20 -0700 (PDT) Received: from localhost (host18.190-30-94.telecom.net.ar. [190.30.94.18]) by mx.google.com with ESMTPSA id m59sm26032018yhh.38.2014.06.17.07.16.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jun 2014 07:16:19 -0700 (PDT) From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: robdclark@gmail.com, =?UTF-8?q?Ezequiel=20Garc=C3=ADa?= , airlied@linux.ie, Daniel Mack , Russell King , Daniel Vetter , =?UTF-8?q?Guido=20Mart=C3=ADnez?= , Subject: [PATCH/RESEND 5/9] drm/tilcdc: panel: fix leak when unloading the module Date: Tue, 17 Jun 2014 11:17:07 -0300 Message-Id: <1403014631-18072-6-git-send-email-guido@vanguardiasur.com.ar> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1403014631-18072-1-git-send-email-guido@vanguardiasur.com.ar> References: <1402110128-30471-1-git-send-email-guido@vanguardiasur.com.ar> <1403014631-18072-1-git-send-email-guido@vanguardiasur.com.ar> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver did not unregister the allocated framebuffer, which caused memory leaks (and memory manager WARNs) when unloading. Also, the framebuffer device under /dev still existed after unloading. Add a call to drm_fbdev_cma_fini when unloading the module to prevent both issues. Signed-off-by: Guido Martínez Cc: #v3.9+ --- drivers/gpu/drm/tilcdc/tilcdc_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index b20b694..490aee7 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -122,6 +122,7 @@ static int tilcdc_unload(struct drm_device *dev) struct tilcdc_drm_private *priv = dev->dev_private; struct tilcdc_module *mod, *cur; + drm_fbdev_cma_fini(priv->fbdev); drm_kms_helper_poll_fini(dev); drm_mode_config_cleanup(dev); drm_vblank_cleanup(dev);