From: Matthew Auld Date: Wed, 19 Jul 2023 08:38:06 +0000 (+0100) Subject: drm/xe/guc_pc: add missing mem_access for freq_rpe_show X-Git-Tag: v6.8-rc1~111^2~7^2~528 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d3ab1fa3195d2b0291625fcd0062796aaf15794;p=thirdparty%2Fkernel%2Fstable.git drm/xe/guc_pc: add missing mem_access for freq_rpe_show The mem_access is meant to cover any kind of device level memory access, mmio included. Signed-off-by: Matthew Auld Cc: Matthew Brost Cc: Rodrigo Vivi Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Signed-off-by: Rodrigo Vivi --- diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index 03dfbde29fe51..0927cb669603c 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);