Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Iddamsetty, Aravind" <aravind.iddamsetty@intel.com>
To: "Upadhyay, Tejas" <tejas.upadhyay@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [Intel-xe] [PATCH v2 1/2] drm/xe: Get GT clock to nanosecs
Date: Wed, 5 Jul 2023 10:16:59 +0530	[thread overview]
Message-ID: <39f1f244-0097-09d2-e72b-4c7d56eb65a2@intel.com> (raw)
In-Reply-To: <SJ1PR11MB6204B29030FCE47C8201AE26812EA@SJ1PR11MB6204.namprd11.prod.outlook.com>



On 04-07-2023 15:44, Upadhyay, Tejas wrote:
> 
> 
>> -----Original Message-----
>> From: Upadhyay, Tejas
>> Sent: Tuesday, July 4, 2023 2:59 PM
>> To: Aravind Iddamsetty <aravind.iddamsetty@intel.com>; intel-
>> xe@lists.freedesktop.org
>> Subject: RE: [Intel-xe] [PATCH v2 1/2] drm/xe: Get GT clock to nanosecs
>>
>>
>>
>>> -----Original Message-----
>>> From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of
>>> Aravind Iddamsetty
>>> Sent: Tuesday, June 27, 2023 5:51 PM
>>> To: intel-xe@lists.freedesktop.org
>>> Subject: [Intel-xe] [PATCH v2 1/2] drm/xe: Get GT clock to nanosecs
>>>
>>> Helpers to get GT clock to nanosecs
>>>
>>> Signed-off-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
>>> ---
>>>  drivers/gpu/drm/xe/xe_gt_clock.c | 10 ++++++++++
>>> drivers/gpu/drm/xe/xe_gt_clock.h |  4 +++-
>>>  2 files changed, 13 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_gt_clock.c
>>> b/drivers/gpu/drm/xe/xe_gt_clock.c
>>> index 7cf11078ff57..3689c7d5cf53 100644
>>> --- a/drivers/gpu/drm/xe/xe_gt_clock.c
>>> +++ b/drivers/gpu/drm/xe/xe_gt_clock.c
>>> @@ -78,3 +78,13 @@ int xe_gt_clock_init(struct xe_gt *gt)
>>>  	gt->info.clock_freq = freq;
>>>  	return 0;
>>>  }
>>> +
>>> +static u64 div_u64_roundup(u64 nom, u32 den) {
>>> +	return div_u64(nom + den - 1, den);
>>> +}
> 
> Also this API can be moved to more common place like, xe_drv.h for others to use when needed?

xe_drv.h is not the right place to move, atleast for now do not see any
use other than here so i let it stay here for now.

Thanks,
Aravind.
> 
>>> +
>>> +u64 xe_gt_clock_interval_to_ns(const struct xe_gt *gt, u64 count) {
>>> +	return div_u64_roundup(count * NSEC_PER_SEC, gt-
>>>> info.clock_freq); }
>>> diff --git a/drivers/gpu/drm/xe/xe_gt_clock.h
>>> b/drivers/gpu/drm/xe/xe_gt_clock.h
>>> index 511923afd224..91fc9b7e83f5 100644
>>> --- a/drivers/gpu/drm/xe/xe_gt_clock.h
>>> +++ b/drivers/gpu/drm/xe/xe_gt_clock.h
>>> @@ -6,8 +6,10 @@
>>>  #ifndef _XE_GT_CLOCK_H_
>>>  #define _XE_GT_CLOCK_H_
>>>
>>> +#include <linux/types.h>
>>> +
>>>  struct xe_gt;
>>>
>>>  int xe_gt_clock_init(struct xe_gt *gt);
>>> -
>>> +u64 xe_gt_clock_interval_to_ns(const struct xe_gt *gt, u64 count);
>>>  #endif
>>
>> Looks ok to me,
>> Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
>>
>>> --
>>> 2.25.1
> 

  reply	other threads:[~2023-07-05  4:47 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 12:21 [Intel-xe] [PATCH v2 0/2] drm/xe/pmu: Enable PMU interface Aravind Iddamsetty
2023-06-27 12:21 ` [Intel-xe] [PATCH v2 1/2] drm/xe: Get GT clock to nanosecs Aravind Iddamsetty
2023-07-04  9:29   ` Upadhyay, Tejas
2023-07-04 10:14     ` Upadhyay, Tejas
2023-07-05  4:46       ` Iddamsetty, Aravind [this message]
2023-07-06  0:55   ` Dixit, Ashutosh
2023-06-27 12:21 ` [Intel-xe] [PATCH v2 2/2] drm/xe/pmu: Enable PMU interface Aravind Iddamsetty
2023-06-30 13:53   ` Upadhyay, Tejas
2023-07-03  5:11     ` Iddamsetty, Aravind
2023-07-04  3:34   ` Ghimiray, Himal Prasad
2023-07-05  4:52     ` Iddamsetty, Aravind
2023-07-04  9:10   ` Upadhyay, Tejas
2023-07-05  4:42     ` Iddamsetty, Aravind
2023-07-06  2:39   ` Dixit, Ashutosh
2023-07-06 13:42     ` Iddamsetty, Aravind
2023-07-07  2:18       ` Dixit, Ashutosh
2023-07-07  3:53         ` Iddamsetty, Aravind
2023-07-07  6:08           ` Dixit, Ashutosh
2023-07-07 10:42             ` Iddamsetty, Aravind
2023-07-07 21:25               ` Dixit, Ashutosh
2023-07-10  6:05                 ` Iddamsetty, Aravind
2023-07-10  8:12                   ` Ursulin, Tvrtko
2023-07-11 16:19                     ` Iddamsetty, Aravind
2023-07-11 23:10                       ` Dixit, Ashutosh
2023-07-12  3:11                         ` Iddamsetty, Aravind
2023-07-12  5:24                           ` Dixit, Ashutosh
2023-07-11 22:58                     ` Dixit, Ashutosh
2023-07-09  0:32           ` Dixit, Ashutosh
2023-07-10  4:13             ` Iddamsetty, Aravind
2023-07-10  5:57               ` Dixit, Ashutosh
2023-07-18  5:07           ` Dixit, Ashutosh
2023-07-19  6:59             ` Iddamsetty, Aravind
2023-07-06  2:40   ` Belgaumkar, Vinay
2023-07-06 13:06     ` Iddamsetty, Aravind
2023-07-21  1:02   ` Dixit, Ashutosh
2023-07-21 11:51     ` Iddamsetty, Aravind
2023-07-21 23:36       ` Dixit, Ashutosh
2023-07-22  6:04         ` Dixit, Ashutosh
2023-07-24  8:03           ` Iddamsetty, Aravind
2023-07-24  9:00             ` Ursulin, Tvrtko
2023-07-24 15:52               ` Dixit, Ashutosh
2023-07-24 15:52             ` Dixit, Ashutosh
2023-07-24 16:05               ` Iddamsetty, Aravind
2023-07-24 16:31                 ` Dixit, Ashutosh
2023-07-25 11:38                   ` Iddamsetty, Aravind
2023-08-07 21:16                     ` Dixit, Ashutosh
2023-08-07 22:22                       ` Dixit, Ashutosh
2023-08-08 13:45                         ` Iddamsetty, Aravind
2023-08-08 15:18                           ` Dixit, Ashutosh
2023-08-09  4:26                             ` Iddamsetty, Aravind
2023-08-09  5:02                               ` Dixit, Ashutosh
2023-07-24  9:38           ` Iddamsetty, Aravind
2023-07-22 14:39   ` Dixit, Ashutosh
2023-07-24  8:02     ` Iddamsetty, Aravind
2023-06-27 13:04 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe/pmu: Enable PMU interface (rev2) Patchwork
2023-06-27 13:05 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-06-27 13:06 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-06-27 13:10 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-06-27 13:10 ` [Intel-xe] ✗ CI.Hooks: failure " Patchwork

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=39f1f244-0097-09d2-e72b-4c7d56eb65a2@intel.com \
    --to=aravind.iddamsetty@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=tejas.upadhyay@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