From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Dugast, Francois" <francois.dugast@intel.com>
Cc: "Roper, Matthew D" <matthew.d.roper@intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [Intel-xe] [PATCH v3 22/30] drm/xe/uapi: Crystal Reference Clock updates
Date: Tue, 26 Sep 2023 16:40:24 +0000 [thread overview]
Message-ID: <6b81eb7206361dad664c345913a7679622a368a5.camel@intel.com> (raw)
In-Reply-To: <20230926125540.7-23-francois.dugast@intel.com>
On Tue, 2023-09-26 at 12:55 +0000, Francois Dugast wrote:
> From: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> 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.
>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Missing Cc.
Discussed with Rodrigo offline and was agreed to bring back clock_freq in drm_xe_query_gt and drop cs_reference_clock/cs_frequency from
drm_xe_query_cs_cycles.
> Cc: Francois Dugast <francois.dugast@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Francois Dugast <francois.dugast@intel.com>
> ---
> drivers/gpu/drm/xe/xe_query.c | 5 ++---
> include/uapi/drm/xe_drm.h | 10 ++++------
> 2 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
> index a27b10583f5a..8184df4abde1 100644
> --- a/drivers/gpu/drm/xe/xe_query.c
> +++ b/drivers/gpu/drm/xe/xe_query.c
> @@ -149,7 +149,7 @@ query_cs_cycles(struct xe_device *xe,
> if (!hwe)
> return -EINVAL;
>
> - resp.cs_frequency = gt->info.clock_freq;
> + resp.cs_reference_clock = gt->info.clock_freq;
>
> xe_device_mem_access_get(xe);
> xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
> @@ -167,7 +167,7 @@ query_cs_cycles(struct xe_device *xe,
> resp.width = 36;
>
> /* Only write to the output fields of user query */
> - if (put_user(resp.cs_frequency, &query_ptr->cs_frequency))
> + if (put_user(resp.cs_reference_clock, &query_ptr->cs_reference_clock))
> return -EFAULT;
>
> if (put_user(resp.cpu_timestamp, &query_ptr->cpu_timestamp))
> @@ -380,7 +380,6 @@ static int query_gt_list(struct xe_device *xe, struct drm_xe_device_query *query
> else
> gt_list->gt_list[id].type = 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;
> if (!IS_DGFX(xe))
> gt_list->gt_list[id].native_mem_regions = 0x1;
> else
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index f306cae6d467..026536a20253 100644
> --- a/include/uapi/drm/xe_drm.h
> +++ b/include/uapi/drm/xe_drm.h
> @@ -249,8 +249,8 @@ struct drm_xe_query_mem_region {
> * relevant GPU timestamp. clockid is used to return the specific CPU
> * timestamp.
> *
> - * The query returns the command streamer cycles and the frequency that can
> - * be used to calculate the command streamer timestamp. In addition the
> + * The query returns the command streamer cycles and the reference clock that
> + * can be used to calculate the command streamer timestamp. In addition the
> * query returns a set of cpu timestamps that indicate when the command
> * streamer cycle count was captured.
> */
> @@ -267,8 +267,8 @@ struct drm_xe_query_cs_cycles {
> */
> __u64 cs_cycles;
>
> - /** Frequency of the cs cycles in Hz. */
> - __u64 cs_frequency;
> + /** Reference Clock of the cs cycles in Hz. */
> + __u64 cs_reference_clock;
>
> /**
> * CPU timestamp in ns. The timestamp is captured before reading the
> @@ -382,8 +382,6 @@ struct drm_xe_query_gt {
> __u16 type;
> /** @gt_id: Unique ID of this GT within the PCI Device */
> __u16 gt_id;
> - /** @clock_freq: A clock frequency for timestamp */
> - __u32 clock_freq;
> /**
> * @native_mem_regions: Bit mask of instances from
> * drm_xe_query_mem_usage that lives on the same GPU/Tile and have
next prev parent reply other threads:[~2023-09-26 16:40 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 12:55 [Intel-xe] [PATCH v3 00/30] uAPI Alignment - take 1 v3 Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 01/30] drm/xe: Fix array bounds check for queries Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 02/30] drm/xe: Set the correct type for xe_to_user_engine_class Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 03/30] drm/xe: Correlate engine and cpu timestamps with better accuracy Francois Dugast
2023-09-26 16:42 ` Souza, Jose
2023-09-26 18:43 ` Umesh Nerlige Ramappa
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 04/30] drm/xe/uapi: Separate VM_BIND's operation and flag Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 05/30] drm/xe/vm: Remove VM_BIND_OP macro Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 06/30] drm/xe/uapi: Remove MMIO ioctl Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 07/30] drm/xe: Fix xe_exec_queue_is_idle for parallel exec queues Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 08/30] drm/xe: Deprecate XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE implementation Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 09/30] drm/xe: Rename exec_queue_kill_compute to xe_vm_remove_compute_exec_queue Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 10/30] drm/xe: Remove XE_EXEC_QUEUE_SET_PROPERTY_COMPUTE_MODE from uAPI Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 11/30] drm/xe/uapi: Use common drm_xe_ext_set_property extension Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 12/30] drm/xe: Kill XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS extension Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 13/30] drm/xe/uapi: Kill DRM_XE_UFENCE_WAIT_VM_ERROR Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 14/30] drm/xe: Remove async worker and rework sync binds Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 15/30] drm/xe: Fix VM bind out-sync signaling ordering Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 16/30] drm/xe/uapi: Document drm_xe_query_gt Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 17/30] drm/xe/uapi: Replace useless 'instance' per unique gt_id Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 18/30] drm/xe/uapi: Remove unused field of drm_xe_query_gt Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 19/30] drm/xe/uapi: Rename gts to gt_list Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 20/30] drm/xe/uapi: Fix naming of XE_QUERY_CONFIG_MAX_EXEC_QUEUE_PRIORITY Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 21/30] drm/xe/uapi: Add documentation for query Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 22/30] drm/xe/uapi: Crystal Reference Clock updates Francois Dugast
2023-09-26 16:40 ` Souza, Jose [this message]
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 23/30] drm/xe: Extend drm_xe_vm_bind_op Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 24/30] drm/xe: Add uAPI to query micro-controler firmware version Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 25/30] drm/xe/uapi: Document DRM_XE_DEVICE_QUERY_HWCONFIG Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 26/30] drm/xe/uapi: Add pad to drm_xe_engine_class_instance Francois Dugast
2023-09-29 0:36 ` Umesh Nerlige Ramappa
2023-09-29 9:06 ` Francois Dugast
2023-09-29 16:00 ` Umesh Nerlige Ramappa
2023-09-29 16:45 ` Souza, Jose
2023-10-03 18:15 ` Umesh Nerlige Ramappa
2023-10-04 10:55 ` Francois Dugast
2023-10-05 2:35 ` Umesh Nerlige Ramappa
2023-10-09 17:05 ` Umesh Nerlige Ramappa
2023-10-09 17:16 ` Francois Dugast
2023-10-06 2:07 ` Umesh Nerlige Ramappa
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 27/30] drm/xe: Extend uAPI to query HuC micro-controler firmware version Francois Dugast
2023-09-26 16:46 ` Souza, Jose
2023-09-27 17:04 ` Rodrigo Vivi
2023-09-27 17:22 ` Souza, Jose
2023-10-04 0:48 ` John Harrison
2023-10-09 13:08 ` Francois Dugast
2023-10-09 13:35 ` Souza, Jose
2023-10-10 19:10 ` Lucas De Marchi
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 28/30] drm/xe: Remove useless query config num_params Francois Dugast
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 29/30] drm/xe/uapi: Add missing DRM_ prefix in uAPI constants Francois Dugast
2023-09-26 16:24 ` Souza, Jose
2023-09-26 12:55 ` [Intel-xe] [PATCH v3 30/30] drm/xe/uapi: Add _FLAG to uAPI constants usable for flags Francois Dugast
2023-09-26 13:12 ` [Intel-xe] ✓ CI.Patch_applied: success for uAPI Alignment - take 1 v3 Patchwork
2023-09-26 13:13 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-09-26 13:14 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-09-26 13:21 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-26 13:22 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork
2023-09-26 13:23 ` [Intel-xe] ✓ CI.checksparse: success " Patchwork
2023-09-26 13:49 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
2023-10-04 0:31 ` [Intel-xe] [PATCH v3 00/30] " John Harrison
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b81eb7206361dad664c345913a7679622a368a5.camel@intel.com \
--to=jose.souza@intel.com \
--cc=francois.dugast@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox