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 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 4431DC001DE for ; Wed, 19 Jul 2023 08:39:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1DA0210E42F; Wed, 19 Jul 2023 08:39:03 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id A11BE10E430 for ; Wed, 19 Jul 2023 08:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689755939; x=1721291939; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5tzYfJ3bRqxWf6/IoM26DqShF1+40XjTrPTF4KAenm0=; b=INoOteGi95GDqOdvU00vGjJ/h5LTHQalnzDUBnczVhWoSmttsJGIwbP+ 8Z9m/1Y+Zeu6l+DTUYwUQGDOksejahVZJHjaIl5ww+TN5oqYTIBr5VRaC uuPoyvJbrIj7N31+n1YwHMk6pBmFsOKParpN397t9FtxzERuIEjva//bR Tcg1RTKUz2V6VAxXVQG343hdumU1kW/FGxwcx1ZsVga4PNN37qI9iM7dE bkxosCLBmJ7dnH2m/PP1mRa375dSgrWEZ3aCM4BcCxJY62EpnXIHNesNx cV1XKP97bm+boSt8uEY/WfXma2seYdttRSa1d+fchfA5BqGKma1yOnjBD g==; X-IronPort-AV: E=McAfee;i="6600,9927,10775"; a="345999026" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="345999026" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 01:38:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10775"; a="837603339" X-IronPort-AV: E=Sophos;i="6.01,216,1684825200"; d="scan'208";a="837603339" Received: from gtroy-mobl1.ger.corp.intel.com (HELO mwauld-desk1.intel.com) ([10.252.29.95]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jul 2023 01:38:58 -0700 From: Matthew Auld To: intel-xe@lists.freedesktop.org Date: Wed, 19 Jul 2023 09:38:06 +0100 Message-ID: <20230719083801.182123-16-matthew.auld@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230719083801.182123-12-matthew.auld@intel.com> References: <20230719083801.182123-12-matthew.auld@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Intel-xe] [PATCH v15 04/10] drm/xe/guc_pc: add missing mem_access for freq_rpe_show X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rodrigo Vivi Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" The mem_access is meant to cover any kind of device level memory access, mmio included. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: Rodrigo Vivi Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta --- drivers/gpu/drm/xe/xe_guc_pc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index 03dfbde29fe5..0927cb669603 100644 --- a/drivers/gpu/drm/xe/xe_guc_pc.c +++ b/drivers/gpu/drm/xe/xe_guc_pc.c @@ -422,8 +422,12 @@ static ssize_t freq_rpe_show(struct device *dev, struct device_attribute *attr, char *buf) { struct xe_guc_pc *pc = dev_to_pc(dev); + struct xe_gt *gt = pc_to_gt(pc); + struct xe_device *xe = gt_to_xe(gt); + xe_device_mem_access_get(xe); pc_update_rp_values(pc); + xe_device_mem_access_put(xe); return sysfs_emit(buf, "%d\n", pc->rpe_freq); } static DEVICE_ATTR_RO(freq_rpe); -- 2.41.0