Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH v3 11/24] drm-uapi/xe: Replace useless 'instance' per unique gt_id
Date: Thu, 28 Sep 2023 09:19:52 +0100	[thread overview]
Message-ID: <7c6c7da3-f19e-f718-053e-0f2ba8951f50@linux.intel.com> (raw)
In-Reply-To: <ZRReH+SDlZGWClS+@intel.com>


On 27/09/2023 17:53, Rodrigo Vivi wrote:
> On Tue, Sep 26, 2023 at 05:47:22PM +0100, Tvrtko Ursulin wrote:
>>
>> On 26/09/2023 14:00, Francois Dugast wrote:
>>> From: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>>
>>> Align with commit ("drm/xe/uapi: Replace useless 'instance' per unique gt_id")
>>>
>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
>>> ---
>>>    include/drm-uapi/xe_drm.h | 65 ++++++++++++++++++++++++++-------------
>>>    tests/intel/xe_query.c    |  2 +-
>>>    2 files changed, 44 insertions(+), 23 deletions(-)
>>>
>>> diff --git a/include/drm-uapi/xe_drm.h b/include/drm-uapi/xe_drm.h
>>> index 13c693393..68cc5e051 100644
>>> --- a/include/drm-uapi/xe_drm.h
>>> +++ b/include/drm-uapi/xe_drm.h
>>> @@ -337,6 +337,47 @@ struct drm_xe_query_config {
>>>    	__u64 info[];
>>>    };
>>> +/**
>>> + * struct drm_xe_query_gt - describe an individual GT.
>>> + *
>>> + * To be used with drm_xe_query_gts, which will return a list with all the
>>> + * existing GT individual descriptions.
>>> + * Graphics Technology (GT) is a subset of a GPU/tile that is responsible for
>>> + * implementing graphics and/or media operations.
>>> + */
>>> +struct drm_xe_query_gt {
>>> +#define XE_QUERY_GT_TYPE_MAIN		0
>>> +#define XE_QUERY_GT_TYPE_REMOTE		1
>>> +#define XE_QUERY_GT_TYPE_MEDIA		2
>>> +	/** @type: GT type: Main, Remote, or Media */
>>> +	__u16 type;
>>> +	/** @gt_id: Unique ID of this GT within the PCI Device */
>>> +	__u16 gt_id;
>>> +	/** @clock_freq: A clock frequency for timestamp */
>>> +	__u32 clock_freq;
>>> +	/** @features: Reserved for future information about GT features */
>>> +	__u64 features;
>>> +	/**
>>> +	 * @native_mem_regions: Bit mask of instances from
>>> +	 * drm_xe_query_mem_usage that lives on the same GPU/Tile and have
>>> +	 * direct access.
>>> +	 */
>>> +	__u64 native_mem_regions;
>>
>> s/native/local/ ?
>>
>> Although what was wrong with distance query? It was more future proof (can't
>> ever end up with fast, slow, slower, .. ) and avoids a bit of a vague
>> non-technical names like "slow".
>>
>>> +	/**
>>> +	 * @slow_mem_regions: Bit mask of instances from
>>> +	 * drm_xe_query_mem_usage that this GT can indirectly access, although
>>> +	 * they live on a different GPU/Tile.
>>> +	 */
>>> +	__u64 slow_mem_regions;
>>> +	/**
>>> +	 * @inaccessible_mem_regions: Bit mask of instances from
>>> +	 * drm_xe_query_mem_usage that is not accessible by this GT at all.
>>> +	 */
>>> +	__u64 inaccessible_mem_regions;
>>
>> Equal to ~(native | slow) so redundant?
>>
>> Btw drm_xe_query_mem_usage is just a list of regions, nothing about usage
>> like memory usage?
> 
> I agree with all your comments here. The way xe is currently handling
> memory regions and mixing gt in the middle is strange and I'm going to
> scrutinize and change that on a follow up.
> 
> This patch here now is just to change the name to the gt_id and this
> IGT change ended up picking together the movement of the gt struct
> out of the list struct definition.
> 
> So, basically the only relevant portion of this patch is s/instance/gt_id.
> Everything else should be a follow-up work.

Ah okay. I was asked to review the gem_wsim adaptation for xe so went 
looking for xe uapi. My bad looking at the wrong place. And from what 
you say I guess I can freely hold of looking into details until the uapi 
settles down.

Regards,

Tvrtko

> 
>>
>> Regards,
>>
>> Tvrtko
>>
>>> +	/** @reserved: Reserved */
>>> +	__u64 reserved[8];
>>> +};
>>> +
>>>    /**
>>>     * struct drm_xe_query_gts - describe GTs
>>>     *
>>> @@ -347,30 +388,10 @@ struct drm_xe_query_config {
>>>    struct drm_xe_query_gts {
>>>    	/** @num_gt: number of GTs returned in gts */
>>>    	__u32 num_gt;
>>> -
>>>    	/** @pad: MBZ */
>>>    	__u32 pad;
>>> -
>>> -	/**
>>> -	 * @gts: The GTs returned for this device
>>> -	 *
>>> -	 * TODO: convert drm_xe_query_gt to proper kernel-doc.
>>> -	 * TODO: Perhaps info about every mem region relative to this GT? e.g.
>>> -	 * bandwidth between this GT and remote region?
>>> -	 */
>>> -	struct drm_xe_query_gt {
>>> -#define XE_QUERY_GT_TYPE_MAIN		0
>>> -#define XE_QUERY_GT_TYPE_REMOTE		1
>>> -#define XE_QUERY_GT_TYPE_MEDIA		2
>>> -		__u16 type;
>>> -		__u16 instance;
>>> -		__u32 clock_freq;
>>> -		__u64 features;
>>> -		__u64 native_mem_regions;	/* bit mask of instances from drm_xe_query_mem_usage */
>>> -		__u64 slow_mem_regions;		/* bit mask of instances from drm_xe_query_mem_usage */
>>> -		__u64 inaccessible_mem_regions;	/* bit mask of instances from drm_xe_query_mem_usage */
>>> -		__u64 reserved[8];
>>> -	} gts[];
>>> +	/** @gts: The GT list returned for this device */
>>> +	struct drm_xe_query_gt gts[];
>>>    };
>>>    /**
>>> diff --git a/tests/intel/xe_query.c b/tests/intel/xe_query.c
>>> index acf069f46..eb8d52897 100644
>>> --- a/tests/intel/xe_query.c
>>> +++ b/tests/intel/xe_query.c
>>> @@ -279,7 +279,7 @@ test_query_gts(int fd)
>>>    	for (i = 0; i < gts->num_gt; i++) {
>>>    		igt_info("type: %d\n", gts->gts[i].type);
>>> -		igt_info("instance: %d\n", gts->gts[i].instance);
>>> +		igt_info("gt_id: %d\n", gts->gts[i].gt_id);
>>>    		igt_info("clock_freq: %u\n", gts->gts[i].clock_freq);
>>>    		igt_info("features: 0x%016llx\n", gts->gts[i].features);
>>>    		igt_info("native_mem_regions: 0x%016llx\n",

  reply	other threads:[~2023-09-28  8:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 13:00 [igt-dev] [PATCH v3 00/24] uAPI Alignment - take 1 v3 Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 01/24] drm-uapi/xe_drm: Align with new PMU interface Francois Dugast
2023-09-26 16:50   ` Tvrtko Ursulin
2023-09-27 16:55     ` Rodrigo Vivi
2023-09-29  6:01       ` Aravind Iddamsetty
2023-09-27  4:58   ` Aravind Iddamsetty
2023-09-26 13:00 ` [igt-dev] [PATCH v3 02/24] tests/intel/xe_query: Add a test for querying cs cycles Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 03/24] drm-uapi/xe_drm: Separate VM_BIND's operation and flag, align with latest uapi Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 04/24] drm-uapi/xe_drm: Remove MMIO ioctl and " Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 05/24] xe_exec_balancer: Enable parallel submission and compute mode Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 06/24] xe_exec_threads: Use DRM_XE_VM_CREATE_COMPUTE_MODE when creating a compute VM Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 07/24] xe: Update uAPI and remove XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 08/24] drm-uapi/xe: Use common drm_xe_ext_set_property extension Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 09/24] drm-uapi: Kill XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS extension Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 10/24] xe: Update to new VM bind uAPI Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 11/24] drm-uapi/xe: Replace useless 'instance' per unique gt_id Francois Dugast
2023-09-26 16:47   ` Tvrtko Ursulin
2023-09-27 16:53     ` Rodrigo Vivi
2023-09-28  8:19       ` Tvrtko Ursulin [this message]
2023-09-26 13:00 ` [igt-dev] [PATCH v3 12/24] drm-uapi/xe: Remove unused field of drm_xe_query_gt Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 13/24] drm-uapi/xe: Rename gts to gt_list Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 14/24] drm-uapi/xe: Fix naming of XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 15/24] drm-uapi/xe: Align with documentation updates Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 16/24] drm-uapi/xe: Align with Crystal Reference Clock updates Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 17/24] drm-uapi/xe: Align with extension of drm_xe_vm_bind_op Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 18/24] drm-uapi/xe: Align with uAPI to query micro-controler firmware version Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 19/24] drm-uapi/xe: Align with DRM_XE_DEVICE_QUERY_HWCONFIG documentation Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 20/24] drm-uapi/xe: Align with uAPI to pad to drm_xe_engine_class_instance Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 21/24] drm-uapi/xe: Align with uAPI update query HuC micro-controler firmware version Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 22/24] drm-uapi/xe: Align with uAPI update for query config num_params Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 23/24] drm-uapi/xe: Align with uAPI update to add DRM_ prefix in uAPI constants Francois Dugast
2023-09-26 13:00 ` [igt-dev] [PATCH v3 24/24] drm-uapi/xe: Align with uAPI update to add _FLAG to constants usable for flags Francois Dugast
2023-09-26 15:03 ` [igt-dev] ✓ Fi.CI.BAT: success for uAPI Alignment - take 1 (rev2) Patchwork
2023-09-26 15:14 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-09-27  2:20 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=7c6c7da3-f19e-f718-053e-0f2ba8951f50@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=rodrigo.vivi@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