Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: add info ioctl query for vce clock info (v3)

This is needed to set up the vce clock table in userspace
for proper VCE DPM.

v2: fix copy paste typo in comment
v3: track number of valid states

Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+20
+20
include/uapi/drm/amdgpu_drm.h
··· 491 491 #define AMDGPU_INFO_NUM_EVICTIONS 0x18 492 492 /* Query memory about VRAM and GTT domains */ 493 493 #define AMDGPU_INFO_MEMORY 0x19 494 + /* Query vce clock table */ 495 + #define AMDGPU_INFO_VCE_CLOCK_TABLE 0x1A 494 496 495 497 #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 496 498 #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff ··· 677 675 /** Bitmask of available rings. Bit 0 means ring 0, etc. */ 678 676 __u32 available_rings; 679 677 __u32 _pad; 678 + }; 679 + 680 + #define AMDGPU_VCE_CLOCK_TABLE_ENTRIES 6 681 + 682 + struct drm_amdgpu_info_vce_clock_table_entry { 683 + /** System clock */ 684 + __u32 sclk; 685 + /** Memory clock */ 686 + __u32 mclk; 687 + /** VCE clock */ 688 + __u32 eclk; 689 + __u32 pad; 690 + }; 691 + 692 + struct drm_amdgpu_info_vce_clock_table { 693 + struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES]; 694 + __u32 num_valid_entries; 695 + __u32 pad; 680 696 }; 681 697 682 698 /*