Re: [PATCH 02/22] drm/radeon/dpm: add new callbacks to get the current sclk/mclk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 2, 2014 at 8:26 AM, Christian König <deathsimple@xxxxxxxxxxx> 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.

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@xxxxxxx>
>> ---
>>   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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux