Commit d439acbb authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-xe-fixes-2025-11-07' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes



Driver Changes:
 - Fix missing  synchronization on unbind (Balasubramani Vivekanandan)
 - Fix device shutdown when doing FLR (Jouni Högander)
 - Fix user fence signaling order (Matthew Brost)

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>

From: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patch.msgid.link/mvfyflloncy76a7nmkatpj6f2afddavwsibz3y4u4wo6gznro5@rdulkuh5wvje
parents a18033f1 0995c2fc
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -988,7 +988,6 @@ void xe_device_shutdown(struct xe_device *xe)

	drm_dbg(&xe->drm, "Shutting down device\n");

	if (xe_driver_flr_disabled(xe)) {
	xe_display_pm_shutdown(xe);

	xe_irq_suspend(xe);
@@ -997,7 +996,8 @@ void xe_device_shutdown(struct xe_device *xe)
		xe_gt_shutdown(gt);

	xe_display_pm_shutdown_late(xe);
	} else {

	if (!xe_driver_flr_disabled(xe)) {
		/* BOOM! */
		__xe_driver_flr(xe);
	}
+2 −1
Original line number Diff line number Diff line
@@ -165,7 +165,8 @@ int xe_exec_ioctl(struct drm_device *dev, void *data, struct drm_file *file)

	for (num_syncs = 0; num_syncs < args->num_syncs; num_syncs++) {
		err = xe_sync_entry_parse(xe, xef, &syncs[num_syncs],
					  &syncs_user[num_syncs], SYNC_PARSE_FLAG_EXEC |
					  &syncs_user[num_syncs], NULL, 0,
					  SYNC_PARSE_FLAG_EXEC |
					  (xe_vm_in_lr_mode(vm) ?
					   SYNC_PARSE_FLAG_LR_MODE : 0));
		if (err)
+14 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
#include <drm/drm_device.h>
#include <drm/drm_drv.h>
#include <drm/drm_file.h>
#include <drm/drm_syncobj.h>
#include <uapi/drm/xe_drm.h>

#include "xe_dep_scheduler.h"
@@ -324,6 +325,16 @@ struct xe_exec_queue *xe_exec_queue_create_bind(struct xe_device *xe,
	}
	xe_vm_put(migrate_vm);

	if (!IS_ERR(q)) {
		int err = drm_syncobj_create(&q->ufence_syncobj,
					     DRM_SYNCOBJ_CREATE_SIGNALED,
					     NULL);
		if (err) {
			xe_exec_queue_put(q);
			return ERR_PTR(err);
		}
	}

	return q;
}
ALLOW_ERROR_INJECTION(xe_exec_queue_create_bind, ERRNO);
@@ -333,6 +344,9 @@ void xe_exec_queue_destroy(struct kref *ref)
	struct xe_exec_queue *q = container_of(ref, struct xe_exec_queue, refcount);
	struct xe_exec_queue *eq, *next;

	if (q->ufence_syncobj)
		drm_syncobj_put(q->ufence_syncobj);

	if (xe_exec_queue_uses_pxp(q))
		xe_pxp_exec_queue_remove(gt_to_xe(q->gt)->pxp, q);

+7 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include "xe_hw_fence_types.h"
#include "xe_lrc_types.h"

struct drm_syncobj;
struct xe_execlist_exec_queue;
struct xe_gt;
struct xe_guc_exec_queue;
@@ -155,6 +156,12 @@ struct xe_exec_queue {
		struct list_head link;
	} pxp;

	/** @ufence_syncobj: User fence syncobj */
	struct drm_syncobj *ufence_syncobj;

	/** @ufence_timeline_value: User fence timeline value */
	u64 ufence_timeline_value;

	/** @ops: submission backend exec queue operations */
	const struct xe_exec_queue_ops *ops;

+3 −0
Original line number Diff line number Diff line
@@ -200,6 +200,9 @@ static void guc_ct_fini(struct drm_device *drm, void *arg)
{
	struct xe_guc_ct *ct = arg;

#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
	cancel_work_sync(&ct->dead.worker);
#endif
	ct_exit_safe_mode(ct);
	destroy_workqueue(ct->g2h_wq);
	xa_destroy(&ct->fence_lookup);
Loading