dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 02/22] drm/radeon/dpm: add new callbacks to get the current sclk/mclk
Date: Thu, 02 Oct 2014 15:11:28 +0200	[thread overview]
Message-ID: <542D4F00.5040708@vodafone.de> (raw)
In-Reply-To: <CADnq5_M0eZsZKPd0fjYZwoax4iPRSjof76LbQLDCMbcAH0YnQg@mail.gmail.com>

Am 02.10.2014 um 15:06 schrieb Alex Deucher:
> On Thu, Oct 2, 2014 at 8:26 AM, Christian König <deathsimple@vodafone.de> wrote:
>> Might be a good idea to make that a bit more generic, e.g. add a
>> get_current_clk callback and and a type (sclk, mclk, vclk, dclk, etc..)
>> enum. But I can live with this approach as well.
>>
> Yeah, I thought about that, but I'm not sure if there is a good way to
> query that for certain clocks when dynamic clocking is enabled.  E.g.,
> UVD on newer asics.

That's why I always favored using the PLL test registers. It can 
actually measure the clocks quite precisely if the reference clock 
(usually the PCI clock) is stable enough. And as far as I know can 
access any clock signal in the system, even the memory clock is 
measurable for each memory interface separately.

Christian.

>
> Alex
>
>> Christian.
>>
>> Am 01.10.2014 um 17:38 schrieb Alex Deucher:
>>
>>> Needed to to expose the current clocks via the INFO ioctl.
>>>
>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>> ---
>>>    drivers/gpu/drm/radeon/radeon.h | 4 ++++
>>>    1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/radeon/radeon.h
>>> b/drivers/gpu/drm/radeon/radeon.h
>>> index 510fe96..9e3dc82 100644
>>> --- a/drivers/gpu/drm/radeon/radeon.h
>>> +++ b/drivers/gpu/drm/radeon/radeon.h
>>> @@ -1935,6 +1935,8 @@ struct radeon_asic {
>>>                  bool (*vblank_too_short)(struct radeon_device *rdev);
>>>                  void (*powergate_uvd)(struct radeon_device *rdev, bool
>>> gate);
>>>                  void (*enable_bapm)(struct radeon_device *rdev, bool
>>> enable);
>>> +               u32 (*get_current_sclk)(struct radeon_device *rdev);
>>> +               u32 (*get_current_mclk)(struct radeon_device *rdev);
>>>          } dpm;
>>>          /* pageflipping */
>>>          struct {
>>> @@ -2893,6 +2895,8 @@ static inline void radeon_ring_write(struct
>>> radeon_ring *ring, uint32_t v)
>>>    #define radeon_dpm_vblank_too_short(rdev)
>>> rdev->asic->dpm.vblank_too_short((rdev))
>>>    #define radeon_dpm_powergate_uvd(rdev, g)
>>> rdev->asic->dpm.powergate_uvd((rdev), (g))
>>>    #define radeon_dpm_enable_bapm(rdev, e)
>>> rdev->asic->dpm.enable_bapm((rdev), (e))
>>> +#define radeon_dpm_get_current_sclk(rdev)
>>> rdev->asic->dpm.get_current_sclk((rdev))
>>> +#define radeon_dpm_get_current_mclk(rdev)
>>> rdev->asic->dpm.get_current_mclk((rdev))
>>>      /* Common functions */
>>>    /* AGP */
>>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-10-02 13:12 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01 15:38 [PATCH 00/22] new radeon info queries Alex Deucher
2014-10-01 15:38 ` [PATCH 01/22] drm/radeon: add INFO query for GPU temperature Alex Deucher
2014-10-01 15:38 ` [PATCH 02/22] drm/radeon/dpm: add new callbacks to get the current sclk/mclk Alex Deucher
2014-10-02 12:26   ` Christian König
2014-10-02 13:06     ` Alex Deucher
2014-10-02 13:11       ` Christian König [this message]
2014-10-01 15:38 ` [PATCH 03/22] drm/radeon/rs780: implement get_current_sclk/mclk Alex Deucher
2014-10-01 15:38 ` [PATCH 04/22] drm/radeon/rv6xx: " Alex Deucher
2014-10-01 15:38 ` [PATCH 05/22] drm/radeon/rv7xx/eg: " Alex Deucher
2014-10-01 15:38 ` [PATCH 06/22] drm/radeon/btc: " Alex Deucher
2014-10-01 15:38 ` [PATCH 07/22] drm/radeon: remove some rv7xx leftovers from btc dpm code Alex Deucher
2014-10-01 15:38 ` [PATCH 08/22] drm/radeon/ni: implement get_current_sclk/mclk Alex Deucher
2014-10-01 15:38 ` [PATCH 09/22] drm/radeon/si: " Alex Deucher
2014-10-01 15:38 ` [PATCH 10/22] drm/radeon/ci: " Alex Deucher
2014-10-01 15:38 ` [PATCH 11/22] drm/radeon/sumo: " Alex Deucher
2014-10-01 15:38 ` [PATCH 12/22] drm/radeon/tn: " Alex Deucher
2014-10-01 15:38 ` [PATCH 13/22] drm/radeon/kv: " Alex Deucher
2014-10-01 15:38 ` [PATCH 14/22] drm/radeon: add INFO query for current sclk/mclk Alex Deucher
2014-10-01 15:38 ` [PATCH 15/22] drm/radeon: add new callback for info ioctl register accessor Alex Deucher
2014-10-01 15:38 ` [PATCH 16/22] drm/radeon: add get_allowed_info_register function for r1xx-r5xx Alex Deucher
2014-10-01 15:38 ` [PATCH 17/22] drm/radeon: add get_allowed_info_register for r6xx/r7xx Alex Deucher
2014-10-01 15:38 ` [PATCH 18/22] drm/radeon: add get_allowed_info_register for EG/BTC Alex Deucher
2014-10-01 15:38 ` [PATCH 19/22] drm/radeon: add get_allowed_info_register for cayman/TN Alex Deucher
2014-10-01 15:38 ` [PATCH 20/22] drm/radeon: add get_allowed_info_register for SI Alex Deucher
2014-10-01 15:38 ` [PATCH 21/22] drm/radeon: add get_allowed_info_register for CIK Alex Deucher
2014-10-01 15:38 ` [PATCH 22/22] drm/radeon: add support for read reg query from radeon info ioctl Alex Deucher
2014-12-21 20:05 ` [PATCH 00/22] new radeon info queries Siavash Eliasi
2014-12-22 17:01   ` Alex Deucher
2014-12-23  4:44     ` Siavash Eliasi
2015-02-24 22:09 ` Marek Olšák
2015-02-24 22:51   ` Alex Deucher

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=542D4F00.5040708@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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