aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-11-25 18:21:20 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-25 18:21:20 -0800
commita4849f6000e29235a2707f22e39da6b897bb9543 (patch)
tree82e09fb6297bb3ccbfde4f0e350f01cc90f21603 /drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
parentMerge tag 'block-5.16-2021-11-25' of git://git.kernel.dk/linux-block (diff)
parentMerge tag 'drm-intel-fixes-2021-11-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes (diff)
downloadlinux-dev-a4849f6000e29235a2707f22e39da6b897bb9543.tar.xz
linux-dev-a4849f6000e29235a2707f22e39da6b897bb9543.zip
Merge tag 'drm-fixes-2021-11-26' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "No idea if turkey comes before pull request processing, but here's the regular week's fixes. A bunch for amdgpu, nouveau adds support for a new GPU (like a PCI ID addition), and a scattering of fixes across i915/hyperv/aspeed/vc4. Specifics: amdgpu: - SRIOV fixes - dma-buf double free fix - Display fixes for GPU resets - Fix DSC powergating regression - GPU TSC fixes - Interrupt handler overflow fixes - Endian fix in IP discovery table handling - Aldebaran ASPM fix - Fix overclocking regression on older asics - Backlight/ACPI fix amdkfd: - SVM fixes - VMA removal race fix hyperv: - removal fix aspeed: - vga_pw sysfs file fix vc4: - error checking fix nouveau: - support GA106 - fix a few error checks i915: - fix wakeref handling around PXP suspend" * tag 'drm-fixes-2021-11-26' of git://anongit.freedesktop.org/drm/drm: (25 commits) drm/amd/display: update bios scratch when setting backlight drm/amdgpu/pm: fix powerplay OD interface drm/amdgpu: Skip ASPM programming on aldebaran drm/amdgpu: fix byteorder error in amdgpu discovery drm/amdgpu: enable Navi retry fault wptr overflow drm/amdgpu: enable Navi 48-bit IH timestamp counter drm/amdkfd: simplify drain retry fault drm/amdkfd: handle VMA remove race drm/amdkfd: process exit and retry fault race drm/amdgpu: IH process reset count when restart drm/amdgpu/gfx9: switch to golden tsc registers for renoir+ drm/amdgpu/gfx10: add wraparound gpu counter check for APUs as well drm/amdgpu: move kfd post_reset out of reset_sriov function drm/amd/display: Fixed DSC would not PG after removing DSC stream drm/amd/display: Reset link encoder assignments for GPU reset drm/amd/display: Set plane update flags for all planes in reset drm/amd/display: Fix DPIA outbox timeout after GPU reset drm/amdgpu: Fix double free of dmabuf drm/amdgpu: Fix MMIO HDP flush on SRIOV drm/i915/gt: Hold RPM wakelock during PXP suspend ...
Diffstat (limited to 'drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c')
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
index 8e28a8eecefc..03bf8f069222 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c
@@ -1550,8 +1550,6 @@ static int smu8_print_clock_levels(struct pp_hwmgr *hwmgr,
uint32_t i, now;
int size = 0;
- phm_get_sysfs_buf(&buf, &size);
-
switch (type) {
case PP_SCLK:
now = PHM_GET_FIELD(cgs_read_ind_register(hwmgr->device,
@@ -1561,7 +1559,7 @@ static int smu8_print_clock_levels(struct pp_hwmgr *hwmgr,
CURR_SCLK_INDEX);
for (i = 0; i < sclk_table->count; i++)
- size += sysfs_emit_at(buf, size, "%d: %uMhz %s\n",
+ size += sprintf(buf + size, "%d: %uMhz %s\n",
i, sclk_table->entries[i].clk / 100,
(i == now) ? "*" : "");
break;
@@ -1573,7 +1571,7 @@ static int smu8_print_clock_levels(struct pp_hwmgr *hwmgr,
CURR_MCLK_INDEX);
for (i = SMU8_NUM_NBPMEMORYCLOCK; i > 0; i--)
- size += sysfs_emit_at(buf, size, "%d: %uMhz %s\n",
+ size += sprintf(buf + size, "%d: %uMhz %s\n",
SMU8_NUM_NBPMEMORYCLOCK-i, data->sys_info.nbp_memory_clock[i-1] / 100,
(SMU8_NUM_NBPMEMORYCLOCK-i == now) ? "*" : "");
break;