From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Drop unnecessary GT lookup in xe_exec_queue_create_ioctl()
Date: Tue, 18 Feb 2025 12:40:52 -0800 [thread overview]
Message-ID: <85zfijnfzf.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20250218200511.4050060-2-matthew.d.roper@intel.com>
On Tue, 18 Feb 2025 12:05:12 -0800, Matt Roper wrote:
>
> xe_exec_queue_create_ioctl() performs a lookup of the xe_gt for the GT
> ID passed from userspace, but the result is never actually used. Since
> there's already a separate (and earlier) check that the ID passed from
> userspace is valid, the unnecessary lookup can be removed.
lgtm,
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> drivers/gpu/drm/xe/xe_exec_queue.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
> index 6051db78d706..23a9f519ce1c 100644
> --- a/drivers/gpu/drm/xe/xe_exec_queue.c
> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c
> @@ -539,7 +539,7 @@ static int exec_queue_user_extensions(struct xe_device *xe, struct xe_exec_queue
> return 0;
> }
>
> -static u32 calc_validate_logical_mask(struct xe_device *xe, struct xe_gt *gt,
> +static u32 calc_validate_logical_mask(struct xe_device *xe,
> struct drm_xe_engine_class_instance *eci,
> u16 width, u16 num_placements)
> {
> @@ -601,7 +601,6 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
> u64_to_user_ptr(args->instances);
> struct xe_hw_engine *hwe;
> struct xe_vm *vm;
> - struct xe_gt *gt;
> struct xe_tile *tile;
> struct xe_exec_queue *q = NULL;
> u32 logical_mask;
> @@ -654,8 +653,7 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
> &q->multi_gt_link);
> }
> } else {
> - gt = xe_device_get_gt(xe, eci[0].gt_id);
> - logical_mask = calc_validate_logical_mask(xe, gt, eci,
> + logical_mask = calc_validate_logical_mask(xe, eci,
> args->width,
> args->num_placements);
> if (XE_IOCTL_DBG(xe, !logical_mask))
> --
> 2.48.1
>
next prev parent reply other threads:[~2025-02-18 20:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 20:05 [PATCH] drm/xe: Drop unnecessary GT lookup in xe_exec_queue_create_ioctl() Matt Roper
2025-02-18 20:37 ` Cavitt, Jonathan
2025-02-18 20:40 ` Dixit, Ashutosh [this message]
2025-02-18 20:49 ` ✓ CI.Patch_applied: success for " Patchwork
2025-02-18 20:49 ` ✓ CI.checkpatch: " Patchwork
2025-02-18 20:50 ` ✓ CI.KUnit: " Patchwork
2025-02-18 21:07 ` ✓ CI.Build: " Patchwork
2025-02-18 21:09 ` ✓ CI.Hooks: " Patchwork
2025-02-18 21:11 ` ✓ CI.checksparse: " Patchwork
2025-02-18 21:33 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-19 14:51 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-19 15:22 ` 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=85zfijnfzf.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.