From: Nirmoy Das <nirmoy.das@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe: Remove unused 'create' parameter from queue property logic
Date: Fri, 23 Feb 2024 15:44:50 +0100 [thread overview]
Message-ID: <16fdaedc-ee09-44c1-a9c8-c0ff11632143@intel.com> (raw)
In-Reply-To: <ZdinuD7bd_KTkz_m@intel.com>
On 2/23/2024 3:12 PM, Rodrigo Vivi wrote:
> On Fri, Feb 23, 2024 at 01:23:11PM +0100, Nirmoy Das wrote:
>> The 'create' parameter in exec_queue_user_extensions was always true.
>> This commit removes the dead parameter and all the relevant dead code.
> I'm afraid that you need to rebase now that I just push the removal
> of some of these functions.
>
> But with that rebased you can already resend it using
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Resent, thanks!
Nirmoy
>
>
>> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_exec_queue.c | 56 +++++++++---------------------
>> 1 file changed, 16 insertions(+), 40 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
>> index 4bb8f897bf15..969c82d20e79 100644
>> --- a/drivers/gpu/drm/xe/xe_exec_queue.c
>> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c
>> @@ -31,7 +31,7 @@ enum xe_exec_queue_sched_prop {
>> };
>>
>> static int exec_queue_user_extensions(struct xe_device *xe, struct xe_exec_queue *q,
>> - u64 extensions, int ext_number, bool create);
>> + u64 extensions, int ext_number);
>>
>> static struct xe_exec_queue *__xe_exec_queue_alloc(struct xe_device *xe,
>> struct xe_vm *vm,
>> @@ -79,7 +79,7 @@ static struct xe_exec_queue *__xe_exec_queue_alloc(struct xe_device *xe,
>> * may set q->usm, must come before xe_lrc_init(),
>> * may overwrite q->sched_props, must come before q->ops->init()
>> */
>> - err = exec_queue_user_extensions(xe, q, extensions, 0, true);
>> + err = exec_queue_user_extensions(xe, q, extensions, 0);
>> if (err) {
>> kfree(q);
>> return ERR_PTR(err);
>> @@ -268,7 +268,7 @@ xe_exec_queue_device_get_max_priority(struct xe_device *xe)
>> }
>>
>> static int exec_queue_set_priority(struct xe_device *xe, struct xe_exec_queue *q,
>> - u64 value, bool create)
>> + u64 value)
>> {
>> if (XE_IOCTL_DBG(xe, value > XE_EXEC_QUEUE_PRIORITY_HIGH))
>> return -EINVAL;
>> @@ -276,9 +276,6 @@ static int exec_queue_set_priority(struct xe_device *xe, struct xe_exec_queue *q
>> if (XE_IOCTL_DBG(xe, value > xe_exec_queue_device_get_max_priority(xe)))
>> return -EPERM;
>>
>> - if (!create)
>> - return q->ops->set_priority(q, value);
>> -
>> q->sched_props.priority = value;
>> return 0;
>> }
>> @@ -336,7 +333,7 @@ xe_exec_queue_get_prop_minmax(struct xe_hw_engine_class_intf *eclass,
>> }
>>
>> static int exec_queue_set_timeslice(struct xe_device *xe, struct xe_exec_queue *q,
>> - u64 value, bool create)
>> + u64 value)
>> {
>> u32 min = 0, max = 0;
>>
>> @@ -347,16 +344,12 @@ static int exec_queue_set_timeslice(struct xe_device *xe, struct xe_exec_queue *
>> !xe_hw_engine_timeout_in_range(value, min, max))
>> return -EINVAL;
>>
>> - if (!create)
>> - return q->ops->set_timeslice(q, value);
>> -
>> q->sched_props.timeslice_us = value;
>> return 0;
>> }
>>
>> static int exec_queue_set_preemption_timeout(struct xe_device *xe,
>> - struct xe_exec_queue *q, u64 value,
>> - bool create)
>> + struct xe_exec_queue *q, u64 value)
>> {
>> u32 min = 0, max = 0;
>>
>> @@ -367,21 +360,15 @@ static int exec_queue_set_preemption_timeout(struct xe_device *xe,
>> !xe_hw_engine_timeout_in_range(value, min, max))
>> return -EINVAL;
>>
>> - if (!create)
>> - return q->ops->set_preempt_timeout(q, value);
>> -
>> q->sched_props.preempt_timeout_us = value;
>> return 0;
>> }
>>
>> static int exec_queue_set_job_timeout(struct xe_device *xe, struct xe_exec_queue *q,
>> - u64 value, bool create)
>> + u64 value)
>> {
>> u32 min = 0, max = 0;
>>
>> - if (XE_IOCTL_DBG(xe, !create))
>> - return -EINVAL;
>> -
>> xe_exec_queue_get_prop_minmax(q->hwe->eclass,
>> XE_EXEC_QUEUE_JOB_TIMEOUT, &min, &max);
>>
>> @@ -395,11 +382,8 @@ static int exec_queue_set_job_timeout(struct xe_device *xe, struct xe_exec_queue
>> }
>>
>> static int exec_queue_set_acc_trigger(struct xe_device *xe, struct xe_exec_queue *q,
>> - u64 value, bool create)
>> + u64 value)
>> {
>> - if (XE_IOCTL_DBG(xe, !create))
>> - return -EINVAL;
>> -
>> if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
>> return -EINVAL;
>>
>> @@ -409,11 +393,8 @@ static int exec_queue_set_acc_trigger(struct xe_device *xe, struct xe_exec_queue
>> }
>>
>> static int exec_queue_set_acc_notify(struct xe_device *xe, struct xe_exec_queue *q,
>> - u64 value, bool create)
>> + u64 value)
>> {
>> - if (XE_IOCTL_DBG(xe, !create))
>> - return -EINVAL;
>> -
>> if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
>> return -EINVAL;
>>
>> @@ -423,11 +404,8 @@ static int exec_queue_set_acc_notify(struct xe_device *xe, struct xe_exec_queue
>> }
>>
>> static int exec_queue_set_acc_granularity(struct xe_device *xe, struct xe_exec_queue *q,
>> - u64 value, bool create)
>> + u64 value)
>> {
>> - if (XE_IOCTL_DBG(xe, !create))
>> - return -EINVAL;
>> -
>> if (XE_IOCTL_DBG(xe, !xe->info.has_usm))
>> return -EINVAL;
>>
>> @@ -441,7 +419,7 @@ static int exec_queue_set_acc_granularity(struct xe_device *xe, struct xe_exec_q
>>
>> typedef int (*xe_exec_queue_set_property_fn)(struct xe_device *xe,
>> struct xe_exec_queue *q,
>> - u64 value, bool create);
>> + u64 value);
>>
>> static const xe_exec_queue_set_property_fn exec_queue_set_property_funcs[] = {
>> [DRM_XE_EXEC_QUEUE_SET_PROPERTY_PRIORITY] = exec_queue_set_priority,
>> @@ -455,8 +433,7 @@ static const xe_exec_queue_set_property_fn exec_queue_set_property_funcs[] = {
>>
>> static int exec_queue_user_ext_set_property(struct xe_device *xe,
>> struct xe_exec_queue *q,
>> - u64 extension,
>> - bool create)
>> + u64 extension)
>> {
>> u64 __user *address = u64_to_user_ptr(extension);
>> struct drm_xe_ext_set_property ext;
>> @@ -476,13 +453,12 @@ static int exec_queue_user_ext_set_property(struct xe_device *xe,
>> if (!exec_queue_set_property_funcs[idx])
>> return -EINVAL;
>>
>> - return exec_queue_set_property_funcs[idx](xe, q, ext.value, create);
>> + return exec_queue_set_property_funcs[idx](xe, q, ext.value);
>> }
>>
>> typedef int (*xe_exec_queue_user_extension_fn)(struct xe_device *xe,
>> struct xe_exec_queue *q,
>> - u64 extension,
>> - bool create);
>> + u64 extension);
>>
>> static const xe_exec_queue_set_property_fn exec_queue_user_extension_funcs[] = {
>> [DRM_XE_EXEC_QUEUE_EXTENSION_SET_PROPERTY] = exec_queue_user_ext_set_property,
>> @@ -490,7 +466,7 @@ static const xe_exec_queue_set_property_fn exec_queue_user_extension_funcs[] = {
>>
>> #define MAX_USER_EXTENSIONS 16
>> static int exec_queue_user_extensions(struct xe_device *xe, struct xe_exec_queue *q,
>> - u64 extensions, int ext_number, bool create)
>> + u64 extensions, int ext_number)
>> {
>> u64 __user *address = u64_to_user_ptr(extensions);
>> struct drm_xe_user_extension ext;
>> @@ -511,13 +487,13 @@ static int exec_queue_user_extensions(struct xe_device *xe, struct xe_exec_queue
>>
>> idx = array_index_nospec(ext.name,
>> ARRAY_SIZE(exec_queue_user_extension_funcs));
>> - err = exec_queue_user_extension_funcs[idx](xe, q, extensions, create);
>> + err = exec_queue_user_extension_funcs[idx](xe, q, extensions);
>> if (XE_IOCTL_DBG(xe, err))
>> return err;
>>
>> if (ext.next_extension)
>> return exec_queue_user_extensions(xe, q, ext.next_extension,
>> - ++ext_number, create);
>> + ++ext_number);
>>
>> return 0;
>> }
>> --
>> 2.42.0
>>
prev parent reply other threads:[~2024-02-23 14:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 12:23 [PATCH] drm/xe: Remove unused 'create' parameter from queue property logic Nirmoy Das
2024-02-23 12:41 ` ✓ CI.Patch_applied: success for " Patchwork
2024-02-23 12:41 ` ✓ CI.checkpatch: " Patchwork
2024-02-23 12:42 ` ✓ CI.KUnit: " Patchwork
2024-02-23 12:53 ` ✓ CI.Build: " Patchwork
2024-02-23 12:54 ` ✓ CI.Hooks: " Patchwork
2024-02-23 12:55 ` ✓ CI.checksparse: " Patchwork
2024-02-23 13:14 ` ✓ CI.BAT: " Patchwork
2024-02-23 14:12 ` [PATCH] " Rodrigo Vivi
2024-02-23 14:44 ` Nirmoy Das [this message]
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=16fdaedc-ee09-44c1-a9c8-c0ff11632143@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@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