Commit 275fee9d authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-xe-next-2024-06-26' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-next



UAPI Changes:
- New uapi adding OA functionality to Xe (Ashutosh)

Cross-subsystem Changes:
- devcoredump: Add dev_coredumpm_timeout (Jose)

Driver Changes:
- More SRIOV preparation, including GuC communication improvements (Michal)
- Kconfig update: do not select ACPI_BUTTON (Jani)
- Rework GPU page fault handling (Brost)
- Forcewake clean-up and fixes (Himal, Michal)
- Drop EXEC_QUEUE_FLAG_BANNED (Brost)
- Xe/Xe2 Workarounds fixes and additions (Tejas, Akshata, Sai, Vinay)
- Xe devcoredump changes (Jose)
- Tracing cleanup and add mmio tracing (RK)
- Add BMG PCI IDs (Roper)
- Scheduler fixes and improvements (Brost)
- Some overal driver clean-up around headers and print macros (Michal)
- Rename xe_exec_queue::compute to xe_exec_queue::lr (Francois)
- Improve RTP rules to allow easier 'OR' conditions in WA declaration (Lucas)
- Use ttm_uncached for BO with NEEDS_UC flag (Michal)
- Other OA related work and fixes (Ashutosh, Michal, Jose)
- Simplify locking in new_vma (Brost)
- Remove xe_irq_shutdown (Ilia)

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

From: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ZnyW9RdC_aWSla_q@intel.com
parents a78313bb 406d058d
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -18,9 +18,6 @@ static struct class devcd_class;
/* global disable flag, for security purposes */
static bool devcd_disabled;

/* if data isn't read by userspace after 5 minutes then delete it */
#define DEVCD_TIMEOUT	(HZ * 60 * 5)

struct devcd_entry {
	struct device devcd_dev;
	void *data;
@@ -328,7 +325,8 @@ void dev_coredump_put(struct device *dev)
EXPORT_SYMBOL_GPL(dev_coredump_put);

/**
 * dev_coredumpm - create device coredump with read/free methods
 * dev_coredumpm_timeout - create device coredump with read/free methods with a
 * custom timeout.
 * @dev: the struct device for the crashed device
 * @owner: the module that contains the read/free functions, use %THIS_MODULE
 * @data: data cookie for the @read/@free functions
@@ -336,17 +334,20 @@ EXPORT_SYMBOL_GPL(dev_coredump_put);
 * @gfp: allocation flags
 * @read: function to read from the given buffer
 * @free: function to free the given buffer
 * @timeout: time in jiffies to remove coredump
 *
 * Creates a new device coredump for the given device. If a previous one hasn't
 * been read yet, the new coredump is discarded. The data lifetime is determined
 * by the device coredump framework and when it is no longer needed the @free
 * function will be called to free the data.
 */
void dev_coredumpm(struct device *dev, struct module *owner,
void dev_coredumpm_timeout(struct device *dev, struct module *owner,
			   void *data, size_t datalen, gfp_t gfp,
		   ssize_t (*read)(char *buffer, loff_t offset, size_t count,
				   void *data, size_t datalen),
		   void (*free)(void *data))
			   ssize_t (*read)(char *buffer, loff_t offset,
					   size_t count, void *data,
					   size_t datalen),
			   void (*free)(void *data),
			   unsigned long timeout)
{
	static atomic_t devcd_count = ATOMIC_INIT(0);
	struct devcd_entry *devcd;
@@ -403,7 +404,7 @@ void dev_coredumpm(struct device *dev, struct module *owner,
	dev_set_uevent_suppress(&devcd->devcd_dev, false);
	kobject_uevent(&devcd->devcd_dev.kobj, KOBJ_ADD);
	INIT_DELAYED_WORK(&devcd->del_wk, devcd_del);
	schedule_delayed_work(&devcd->del_wk, DEVCD_TIMEOUT);
	schedule_delayed_work(&devcd->del_wk, timeout);
	mutex_unlock(&devcd->mutex);
	return;
 put_device:
@@ -414,7 +415,7 @@ void dev_coredumpm(struct device *dev, struct module *owner,
 free:
	free(data);
}
EXPORT_SYMBOL_GPL(dev_coredumpm);
EXPORT_SYMBOL_GPL(dev_coredumpm_timeout);

/**
 * dev_coredumpsg - create device coredump that uses scatterlist as data
+0 −1
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ config DRM_XE
	select BACKLIGHT_CLASS_DEVICE if ACPI
	select INPUT if ACPI
	select ACPI_VIDEO if X86 && ACPI
	select ACPI_BUTTON if ACPI
	select X86_PLATFORM_DEVICES if X86 && ACPI
	select ACPI_WMI if X86 && ACPI
	select SYNC_FILE
+7 −0
Original line number Diff line number Diff line
@@ -24,9 +24,12 @@ $(obj)/generated/%_wa_oob.c $(obj)/generated/%_wa_oob.h: $(obj)/xe_gen_wa_oob \
	$(call cmd,wa_oob)

uses_generated_oob := \
	$(obj)/xe_ggtt.o \
	$(obj)/xe_gsc.o \
	$(obj)/xe_gt.o \
	$(obj)/xe_guc.o \
	$(obj)/xe_guc_ads.o \
	$(obj)/xe_guc_pc.o \
	$(obj)/xe_migrate.o \
	$(obj)/xe_ring_ops.o \
	$(obj)/xe_vm.o \
@@ -92,9 +95,11 @@ xe-y += xe_bb.o \
	xe_mmio.o \
	xe_mocs.o \
	xe_module.o \
	xe_oa.o \
	xe_pat.o \
	xe_pci.o \
	xe_pcode.o \
	xe_perf.o \
	xe_pm.o \
	xe_preempt_fence.o \
	xe_pt.o \
@@ -112,6 +117,8 @@ xe-y += xe_bb.o \
	xe_tile.o \
	xe_tile_sysfs.o \
	xe_trace.o \
	xe_trace_bo.o \
	xe_trace_guc.o \
	xe_ttm_sys_mgr.o \
	xe_ttm_stolen_mgr.o \
	xe_ttm_vram_mgr.o \
+0 −6
Original line number Diff line number Diff line
@@ -128,7 +128,6 @@ enum xe_guc_action {
	XE_GUC_ACTION_CONTEXT_RESET_NOTIFICATION = 0x1008,
	XE_GUC_ACTION_ENGINE_FAILURE_NOTIFICATION = 0x1009,
	XE_GUC_ACTION_HOST2GUC_UPDATE_CONTEXT_POLICIES = 0x100B,
	XE_GUC_ACTION_SETUP_PC_GUCRC = 0x3004,
	XE_GUC_ACTION_AUTHENTICATE_HUC = 0x4000,
	XE_GUC_ACTION_GET_HWCONFIG = 0x4100,
	XE_GUC_ACTION_REGISTER_CONTEXT = 0x4502,
@@ -153,11 +152,6 @@ enum xe_guc_action {
	XE_GUC_ACTION_LIMIT
};

enum xe_guc_rc_options {
	XE_GUCRC_HOST_CONTROL,
	XE_GUCRC_FIRMWARE_CONTROL,
};

enum xe_guc_preempt_options {
	XE_GUC_PREEMPT_OPTION_DROP_WORK_Q = 0x4,
	XE_GUC_PREEMPT_OPTION_DROP_SUBMIT_Q = 0x8,
+22 −0
Original line number Diff line number Diff line
@@ -246,4 +246,26 @@ struct slpc_shared_data {
#define HOST2GUC_PC_SLPC_REQUEST_MSG_1_EVENT_ARGC	(0xffu << 0)
#define HOST2GUC_PC_SLPC_REQUEST_MSG_N_EVENT_DATA_N	GUC_HXG_REQUEST_MSG_n_DATAn

/**
 * DOC: SETUP_PC_GUCRC
 *
 *  +---+-------+--------------------------------------------------------------+
 *  |   | Bits  | Description                                                  |
 *  +===+=======+==============================================================+
 *  | 0 |    31 | ORIGIN = GUC_HXG_ORIGIN_HOST_                                |
 *  |   +-------+--------------------------------------------------------------+
 *  |   | 30:28 | TYPE = GUC_HXG_TYPE_FAST_REQUEST_                            |
 *  |   +-------+--------------------------------------------------------------+
 *  |   | 27:16 | DATA0 = MBZ                                                  |
 *  |   +-------+--------------------------------------------------------------+
 *  |   |  15:0 | ACTION = _`GUC_ACTION_HOST2GUC_SETUP_PC_GUCRC` = 0x3004      |
 *  +---+-------+--------------------------------------------------------------+
 *  | 1 |  31:0 | **MODE** = GUCRC_HOST_CONTROL(0), GUCRC_FIRMWARE_CONTROL(1)  |
 *  +---+-------+--------------------------------------------------------------+
 */

#define GUC_ACTION_HOST2GUC_SETUP_PC_GUCRC		0x3004u
#define   GUCRC_HOST_CONTROL				0u
#define   GUCRC_FIRMWARE_CONTROL			1u

#endif
Loading