From patchwork Thu Jul 19 00:40:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10533499 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EA78760547 for ; Thu, 19 Jul 2018 00:40:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA031298F9 for ; Thu, 19 Jul 2018 00:40:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D862A29914; Thu, 19 Jul 2018 00:40:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9775429904 for ; Thu, 19 Jul 2018 00:40:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D829D6EC97; Thu, 19 Jul 2018 00:40:50 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 708C36EC43 for ; Thu, 19 Jul 2018 00:40:49 +0000 (UTC) Received: by mail-qk0-x243.google.com with SMTP id c126-v6so3420260qkd.7 for ; Wed, 18 Jul 2018 17:40:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=ap2badaDWQjQnmF7X+julRJKudqASlrFceHWK1VAdyQ=; b=fP5GdrtDYO7QZQEqfFMEoyVobHzxLDiN5z8FFNEqBYMs653zlKMMKewj211nUXRJZL jCU3Qtvu3iaCRWe6OH5uuY4iJ/Q+usTdqBw4iICRdiexPsNVdaDFcQbrqX6vQfuGg9Q9 JrC4jLuMr52mIgVvyEMo/Nr2BqVmuugqMHFJ35aYlNPdlPsflvQaeWyi6eZzuDA73em0 2UgYi7FIksiqSJ/pxRrcfs6krx6O+LDz1xEZ7mLQEHySQCgsYULSuXMIlu7+sSA8Gsnl kYX5pn4zXYc6HE6/T4KR/yEjXh6WXcE2f7hBM6WyYMGF2tZFAh7fdEAHeWurQUbOmquO NETQ== X-Gm-Message-State: AOUpUlFJ78NaXJDty6PlnK0h1szFIUEWhBUABoPxvxq6hYifgEyFBiaX CwRv77SqgSRz3T6O75ViAgo= X-Google-Smtp-Source: AAOMgpcpbEiDnVgKOgyk7IDmV/Io7c68sj7INfLO/N2J9ZSoswx538PwMqgDdfyhYUhpqqqDzA/50g== X-Received: by 2002:a37:953:: with SMTP id 80-v6mr7484733qkj.331.1531960848604; Wed, 18 Jul 2018 17:40:48 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id w13-v6sm4487158qtc.88.2018.07.18.17.40.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Jul 2018 17:40:48 -0700 (PDT) Date: Wed, 18 Jul 2018 21:40:45 -0300 From: Rodrigo Siqueira To: Daniel Vetter , Gustavo Padovan , Sean Paul , Haneen Mohammed Subject: [PATCH] drm/vkms: Fix connector leak at the module removal Message-ID: <20180719004045.hzepp565x5lfco3c@smtp.gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20180622 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Currently, vkms shows an error message if the following steps occur: (1) load vkms, (2) perform any specific operation in the vkms (e.g., run an IGT test), and (3) unload the module. The following error message emerges: [drm:drm_mode_config_cleanup [drm]] *ERROR* connector Virtual-1 leaked! This commit fixes this error by calling drm_atomic_helper_shutdown() before drm_mode_config_cleanup, which turns off the whole display pipeline and remove a reference related to any connector. Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/vkms/vkms_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c index 37aa2ef33b21..6e728b825259 100644 --- a/drivers/gpu/drm/vkms/vkms_drv.c +++ b/drivers/gpu/drm/vkms/vkms_drv.c @@ -44,6 +44,7 @@ static void vkms_release(struct drm_device *dev) struct vkms_device *vkms = container_of(dev, struct vkms_device, drm); platform_device_unregister(vkms->platform); + drm_atomic_helper_shutdown(&vkms->drm); drm_mode_config_cleanup(&vkms->drm); drm_dev_fini(&vkms->drm); }