Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2568537rwb; Mon, 7 Nov 2022 15:06:52 -0800 (PST) X-Google-Smtp-Source: AMsMyM7oByTyL+5nQOvooP9XsqA/cHJJsMK3BCjcY8/QKV/svzgveT7z2JWVJV9K3FdrU28uS+Rn X-Received: by 2002:a17:907:763a:b0:7ad:e517:246 with SMTP id jy26-20020a170907763a00b007ade5170246mr38037186ejc.128.1667862412711; Mon, 07 Nov 2022 15:06:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667862412; cv=none; d=google.com; s=arc-20160816; b=FxyXn+6kXUrGgWrLEIwki5h+UmJmds5os318iYjoLwTjjpKLTU1j4YEuGE8OYojaWU cUope09A18UEWNKXsVdvKWHKJWoUDZpjDLm44EIqxkZlqZbYuRB6H84M5hgUhFYfTays K5AY7s1ynFKmEHGJOGRyIQcZsYVvuGmqBIFEPd5ZLo+jUt+FpCKpIe6P1KSvK7tZ66O+ EsEBKFvYaCxIHDZL+/TaIiF+A/1PXy69EvcFJ+RR++by6SCTVBTm6cNtzyG0+WAzA5/3 u7+fM5qQ+dcrU012N3aHdMvFySht0NbG6vpDMq6Qaj8UDpBnOVWR/HbeAm4JURm2dQeu TUHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=XW4en+FXtuU7AeOU4Nz6A3vrLZ+LD/LMQcdGwCIrXWs=; b=eQZ1jaCWUIc3bR0mKPiNnfLgThFEQjGx6g8JFhQPRZrBVChT/p+2/sqzthCcVcQCpg PBmn5OcRCCmxpBlvXeaUtbr4NHk+oQrID/T+AzLZk9AkO83RJmhP0o9v5h+3IY9FiTFF Zs3YroiimRk80TN4Cou+zaKwb7bnBnQvvyzrD3rzM1JtCWHbsLHEkV3OUMrszqAvt2BM tc6dUIhtOZRNdZyJjX6tAldgahuc/btSjwvbPBUtlr8qInYurDUEiuavE/5VjRN5zyAi iUkSxmyRDVuOlqMnJoDuaAkvsxLYt48t6ktQxrStu6MIl4rkjql5Z7WpRzFDdsFqGf/5 lLGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=coQMHD2O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a170906714a00b0078d4b9428cdsi8021901ejj.389.2022.11.07.15.06.30; Mon, 07 Nov 2022 15:06:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=coQMHD2O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232650AbiKGWsj (ORCPT + 92 others); Mon, 7 Nov 2022 17:48:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231450AbiKGWsi (ORCPT ); Mon, 7 Nov 2022 17:48:38 -0500 Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99A2327CDF for ; Mon, 7 Nov 2022 14:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XW4en+FXtuU7AeOU4Nz6A3vrLZ+LD/LMQcdGwCIrXWs=; b=coQMHD2OJUN7M7rXdPwhKvRhP9 qoRt+tMffyIkrAWHTzXrYFTIFMUeFHB6L1ztmy/xxqVj7cLaPGbg1A0IkCY+BkbMxsX1rHNtlqcrw CgHiNO0ioTxep1i+rkYj3DvDrTZoQl2dq9TLY65687moAkPhKka7k1Ih8qWa2isIDVRQeNRYRrXLq kQ+R1al2gYaUP7VIY3AH7TpKtBAqKHOHqOJhzRRaASQet9ewm89l/YF/t/ZdS31RTW4KlOgQE40k8 WmCD/m7HGVTD13wKBNMVlllqDKJT6+46TCpbBogbQqAmineC2HFgx05nAt6UUkvizSl2Zbxi2bcEJ VenNJdsA==; Received: from [177.34.169.227] (helo=bowie..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1osAur-00E9qX-6q; Mon, 07 Nov 2022 23:48:29 +0100 From: =?UTF-8?q?Ma=C3=ADra=20Canal?= To: Melissa Wen , Emma Anholt , David Airlie , Daniel Vetter Cc: =?UTF-8?q?Andr=C3=A9=20Almeida?= , "Juan A . Suarez" , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Ma=C3=ADra=20Canal?= Subject: [PATCH 0/2] Balance mutex_init and mutex_destroy calls Date: Mon, 7 Nov 2022 19:46:54 -0300 Message-Id: <20221107224656.278135-1-mcanal@igalia.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series introduces some changes to assure the correct resource release on the V3D driver, especially the mutex. Currently, the V3D has no mutex_destroy() calls, which means that a mutex is being instantiated, but it is not being released by the end of its use. So, use the DRM-managed mutex_init variants when possible to manage the mutex release and add mutex_destroy() calls when not possible. Best Regards, - Maíra Canal Maíra Canal (2): drm/v3d: switch to drmm_mutex_init drm/v3d: add missing mutex_destroy drivers/gpu/drm/v3d/v3d_gem.c | 17 +++++++++++++---- drivers/gpu/drm/v3d/v3d_perfmon.c | 2 ++ 2 files changed, 15 insertions(+), 4 deletions(-) -- 2.38.1