From patchwork Mon Nov 7 22:46:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ma=C3=ADra_Canal?= X-Patchwork-Id: 13035377 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3FF57C4332F for ; Mon, 7 Nov 2022 22:48:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 432C310E57C; Mon, 7 Nov 2022 22:48:40 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 66B9510E57C for ; Mon, 7 Nov 2022 22:48:35 +0000 (UTC) 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_Canal?= To: Melissa Wen , Emma Anholt , David Airlie , Daniel Vetter 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 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Juan A . Suarez" , =?utf-8?q?Ma=C3=ADra_Canal?= , =?utf-8?q?Andr=C3=A9_Alme?= =?utf-8?q?ida?= , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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(-)