From: Nirmoy Das <nirmoy.das@intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>, <matthew.d.roper@intel.com>,
<joonas.lahtinen@linux.intel.com>
Subject: Re: [RFC PATCH 2/2] drm/xe/uapi: Expose wmtp as engine capability
Date: Mon, 15 Jul 2024 10:29:13 +0200 [thread overview]
Message-ID: <153961be-e395-4a8e-84c7-fecbd1e6d028@intel.com> (raw)
In-Reply-To: <4saec24oxsqk46oq4l2ihygqzllvp7ie2awvh3gwbrfld2aao2@2vf4kjlgedzh>
On 7/13/2024 3:55 PM, Lucas De Marchi wrote:
> On Sat, Feb 03, 2024 at 07:05:34AM GMT, 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>
>> ---
>> 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)
>> + /** @capabilities: Capabilities of this engine. */
>> + __u64 capabilities;
>
> isn't u64 a lot for this? maybe make it u32 and add a u32 reserved?
>
> i915 for example reserved 64b but still only uses 2 bits.
Splitting into two u32 didn't occur to me that that time. I will do that.
Thanks,
Nirmoy
>
> Lucas De Marchi
>
>> /** @reserved: Reserved */
>> - __u64 reserved[3];
>> + __u64 reserved[2];
>> };
>>
>> /**
>> --
>> 2.42.0
>>
next prev parent reply other threads:[~2024-07-15 8:29 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
2024-07-13 13:55 ` Lucas De Marchi
2024-07-15 8:29 ` Nirmoy Das [this message]
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=153961be-e395-4a8e-84c7-fecbd1e6d028@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=lucas.demarchi@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