From patchwork Fri Oct 4 12:35:59 2024 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: 13822235 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 78C23CFA774 for ; Fri, 4 Oct 2024 12:38:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EF8A210E2A4; Fri, 4 Oct 2024 12:38:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="dBx7Rgpz"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 880C510E2A4 for ; Fri, 4 Oct 2024 12:38:56 +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=HiIBNMD6TqVy+kHGZBrc2oBb5wvJoYl+UJqHMRj5e1w=; b=dBx7RgpziMT3VQ7Lg6AsBWPwv7 dAtzJfsiE4uCZfk0FJ5XV7+Up/b6GzMLKSNszInb+y4df1zrenmU1gklW5I1nT38BDm0mi1xFuFE0 bSKChhwl2qDIqv7+km51XX1Jqh0418neo0vfM+zGx6H+ui3hO7AdQV28hOounLNiSO16AEBsYR6G1 oQWK9upXQpWHcLX2rLS4g0IdbJWnryI4sLUokcRh3UYykDakD5R50ZcPLVbnkQDvR6axxG8AShDi8 H4E2YPzsBci/Edb7Spbn0uKYFSQ/z/KPFzExi+gQx9anbDoomDVS/Qc7WQMX0s2DxUk4eRNP51BP7 LSpbPZ3w==; Received: from [187.36.213.55] (helo=morissey..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1swha2-004phG-3c; Fri, 04 Oct 2024 14:38:46 +0200 From: =?utf-8?q?Ma=C3=ADra_Canal?= To: Maxime Ripard , Dave Stevenson , "Juan A . Suarez Romero" , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: dri-devel@lists.freedesktop.org, kernel-dev@igalia.com, =?utf-8?q?Ma?= =?utf-8?q?=C3=ADra_Canal?= , Christian Gmeiner Subject: [PATCH 1/2] drm/vc4: Use `vc4_perfmon_find()` Date: Fri, 4 Oct 2024 09:35:59 -0300 Message-ID: <20241004123817.890016-1-mcanal@igalia.com> X-Mailer: git-send-email 2.46.2 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Similar to commit f2a4bcb25328 ("drm/v3d: Use v3d_perfmon_find()"), replace the open-coded `vc4_perfmon_find()` with the real thing. Cc: Christian Gmeiner Signed-off-by: MaĆ­ra Canal Reviewed-by: Juan A. Suarez Reviewed-by: Christian Gmeiner --- drivers/gpu/drm/vc4/vc4_perfmon.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_perfmon.c b/drivers/gpu/drm/vc4/vc4_perfmon.c index 4cd3643c3ba7..f2e56d0f6298 100644 --- a/drivers/gpu/drm/vc4/vc4_perfmon.c +++ b/drivers/gpu/drm/vc4/vc4_perfmon.c @@ -236,11 +236,7 @@ int vc4_perfmon_get_values_ioctl(struct drm_device *dev, void *data, return -ENODEV; } - mutex_lock(&vc4file->perfmon.lock); - perfmon = idr_find(&vc4file->perfmon.idr, req->id); - vc4_perfmon_get(perfmon); - mutex_unlock(&vc4file->perfmon.lock); - + perfmon = vc4_perfmon_find(vc4file, req->id); if (!perfmon) return -EINVAL;