On 9/24/2024 2:17 AM, Jacek Lawrynowicz wrote:
--- a/drivers/accel/ivpu/ivpu_sysfs.c
+++ b/drivers/accel/ivpu/ivpu_sysfs.c
@@ -6,6 +6,8 @@
  #include <linux/device.h>
  #include <linux/err.h>
+#include "ivpu_drv.h"
+#include "ivpu_fw.h"
  #include "ivpu_hw.h"
  #include "ivpu_sysfs.h"
@@ -39,8 +41,20 @@ npu_busy_time_us_show(struct device *dev, struct device_attribute *attr, char *b static DEVICE_ATTR_RO(npu_busy_time_us); +static ssize_t
+sched_mode_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+       struct drm_device *drm = dev_get_drvdata(dev);
+       struct ivpu_device *vdev = to_ivpu_device(drm);
+
+       return sysfs_emit(buf, "%s\n", vdev->fw->sched_mode ? "HW" : "OS");
+}
+
+static DEVICE_ATTR_RO(sched_mode);
+
  static struct attribute *ivpu_dev_attrs[] = {
        &dev_attr_npu_busy_time_us.attr,
+       &dev_attr_sched_mode.attr,
        NULL,
  };

No Documentation/ABI entry?

Reply via email to