Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Poosa, Karthik" <karthik.poosa@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <rodrigo.vivi@intel.com>,
	<anshuman.gupta@intel.com>, <badal.nilawar@intel.com>,
	<raag.jadav@intel.com>, <riana.tauro@intel.com>,
	<soham.purkait@intel.com>, <michael.j.ruhl@intel.com>
Subject: Re: [PATCH v3 2/2] drm/xe/debugfs: Add debugfs for pcode information
Date: Fri, 12 Jun 2026 22:45:39 +0530	[thread overview]
Message-ID: <ae7610c9-1d03-4731-bb04-a1bcffaa2dbf@intel.com> (raw)
In-Reply-To: <20260611205807.GH6214@mdroper-desk1.amr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2653 bytes --]


On 12-06-2026 02:28, Matt Roper wrote:
> On Thu, Jun 11, 2026 at 10:26:07PM +0530, Karthik Poosa wrote:
>> Introduce a pcode_info debugfs entry to report pcode details.
>> This initial implementation exposes the pcode version.
>> This can aid debugging when the pcode version is needed.
>>
>> v2:
>>   - Enable the debugfs only for supported platforms. (Micheal Ruhl)
>>
>> v3:
>>   - Move the platform check out of this patch, as it is not relevant here.
>>     This patch solely enables debugfs; debugfs creation will be determined
>>     based on the return value of get_pcode_version. (Karthik)
>>
>> Signed-off-by: Karthik Poosa<karthik.poosa@intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_debugfs.c | 19 +++++++++++++++++++
>>   1 file changed, 19 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
>> index 22b471303984..65049916e42c 100644
>> --- a/drivers/gpu/drm/xe/xe_debugfs.c
>> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
>> @@ -31,6 +31,7 @@
>>   #include "xe_tile_debugfs.h"
>>   #include "xe_vsec.h"
>>   #include "xe_wa.h"
>> +#include "xe_pcode.h"
>>   
>>   #ifdef CONFIG_DRM_XE_DEBUG
>>   #include "xe_bo_evict.h"
>> @@ -161,6 +162,23 @@ static int workaround_info(struct seq_file *m, void *data)
>>   	return 0;
>>   }
>>   
>> +static int pcode_info(struct seq_file *m, void *data)
>> +{
>> +	struct xe_device *xe = node_to_xe(m->private);
>> +	struct drm_printer p = drm_seq_file_printer(m);
>> +	struct pcode_version version;
>> +	int ret = 0;
>> +
>> +	ret = get_pcode_version(xe, &version);
>> +	if (ret) {
>> +		drm_warn(&xe->drm, "couldn't read pcode version ret %d\n", ret);
>> +		return ret;
>> +	}
>> +	drm_printf(&p, "pcode version: %d.%d.%d\n", version.major,
>> +		   version.minor, version.engg);
>> +	return 0;
>> +}
>> +
>>   static int dgfx_pkg_residencies_show(struct seq_file *m, void *data)
>>   {
>>   	struct xe_device *xe;
>> @@ -219,6 +237,7 @@ static const struct drm_info_list debugfs_list[] = {
> Based on the CI results it doesn't look like we can access the register
> on SR-IOV VFs, so this debugfs is only relevant to the PF.  We probably
> need to add a pf-only list of debugfs files, similar to what we have in
> the GT debugfs code.
>
>
> Matt
Looks like that other debugfs components are already handling this.
Adding a VF check in pcode_info() should suffice here.
>
>>   	{"info", info, 0},
>>   	{ .name = "sriov_info", .show = sriov_info, },
>>   	{ .name = "workarounds", .show = workaround_info, },
>> +	{ .name = "pcode_info", .show = pcode_info, },
>>   };
>>   
>>   static const struct drm_info_list debugfs_residencies[] = {
>> -- 
>> 2.25.1
>>

[-- Attachment #2: Type: text/html, Size: 3748 bytes --]

  reply	other threads:[~2026-06-12 17:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-11 16:56 [PATCH v3 0/2] drm/xe/debugfs: Add a debugfs for pcode information Karthik Poosa
2026-06-11 16:56 ` [PATCH v3 1/2] drm/xe/pcode: Add support to get pcode version from PMT Karthik Poosa
2026-06-11 16:56 ` [PATCH v3 2/2] drm/xe/debugfs: Add debugfs for pcode information Karthik Poosa
2026-06-11 20:58   ` Matt Roper
2026-06-12 17:15     ` Poosa, Karthik [this message]
2026-06-11 16:56 ` [PATCH v3 0/2] drm/xe/debugfs: Add a " Ruhl, Michael J
2026-06-11 19:11 ` ✓ CI.KUnit: success for drm/xe/debugfs: Add a debugfs for pcode information (rev3) Patchwork
2026-06-11 20:00 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-06-12 12:21 ` ✗ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ae7610c9-1d03-4731-bb04-a1bcffaa2dbf@intel.com \
    --to=karthik.poosa@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    --cc=michael.j.ruhl@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=riana.tauro@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=soham.purkait@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox