From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97007C2B9F4 for ; Mon, 14 Jun 2021 11:47:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0507461105 for ; Mon, 14 Jun 2021 11:47:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0507461105 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=igalia.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BEF489B9E; Mon, 14 Jun 2021 11:47:03 +0000 (UTC) Received: from fanzine.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0C8EC89B9E for ; Mon, 14 Jun 2021 11:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID; bh=KcFtfTYDKfchizoaHzhcPpag/3lWCXtZGfTEBkAln28=; b=IAR2PpNRU9gbvSA4wEMuALD2UeLwdkP+/2ttu3MW187snvbWxTJnKu1XORW9Jgk/MiBLSmTdpzTKCUEykEZd+skjgU2KNQGdXromXRgdo7aVMyoF4+oNsKAmX+8LjzITEQMxWM1cSd6QLAn17QflQbDqkijBFqQ04wmJNb6XFSc4n+B/1PI/9E6Hz5ukQ3pSzEkhVPnhoQgpZAxJzVYjnrft5agHIHsEBMbmZl52+2kjVPEP+FbVGfmMGvnqLIbLUebluF/fc1WiDFYNw84yQhzmO5KYJknes9pzCt24/fZEKyKp47WnlvPGAB++JbajDhHPJy5jMX8GgjJDTpRLJA==; Received: from [192.168.10.187] by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1lsl3T-0002cy-9J; Mon, 14 Jun 2021 13:46:59 +0200 Message-ID: <0d9f83cf132a76b7d4d664d623e88ecef056bf35.camel@igalia.com> Subject: Re: [PATCH] drm/v3d: Expose performance counters to userspace From: "Juan A." =?ISO-8859-1?Q?Su=E1rez?= To: dri-devel@lists.freedesktop.org Date: Mon, 14 Jun 2021 13:46:58 +0200 In-Reply-To: <20210608111541.461991-1-jasuarez@igalia.com> References: <20210608111541.461991-1-jasuarez@igalia.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.1 (3.40.1-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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: David Airlie , Emma Anholt Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, 2021-06-08 at 13:15 +0200, Juan A. Suarez Romero wrote: > The V3D engine has several hardware performance counters that can of > interest for userspace performance analysis tools. > > This exposes new ioctls to create and destroy performance monitor > objects, as well as to query the counter values. > > Each created performance monitor object has an ID that can be attached > to CL/CSD submissions, so the driver enables the requested counters > when > the job is submitted, and updates the performance monitor values when > the job is done. > > It is up to the user to ensure all the jobs have been finished before > getting the performance monitor values. It is also up to the user to > properly synchronize BCL jobs when submitting jobs with different > performance monitors attached. > > Cc: Daniel Vetter > Cc: David Airlie > Cc: Emma Anholt > To: dri-devel@lists.freedesktop.org > Signed-off-by: Juan A. Suarez Romero Here is a link to Mesa MR that implements the support in the driver: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10666 J.A.