Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0C974266B2 for ; Wed, 23 Sep 2026 18:11:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790187095; cv=none; b=tcdaUDD/T0hiXmIbALxS7kB1+ua+S7Olx03HN9Wm+kbtuS0Eu3SZjOz85urCgB3M5TfCuUM9PsSc3T3LGyIK2I6hQZUkg66RZaEzioLCPNP956w6a/wI1s4dpPV0Dxw0I4EGSSWhaaQV10yIjojvAa+xCSq1/YEj+oNCnbnnG/8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790187095; c=relaxed/simple; bh=eJeOTiBTBqYNvEb7mZ7RC2BJ+w9di6yxQX+5UZKqwRk=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nPpA063VWG0briPLuQ7D+EbHM7CvIoOGdkeTUVQxjOklIt3m41h97PWAYqugWURzVJ5doPhlGWeDFMxM0TJR9tgFgvGDly6EHCxZv3jkHpqnCwpHxeIZnhB0PP/2qjjsmsaXLNf84RO7UFgpYWmZkiiKbglJp6PhJn/lw7PoMWE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Ru46Z94+; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Ru46Z94+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1790187093; x=1821723093; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=eJeOTiBTBqYNvEb7mZ7RC2BJ+w9di6yxQX+5UZKqwRk=; b=Ru46Z94+olQtq2gmPOhHTGBjATr+8E7HDDiVNTLwf+Xs/Jqg7pbICRhx KzC9oY6Pe8um26pSCqbyM6s+tKM3pI9AUU9A8YEmIYADAt3BrwmmO0G1V RkCgj0+r+/DMRXymoy9zxboxaj73ldqVDfFe58E3DgJ4bjLduEkq1HcVc G5UN8Ba3MfceiOlj78cTuULZXwoc+zZFBkC2cEJbBLmginHrek9RHYo/t zpFnUu0qquUJxe3tasbCvdYmyN2X990T633WdRZU2LLgi0yOHXC1PHXn5 VXG/QwJbU6YTY+sTPWpkVI+frUI/A/dI2wENOjEHGSy9nDNDk05EPu7YW Q==; X-CSE-ConnectionGUID: 5+O+8dLuTPGGNDibgXHEvg== X-CSE-MsgGUID: KuYcguhaRnS68ZViRpVkww== X-IronPort-AV: E=McAfee;i="6800,10657,11914"; a="93416016" X-IronPort-AV: E=Sophos;i="6.27,119,1787036400"; d="scan'208";a="93416016" Received: from fmviesa013.fm.intel.com ([10.60.135.153]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2026 11:11:25 -0700 X-CSE-ConnectionGUID: n61mxRc/TG++vCWm0dIc+A== X-CSE-MsgGUID: l671L12qQxKi4qXsCMnjiQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,119,1787036400"; d="scan'208";a="4980701" Received: from mjruhl-vm.amr.corp.intel.com ([10.11.186.166]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2026 11:11:25 -0700 From: "Michael J. Ruhl" To: platform-driver-x86@vger.kernel.org, intel-xe@lists.freedesktop.org, hansg@kernel.org, ilpo.jarvinen@linux.intel.com, matthew.brost@intel.com, rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com, airlied@gmail.com, simona@ffwll.ch, david.e.box@linux.intel.com, anoop.c.vijay@intel.com, badal.nilawar@intel.com, matthew.d.roper@intel.com, james.ausmus@intel.com, karthik.poosa@intel.com Subject: [PATCH v11 09/20] drm/xe/vsec: Add DOC text for VSEC Date: Wed, 23 Sep 2026 11:11:24 -0700 Message-ID: <20260923181115.2514193-31-michael.j.ruhl@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260923181115.2514193-22-michael.j.ruhl@intel.com> References: <20260923181115.2514193-22-michael.j.ruhl@intel.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add the necessary files and text to use the DOC system. Reviewed-by: Rodrigo Vivi Signed-off-by: Michael J. Ruhl --- Documentation/gpu/xe/index.rst | 1 + Documentation/gpu/xe/xe_vsec.rst | 14 ++++++++++++++ drivers/gpu/drm/xe/xe_vsec.c | 24 ++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 Documentation/gpu/xe/xe_vsec.rst diff --git a/Documentation/gpu/xe/index.rst b/Documentation/gpu/xe/index.rst index 0247a255f7e6..89f013418cf5 100644 --- a/Documentation/gpu/xe/index.rst +++ b/Documentation/gpu/xe/index.rst @@ -36,3 +36,4 @@ The display, or :ref:`drm-kms`, support for drm/xe is provided by xe_configfs xe_gt_stats xe_sigid + xe_vsec diff --git a/Documentation/gpu/xe/xe_vsec.rst b/Documentation/gpu/xe/xe_vsec.rst new file mode 100644 index 000000000000..1a87548489ea --- /dev/null +++ b/Documentation/gpu/xe/xe_vsec.rst @@ -0,0 +1,14 @@ +.. SPDX-License-Identifier: (GPL-2.0+ OR MIT) + +===== +VSEC +===== + +.. kernel-doc:: drivers/gpu/drm/xe/xe_vsec.c + :doc: VSEC + +Internal API +============ + +.. kernel-doc:: drivers/gpu/drm/xe/xe_vsec.c + :internal: diff --git a/drivers/gpu/drm/xe/xe_vsec.c b/drivers/gpu/drm/xe/xe_vsec.c index 38081dacd307..082b25b017db 100644 --- a/drivers/gpu/drm/xe/xe_vsec.c +++ b/drivers/gpu/drm/xe/xe_vsec.c @@ -19,6 +19,17 @@ #include "regs/xe_pmt.h" +/** + * DOC: VSEC + * + * Some GPUs support the PMT feature. For those that do, this API provides + * probe, discovery and usage (control and access) for GPUs that have PMT. + * + * PMT is usually accessed through a PCI function. However, that is not always + * available, so the PMT intel_vsec_register() function can be used to set up + * PMT usage. + */ + /* PMT GUID value for BMG devices. NOTE: this is NOT a PCI id */ #define BMG_DEVICE_ID 0xE2F8 @@ -140,6 +151,19 @@ static int xe_guid_decode(u32 guid, int *index, u32 *offset) return 0; } +/** + * xe_pmt_telem_read - Given a device and a PMT GUID, read data into a buffer + * @dev: valid Xe device + * @guid: PMT GUID (from the PMT discovery struct) + * @data: buffer to place data in + * @user_offset: a user offset relative to the beginning of the data to read + * @count: bytes to read + * + * Return: + * * -ENODATA for incorrect power state + * * -EINVAL for unsupported PMT feature + * * count number of bytes read on success + */ int xe_pmt_telem_read(struct device *dev, u32 guid, u64 *data, loff_t user_offset, u32 count) { -- 2.43.0