]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/xe_query: Remove check for gt
authorNakshtra Goyal <nakshtra.goyal@intel.com>
Tue, 13 Jan 2026 09:19:28 +0000 (14:49 +0530)
committerMatt Roper <matthew.d.roper@intel.com>
Thu, 15 Jan 2026 20:57:25 +0000 (12:57 -0800)
There's no need to check a userspace-provided GT ID (which may come from
any tile) against the number of GTs that can be present on a single
tile. The xe_device_get_gt() lookup already checks that the GT ID passed
is valid for the current device.(Matt Roper)

Signed-off-by: Nakshtra Goyal <nakshtra.goyal@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patch.msgid.link/20260113091928.67446-1-nakshtra.goyal@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/xe/xe_query.c

index 75490683bad2fd7129baca74273abeec40d9e7cb..b7b4261968e0e4b16411e08696d53a35e78cc232 100644 (file)
@@ -142,9 +142,6 @@ query_engine_cycles(struct xe_device *xe,
                return -EINVAL;
 
        eci = &resp.eci;
-       if (eci->gt_id >= xe->info.max_gt_per_tile)
-               return -EINVAL;
-
        gt = xe_device_get_gt(xe, eci->gt_id);
        if (!gt)
                return -EINVAL;