Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp578027rdh; Wed, 14 Feb 2024 05:52:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEJ9Q1fxr5Wj0oY7pd1kpljQejVpxKTm/GVsJKPLLZLgmvwP5I680lz8X19lNue7d7iV+V0V+8MxZ9YbBsH9/vHOTm9gIh++ISEN5rOA== X-Google-Smtp-Source: AGHT+IGX9h1WPBoF4drXj2L+PYnVEiQDO4pXLs3enJGyOUOGanqutWS+RELkl2MGEV3a5OwytqNz X-Received: by 2002:a17:903:110c:b0:1d9:6cc7:d40b with SMTP id n12-20020a170903110c00b001d96cc7d40bmr3306829plh.25.1707918734331; Wed, 14 Feb 2024 05:52:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707918734; cv=pass; d=google.com; s=arc-20160816; b=KRyFh8C+PVvIYHrHyE6dn6a+Hvg4yO1Hl0OWyxQUcdvDdgQCdhZguuDgeFHtqZhqtQ kpSLhHFlUaNNNx1KVXi0o7Q35dd2plXImU220yuPyHeo3KQ0nuSphGwTVGooC9a0GYNB dKPjAFDSCS29/7w/zG00xuC4+jeZZ+jizDTBiui2+q1ho2SMvprLjH8ScQte4dfP83Jj 7d2sl101JqnwcUGTqNf6Q1HmefnD3hPCa04xkGt64onN0eCxp6qie/Badvt4jxf4hrjH 0WTNqu9sUKPkuzoIiVgaJ2INurxivsHPPJWAM9kFLe6uVTuatUiTedsWvKwv3MMotYF8 /Mjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=DokRgj/PH7afG0jJhirM+BqqxVvVTEL5yvAUH5TpU28=; fh=bcmnWeK8mWqKqKL8D5kDS1+lD7RSASimSRYG8Ys7up4=; b=RQT5NGB363GlRNUB6tvpBHSEhSzwX/9NQnhpKXECa/jBYvj7Lw1F9jyOnhaXc1/7k5 z85bfD4CTrK6ciFhHQgNjLF2A9RZOTTZr/xtLxh5xNy/GUYtgXrJI8DAkVFU4ZXiGHCL 6KALlVxUWp6Y2R7zaftriHAyUVij34pTAA0l/+XtQvagDZJl8vjU9r8S9mmQLoRzyR6U pxesVORArNnZ5KwL0ZqMj3c2zlkoUVUJoZoWHR7PFU1JocSZM5CWsaJ4IKgSa5XJ+N27 ldmMQYbtjTRR5qhJL+xqjdbc2URodA0mVeodfeBjUwOA3BjGvKRxpO45DWOOYH7fXhLV qBKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-65296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCWaTzLZ43NufhRXVMWxPIyqTZOWTzs26JzIxAGozXc4UDmNkZYh4tVm22+/nm2BSYSZksInW2NcpNlhErLR+/YYI5sKnkp7Od0NUetdfw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b2-20020a170903228200b001d95fa9bf07si3829934plh.428.2024.02.14.05.52.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 05:52:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-65296-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 049E328B1AF for ; Wed, 14 Feb 2024 13:52:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3152254BDF; Wed, 14 Feb 2024 13:52:08 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 42F1D54BD2 for ; Wed, 14 Feb 2024 13:52:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707918727; cv=none; b=TXnGsyo9KD6ok64HiF6mj3u91L6LeootqiXbSUtc0Hsz8R0nznM/2fvTzwQ0k5tfD1u1xAQWrdXIji7TN4vxqd2oYuMOCslaY6LTEm/qtwlqwFYg7nGDKn5B0IXMuU3IYU4Ja0kZEAW1xCcXdh4gIypEZfhLuNVCR5dwiegW78k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707918727; c=relaxed/simple; bh=LrtHpvJw1vI6P720DwnUq6dxSYylRr0Q5fQtw2Jur1w=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ev+wEyeD04I05ZN22DGK39P+29o9Bt40vxi41oO3LMEVQkQcFjGat89kC5ZD6uWDnKbEV/3Z9IrXjXnuym+ZtV6Q+fojz3BduN9a6NBuz+NddLvc+l/TmAw+I38san+pKZ9PaLwH19aeKtVlLkJLd8XoJEMrovHP7ie78oDC8d0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9F77B1FB; Wed, 14 Feb 2024 05:52:45 -0800 (PST) Received: from [10.57.64.191] (unknown [10.57.64.191]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B8B7A3F5A1; Wed, 14 Feb 2024 05:52:02 -0800 (PST) Message-ID: Date: Wed, 14 Feb 2024 13:52:05 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/1] Always record job cycle and timestamp information To: =?UTF-8?Q?Adri=C3=A1n_Larumbe?= , Boris Brezillon , Rob Herring , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20240214121435.3813983-1-adrian.larumbe@collabora.com> Content-Language: en-GB From: Steven Price In-Reply-To: <20240214121435.3813983-1-adrian.larumbe@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Adrián, On 14/02/2024 12:14, Adrián Larumbe wrote: > A driver user expressed interest in being able to access engine usage stats > through fdinfo when debugfs is not built into their kernel. In the current > implementation, this wasn't possible, because it was assumed even for > inflight jobs enabling the cycle counter and timestamp registers would > incur in additional power consumption, so both were kept disabled until > toggled through debugfs. > > A second read of the TRM made me think otherwise, but this is something > that would be best clarified by someone from ARM's side. I'm afraid I can't give a definitive answer. This will probably vary depending on implementation. The command register enables/disables "propagation" of the cycle/timestamp values. This propagation will cost some power (gates are getting toggled) but whether that power is completely in the noise of the GPU as a whole I can't say. The out-of-tree kbase driver only enables the counters for jobs explicitly marked (BASE_JD_REQ_PERMON) or due to an explicit connection from a profiler. I'd be happier moving the debugfs file to sysfs rather than assuming that the power consumption is small enough for all platforms. Ideally we'd have some sort of kernel interface for a profiler to inform the kernel what it is interested in, but I can't immediately see how to make that useful across different drivers. kbase's profiling support is great with our profiling tools, but there's a very strong connection between the two. Steve > Adrián Larumbe (1): > drm/panfrost: Always record job cycle and timestamp information > > drivers/gpu/drm/panfrost/Makefile | 2 -- > drivers/gpu/drm/panfrost/panfrost_debugfs.c | 21 ------------------ > drivers/gpu/drm/panfrost/panfrost_debugfs.h | 14 ------------ > drivers/gpu/drm/panfrost/panfrost_device.h | 1 - > drivers/gpu/drm/panfrost/panfrost_drv.c | 5 ----- > drivers/gpu/drm/panfrost/panfrost_job.c | 24 ++++++++------------- > drivers/gpu/drm/panfrost/panfrost_job.h | 1 - > 7 files changed, 9 insertions(+), 59 deletions(-) > delete mode 100644 drivers/gpu/drm/panfrost/panfrost_debugfs.c > delete mode 100644 drivers/gpu/drm/panfrost/panfrost_debugfs.h > > > base-commit: 6b1f93ea345947c94bf3a7a6e668a2acfd310918