Skip to content

Commit a1e5b6d

Browse files
committed
drm/xe: Drop unnecessary GT lookup in xe_exec_queue_create_ioctl()
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. Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250218200511.4050060-2-matthew.d.roper@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
1 parent f2cd509 commit a1e5b6d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/xe/xe_exec_queue.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ static int exec_queue_user_extensions(struct xe_device *xe, struct xe_exec_queue
539539
return 0;
540540
}
541541

542-
static u32 calc_validate_logical_mask(struct xe_device *xe, struct xe_gt *gt,
542+
static u32 calc_validate_logical_mask(struct xe_device *xe,
543543
struct drm_xe_engine_class_instance *eci,
544544
u16 width, u16 num_placements)
545545
{
@@ -601,7 +601,6 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
601601
u64_to_user_ptr(args->instances);
602602
struct xe_hw_engine *hwe;
603603
struct xe_vm *vm;
604-
struct xe_gt *gt;
605604
struct xe_tile *tile;
606605
struct xe_exec_queue *q = NULL;
607606
u32 logical_mask;
@@ -654,8 +653,7 @@ int xe_exec_queue_create_ioctl(struct drm_device *dev, void *data,
654653
&q->multi_gt_link);
655654
}
656655
} else {
657-
gt = xe_device_get_gt(xe, eci[0].gt_id);
658-
logical_mask = calc_validate_logical_mask(xe, gt, eci,
656+
logical_mask = calc_validate_logical_mask(xe, eci,
659657
args->width,
660658
args->num_placements);
661659
if (XE_IOCTL_DBG(xe, !logical_mask))

0 commit comments

Comments
 (0)