Skip to content

Commit 40b53db

Browse files
committed
Merge tag 'drm-xe-fixes-2025-11-21' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes
Driver Changes: - Fix out-of-bounds access with BIT() (Shuicheng Lin) - Fix kunit test checking wrong condition (Matt Roper) - Drop duplicate kconfig select (Shuicheng Lin) - Fix guc2host irq handler with MSI-X (Venkata Ramana Nayana) Signed-off-by: Dave Airlie <[email protected]> From: Lucas De Marchi <[email protected]> Link: https://patch.msgid.link/uadbrmftcud3wg32c6tje7mmfcr7wgmpnkzxwubk6fletahje2@coek2ciunkvz
2 parents 4e9fd47 + 5b38c22 commit 40b53db

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

drivers/gpu/drm/xe/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ config DRM_XE
1313
select TMPFS
1414
select DRM_BUDDY
1515
select DRM_CLIENT_SELECTION
16-
select DRM_EXEC
1716
select DRM_KMS_HELPER
1817
select DRM_KUNIT_TEST_HELPERS if DRM_XE_KUNIT_TEST != n
1918
select DRM_PANEL

drivers/gpu/drm/xe/tests/xe_mocs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static void read_l3cc_table(struct xe_gt *gt,
4949
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
5050
if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) {
5151
xe_force_wake_put(gt_to_fw(gt), fw_ref);
52-
KUNIT_ASSERT_TRUE_MSG(test, true, "Forcewake Failed.\n");
52+
KUNIT_FAIL_AND_ABORT(test, "Forcewake Failed.\n");
5353
}
5454

5555
for (i = 0; i < info->num_mocs_regs; i++) {

drivers/gpu/drm/xe/xe_irq.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -847,22 +847,6 @@ static int xe_irq_msix_init(struct xe_device *xe)
847847
return 0;
848848
}
849849

850-
static irqreturn_t guc2host_irq_handler(int irq, void *arg)
851-
{
852-
struct xe_device *xe = arg;
853-
struct xe_tile *tile;
854-
u8 id;
855-
856-
if (!atomic_read(&xe->irq.enabled))
857-
return IRQ_NONE;
858-
859-
for_each_tile(tile, xe, id)
860-
xe_guc_irq_handler(&tile->primary_gt->uc.guc,
861-
GUC_INTR_GUC2HOST);
862-
863-
return IRQ_HANDLED;
864-
}
865-
866850
static irqreturn_t xe_irq_msix_default_hwe_handler(int irq, void *arg)
867851
{
868852
unsigned int tile_id, gt_id;
@@ -979,7 +963,7 @@ int xe_irq_msix_request_irqs(struct xe_device *xe)
979963
u16 msix;
980964

981965
msix = GUC2HOST_MSIX;
982-
err = xe_irq_msix_request_irq(xe, guc2host_irq_handler, xe,
966+
err = xe_irq_msix_request_irq(xe, xe_irq_handler(xe), xe,
983967
DRIVER_NAME "-guc2host", false, &msix);
984968
if (err)
985969
return err;

drivers/gpu/drm/xe/xe_vm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,8 +3369,10 @@ static int vm_bind_ioctl_check_args(struct xe_device *xe, struct xe_vm *vm,
33693369
op == DRM_XE_VM_BIND_OP_PREFETCH) ||
33703370
XE_IOCTL_DBG(xe, prefetch_region &&
33713371
op != DRM_XE_VM_BIND_OP_PREFETCH) ||
3372-
XE_IOCTL_DBG(xe, (prefetch_region != DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC &&
3373-
!(BIT(prefetch_region) & xe->info.mem_region_mask))) ||
3372+
XE_IOCTL_DBG(xe, (prefetch_region != DRM_XE_CONSULT_MEM_ADVISE_PREF_LOC &&
3373+
/* Guard against undefined shift in BIT(prefetch_region) */
3374+
(prefetch_region >= (sizeof(xe->info.mem_region_mask) * 8) ||
3375+
!(BIT(prefetch_region) & xe->info.mem_region_mask)))) ||
33743376
XE_IOCTL_DBG(xe, obj &&
33753377
op == DRM_XE_VM_BIND_OP_UNMAP) ||
33763378
XE_IOCTL_DBG(xe, (flags & DRM_XE_VM_BIND_FLAG_MADVISE_AUTORESET) &&

0 commit comments

Comments
 (0)