Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: Francois Dugast <francois.dugast@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>,
	<intel-xe@lists.freedesktop.org>,
	 <joonas.lahtinen@linux.intel.com>, <mateusz.jablonski@intel.com>
Subject: Re: [RFC PATCH 2/2] drm/xe/uapi: Expose wmtp as engine capability
Date: Mon, 15 Jul 2024 10:21:14 +0200	[thread overview]
Message-ID: <eaca3c8c-88b6-4edc-9308-92308fac62b2@intel.com> (raw)
In-Reply-To: <ZpFVZT-OHmcIsm9j@fdugast-desk>


On 7/12/2024 6:10 PM, Francois Dugast wrote:
> Hi,
>
> On Mon, Feb 19, 2024 at 11:09:13AM +0100, Nirmoy Das wrote:
>> On 2/16/2024 8:52 PM, Matt Roper wrote:
>>> On Sat, Feb 03, 2024 at 07:05:34AM +0100, Nirmoy Das wrote:
>>>> Add capabilities to engine struct which can be used to
>>>> expose various capabilities of each engines.
>>>>
>>>> Add wmtp as engine capability which is retrieve from
>>>> GT info.
>>>>
>>>> Take a field from the reserved for that purpose.
>>>>
>>>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>>> We'll need a userspace consumer for the uapi and some simple IGT tests
>>> (e.g., making sure this flag never shows up on the wrong engine types or
>>> platforms), but once those are available,
>> Thanks Matt, I wanted to get initial feedback.  I will now sync up with UMD
>> friends to create a pull request for this, and also work on  IGT tests.
>>
>>
>>>           Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
>>>
>>>
>>> Matt
>>>
>>>> ---
>>>>    drivers/gpu/drm/xe/xe_query.c | 5 +++++
>>>>    include/uapi/drm/xe_drm.h     | 6 ++++--
>>>>    2 files changed, 9 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
>>>> index 7e924faeeea0..10981b46c56f 100644
>>>> --- a/drivers/gpu/drm/xe/xe_query.c
>>>> +++ b/drivers/gpu/drm/xe/xe_query.c
>>>> @@ -215,6 +215,11 @@ static int query_engines(struct xe_device *xe,
>>>>    			engines->engines[i].instance.pad = 0;
>>>>    			memset(engines->engines[i].reserved, 0,
>>>>    			       sizeof(engines->engines[i].reserved));
>>>> +			if (gt->info.has_wmtp &&
>>>> +			    (hwe->class == XE_ENGINE_CLASS_COMPUTE ||
>>>> +			     hwe->class == XE_ENGINE_CLASS_RENDER))
>>>> +				engines->engines[i].capabilities |=
>>>> +					DRM_XE_ENGINE_CAPABILITY_WMTP;
>>>>    			i++;
>>>>    		}
>>>> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
>>>> index 50bbea0992d9..5dac079e64de 100644
>>>> --- a/include/uapi/drm/xe_drm.h
>>>> +++ b/include/uapi/drm/xe_drm.h
>>>> @@ -247,9 +247,11 @@ struct drm_xe_engine_class_instance {
>>>>    struct drm_xe_engine {
>>>>    	/** @instance: The @drm_xe_engine_class_instance */
>>>>    	struct drm_xe_engine_class_instance instance;
>>>> -
>>>> +#define DRM_XE_ENGINE_CAPABILITY_WMTP		BIT(0)
> Where does user space get the BIT() macro definition from? We should
> probably use an explicit value for this constant, as it is done in
> the rest of this header.

I was unaware of it. I will remove the BIT macro.


Thanks,

Nirmoy

>
>>>> +	/** @capabilities: Capabilities of this engine. */
>>>> +	__u64 capabilities;
>>>>    	/** @reserved: Reserved */
>>>> -	__u64 reserved[3];
>>>> +	__u64 reserved[2];
>>>>    };
>>>>    /**
>>>> -- 
>>>> 2.42.0
>>>>

  reply	other threads:[~2024-07-15  8:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03  6:05 [RFC PATCH 1/2] drm/xe: Add has_wmpt GT info Nirmoy Das
2024-02-03  6:05 ` [RFC PATCH 2/2] drm/xe/uapi: Expose wmtp as engine capability Nirmoy Das
2024-02-16 19:52   ` Matt Roper
2024-02-19 10:09     ` Nirmoy Das
2024-07-12 16:10       ` Francois Dugast
2024-07-15  8:21         ` Nirmoy Das [this message]
2024-07-13 13:55   ` Lucas De Marchi
2024-07-15  8:29     ` Nirmoy Das
2024-02-03  6:22 ` ✓ CI.Patch_applied: success for series starting with [RFC,1/2] drm/xe: Add has_wmpt GT info Patchwork
2024-02-03  6:22 ` ✓ CI.checkpatch: " Patchwork
2024-02-03  6:23 ` ✓ CI.KUnit: " Patchwork
2024-02-03  6:30 ` ✓ CI.Build: " Patchwork
2024-02-03  6:31 ` ✗ CI.Hooks: failure " Patchwork
2024-02-03  6:32 ` ✓ CI.checksparse: success " Patchwork
2024-02-03  6:56 ` ✗ CI.BAT: failure " Patchwork
2024-02-16 18:47 ` [RFC PATCH 1/2] " Matt Roper

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=eaca3c8c-88b6-4edc-9308-92308fac62b2@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=francois.dugast@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=mateusz.jablonski@intel.com \
    --cc=matthew.d.roper@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