summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_query.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2023-11-22 17:38:29 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:45:19 +0300
commit4016d6bf368c4894c834e0652aecd93f7d2a2fab (patch)
treec58a0f367a3ed998a2a4565a139da543535daef1 /drivers/gpu/drm/xe/xe_query.c
parentcad4a0d6af146e14a82a0f7d43613450dc56ff80 (diff)
downloadlinux-4016d6bf368c4894c834e0652aecd93f7d2a2fab.tar.xz
drm/xe/uapi: Crystal Reference Clock updates
First of all, let's remove the duplication. But also, let's rename it to remove the word 'frequency' out of it. In general, the first thing people think of frequency is the frequency in which the GTs are operating to execute the GPU instructions. While this frequency here is a crystal reference clock frequency which is the base of everything else, and in this case of this uAPI it is used to calculate a better and precise timestamp. v2: (Suggested by Jose) Remove the engine_cs and keep the GT info one since it might be useful for other SRIOV cases where the engine_cs will be zeroed. So, grabbing from the GT_LIST should be cleaner. v3: Keep comment on put_user() call (José Roberto de Souza) Cc: Matt Roper <matthew.d.roper@intel.com> Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> Cc: Jose Souza <jose.souza@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_query.c')
-rw-r--r--drivers/gpu/drm/xe/xe_query.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
index ad9f23e43920..3316eab118b1 100644
--- a/drivers/gpu/drm/xe/xe_query.c
+++ b/drivers/gpu/drm/xe/xe_query.c
@@ -147,8 +147,6 @@ query_engine_cycles(struct xe_device *xe,
if (!hwe)
return -EINVAL;
- resp.engine_frequency = gt->info.clock_freq;
-
xe_device_mem_access_get(xe);
xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
@@ -165,9 +163,6 @@ query_engine_cycles(struct xe_device *xe,
resp.width = 36;
/* Only write to the output fields of user query */
- if (put_user(resp.engine_frequency, &query_ptr->engine_frequency))
- return -EFAULT;
-
if (put_user(resp.cpu_timestamp, &query_ptr->cpu_timestamp))
return -EFAULT;
@@ -383,7 +378,7 @@ static int query_gt_list(struct xe_device *xe, struct drm_xe_device_query *query
else
gt_list->gt_list[id].type = DRM_XE_QUERY_GT_TYPE_MAIN;
gt_list->gt_list[id].gt_id = gt->info.id;
- gt_list->gt_list[id].clock_freq = gt->info.clock_freq;
+ gt_list->gt_list[id].reference_clock = gt->info.reference_clock;
if (!IS_DGFX(xe))
gt_list->gt_list[id].near_mem_regions = 0x1;
else