[Intel-xe] [PATCH v14 04/10] drm/xe/guc_pc: add missing mem_access for freq_rpe_show
Matthew Auld
matthew.auld at intel.com
Mon Jul 17 11:25:07 UTC 2023
The mem_access is meant to cover any kind of device level memory access,
mmio included.
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Matthew Brost <matthew.brost at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Cc: Anshuman Gupta <anshuman.gupta at intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta at intel.com>
---
drivers/gpu/drm/xe/xe_guc_pc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
index 3093cfeff0c2..a5aae624d11e 100644
--- a/drivers/gpu/drm/xe/xe_guc_pc.c
+++ b/drivers/gpu/drm/xe/xe_guc_pc.c
@@ -422,8 +422,12 @@ static ssize_t freq_rpe_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct xe_guc_pc *pc = dev_to_pc(dev);
+ struct xe_gt *gt = pc_to_gt(pc);
+ struct xe_device *xe = gt_to_xe(gt);
+ xe_device_mem_access_get(xe);
pc_update_rp_values(pc);
+ xe_device_mem_access_put(xe);
return sysfs_emit(buf, "%d\n", pc->rpe_freq);
}
static DEVICE_ATTR_RO(freq_rpe);
--
2.41.0
More information about the Intel-xe
mailing list