mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
Driver Changes:
- Eustall locking fix and disabling on VF - Documentation fix kernel version supporting hwmon entries - SVM fixes on error handling -----BEGIN PGP SIGNATURE----- iQJNBAABCAA3FiEE6rM8lpABPHM5FqyDm6KlpjDL6lMFAmgUOMoZHGx1Y2FzLmRl bWFyY2hpQGludGVsLmNvbQAKCRCboqWmMMvqU7ExD/9t6kQnYzjZP40PLR7ldIgl BDY/nn1uUAdJdTtqeJgy5M6pc8SaQHb4dvCdZoJQNjxoAQFY7Qjotozuq/UYY27L 4WP4shfs9QLvPCq+whQr/A92Q08L/hkTOePZLPSheGYtbMDa5Y6eRFUQfY8Hqfqe G0sO26GZpHNYQoz1reNe+a2b2WA2qxGqE4jXAoKmSmOgeXWmudgGsKrUMbj398cq 2TJ0TPpDiPq6LX3/bUis2K6sq70d7gB8KpogVPVWxOy1yXRrUQD3uQ4Zez1Kblxi DNxLD4h4aGdnVen44z7Y2FIdPkipdD3oexFgfTwY43i9umGkIctdE5AmqD5SuzLx nuhAzcgkGiC6DJV4Y82+txK3IeolDC0HKLcWe94AC25gpo6UC2XXAK2CRLioFVBY 9nj8rZrrCzAlLQzCfDwhECUsDyn3VL4oKkszTbUEQDWLuG3A/l9bPHED4fDTq3Ae o/yfL+TeleRFEyAPoHHIbPL3G6RlzSx21AP9IKtF0lj1ZGayOK+dc1E6nfEldvre SW02fESrv/1phURMqrNHhtUTcgfxdI0+wfsS+L19qK3aV6Lt3rNWIhAxvhYlCFh6 ECluFYcif5ICJJgE1FHfRXSY9wg+yp4z79ZQ5NmTEjbH2le1jU9uwIMrvQSk26tM 6Wt+vRhEI6/itDyuWcprnQ== =2t2N -----END PGP SIGNATURE----- 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: Dave Airlie <airlied@redhat.com> From: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://lore.kernel.org/r/fqkoqvo62fbkvw6xoxoxutzozqksxxudbmqacjm3durid2pkak@imlxghgrk3ob
This commit is contained in:
commit
4e6de6b8f0
6 changed files with 19 additions and 8 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -1469,9 +1469,9 @@ map_pages:
|
|||
}
|
||||
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;
|
||||
|
|
|
|||
|
|
@ -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(>->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(>->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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ xe_svm_range_alloc(struct drm_gpusvm *gpusvm)
|
|||
|
||||
range = kzalloc(sizeof(*range), GFP_KERNEL);
|
||||
if (!range)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
return NULL;
|
||||
|
||||
INIT_LIST_HEAD(&range->garbage_collector_link);
|
||||
xe_vm_get(gpusvm_to_vm(gpusvm));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue