Commit 4e6de6b8 authored by Dave Airlie's avatar Dave Airlie
Browse files

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



Driver Changes:
- Eustall locking fix and disabling on VF
- Documentation fix kernel version supporting hwmon entries
- SVM fixes on error handling

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

From: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/fqkoqvo62fbkvw6xoxoxutzozqksxxudbmqacjm3durid2pkak@imlxghgrk3ob
parents c13276a1 e8e3a804
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ Description: RO. Package current voltage in millivolt.

What:		/sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/temp2_input
Date:		March 2025
KernelVersion:	6.14
KernelVersion:	6.15
Contact:	intel-xe@lists.freedesktop.org
Description:	RO. Package temperature in millidegree Celsius.

@@ -119,7 +119,7 @@ Description: RO. Package temperature in millidegree Celsius.

What:		/sys/bus/pci/drivers/xe/.../hwmon/hwmon<i>/temp3_input
Date:		March 2025
KernelVersion:	6.14
KernelVersion:	6.15
Contact:	intel-xe@lists.freedesktop.org
Description:	RO. VRAM temperature in millidegree Celsius.

+1 −1
Original line number Diff line number Diff line
@@ -1469,9 +1469,9 @@ int drm_gpusvm_range_get_pages(struct drm_gpusvm *gpusvm,
		}
		i += 1 << order;
		num_dma_mapped = i;
		range->flags.has_dma_mapping = true;
	}

	range->flags.has_dma_mapping = true;
	if (zdd) {
		range->flags.has_devmem_pages = true;
		range->dpagemap = dpagemap;
+12 −2
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ struct xe_eu_stall_data_stream {

	struct xe_gt *gt;
	struct xe_bo *bo;
	/* Lock to protect data buffer pointers */
	struct mutex xecore_buf_lock;
	struct per_xecore_buf *xecore_buf;
	struct {
		bool reported_to_user;
@@ -208,6 +210,9 @@ int xe_eu_stall_init(struct xe_gt *gt)
	struct xe_device *xe = gt_to_xe(gt);
	int ret;

	if (!xe_eu_stall_supported_on_platform(xe))
		return 0;

	gt->eu_stall = kzalloc(sizeof(*gt->eu_stall), GFP_KERNEL);
	if (!gt->eu_stall) {
		ret = -ENOMEM;
@@ -378,7 +383,7 @@ static bool eu_stall_data_buf_poll(struct xe_eu_stall_data_stream *stream)
	u16 group, instance;
	unsigned int xecore;

	mutex_lock(&gt->eu_stall->stream_lock);
	mutex_lock(&stream->xecore_buf_lock);
	for_each_dss_steering(xecore, gt, group, instance) {
		xecore_buf = &stream->xecore_buf[xecore];
		read_ptr = xecore_buf->read;
@@ -396,7 +401,7 @@ static bool eu_stall_data_buf_poll(struct xe_eu_stall_data_stream *stream)
			set_bit(xecore, stream->data_drop.mask);
		xecore_buf->write = write_ptr;
	}
	mutex_unlock(&gt->eu_stall->stream_lock);
	mutex_unlock(&stream->xecore_buf_lock);

	return min_data_present;
}
@@ -511,11 +516,13 @@ static ssize_t xe_eu_stall_stream_read_locked(struct xe_eu_stall_data_stream *st
	unsigned int xecore;
	int ret = 0;

	mutex_lock(&stream->xecore_buf_lock);
	if (bitmap_weight(stream->data_drop.mask, XE_MAX_DSS_FUSE_BITS)) {
		if (!stream->data_drop.reported_to_user) {
			stream->data_drop.reported_to_user = true;
			xe_gt_dbg(gt, "EU stall data dropped in XeCores: %*pb\n",
				  XE_MAX_DSS_FUSE_BITS, stream->data_drop.mask);
			mutex_unlock(&stream->xecore_buf_lock);
			return -EIO;
		}
		stream->data_drop.reported_to_user = false;
@@ -527,6 +534,7 @@ static ssize_t xe_eu_stall_stream_read_locked(struct xe_eu_stall_data_stream *st
		if (ret || count == total_size)
			break;
	}
	mutex_unlock(&stream->xecore_buf_lock);
	return total_size ?: (ret ?: -EAGAIN);
}

@@ -583,6 +591,7 @@ static void xe_eu_stall_stream_free(struct xe_eu_stall_data_stream *stream)
{
	struct xe_gt *gt = stream->gt;

	mutex_destroy(&stream->xecore_buf_lock);
	gt->eu_stall->stream = NULL;
	kfree(stream);
}
@@ -718,6 +727,7 @@ static int xe_eu_stall_stream_init(struct xe_eu_stall_data_stream *stream,
	}

	init_waitqueue_head(&stream->poll_wq);
	mutex_init(&stream->xecore_buf_lock);
	INIT_DELAYED_WORK(&stream->buf_poll_work, eu_stall_data_buf_poll_work_fn);
	stream->per_xecore_buf_size = per_xecore_buf_size;
	stream->sampling_rate_mult = props->sampling_rate_mult;
+2 −1
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
#define __XE_EU_STALL_H__

#include "xe_gt_types.h"
#include "xe_sriov.h"

size_t xe_eu_stall_get_per_xecore_buf_size(void);
size_t xe_eu_stall_data_record_size(struct xe_device *xe);
@@ -19,6 +20,6 @@ int xe_eu_stall_stream_open(struct drm_device *dev,

static inline bool xe_eu_stall_supported_on_platform(struct xe_device *xe)
{
	return xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20;
	return !IS_SRIOV_VF(xe) && (xe->info.platform == XE_PVC || GRAPHICS_VER(xe) >= 20);
}
#endif
+1 −1
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ static void __fill_ext_reg(struct __guc_mmio_reg_descr *ext,

	ext->reg = XE_REG(extlist->reg.__reg.addr);
	ext->flags = FIELD_PREP(GUC_REGSET_STEERING_NEEDED, 1);
	ext->flags = FIELD_PREP(GUC_REGSET_STEERING_GROUP, slice_id);
	ext->flags |= FIELD_PREP(GUC_REGSET_STEERING_GROUP, slice_id);
	ext->flags |= FIELD_PREP(GUC_REGSET_STEERING_INSTANCE, subslice_id);
	ext->regname = extlist->name;
}
Loading